Vorlage:Service portal: Unterschied zwischen den Versionen

Permanently protected template
IMT HilfeWiki - das Wiki
 
imported>Oetterer
(Der Seiteninhalt wurde durch einen anderen Text ersetzt: „<includeonly><!-- this is an infobox commonly used on all service portal pages -->{{#invoke:Service portal|main}}</includeonly><noin…“)
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 1: Zeile 1:
<includeonly><!-- this is an infobox commonly used on all service portal pages --><!--
+
<includeonly><!-- this is an infobox commonly used on all service portal pages -->{{#invoke:Service portal|main}}</includeonly><noinclude>
 
 
  1. declaration of internal variables
 
  ------------------------------------
 
-->{{#vardefine:service_description|{{{description|}}}}}{{#vardefine:label_defaulttargetgroup|Endbenutzer}}{{#vardefine:defaulttargetgroup|Angestellte, Gäste, Studierende}}{{#arraydefine:targetgroup_valid_values|{{#ask: [[Attribut:is written for target audience]] |?Allows value= |format=list |mainlabel=- }} }}{{#vardefine:servicename|{{BASEPAGENAME}}<!--end of vardefine-->}}<!--{{#vardefine:url2status|https://statusmeldungen.uni-paderborn.de/state.php?service{{=}}}}-->{{#vardefine:url2status|https://statusmeldungen.uni-paderborn.de/state/}}{{#vardefine:url2status_suffix|.png}}<!--
 
 
 
  2. parameter processing
 
  -----------------------
 
-->{{#set:has short description={{#var:service_description|}}}}<!--
 
 
 
  2.1. image
 
-->{{#vardefine:image|{{#if:{{{image|}}}|{{#ifeq:{{#sub:{{{image}}}|0|1}}|[|{{{image}}}|{{#if:{{#pos:{{{image}}}|.}}|[[Datei:{{{image}}}]]|{{#var:url2status}}{{{image}}}{{#var:url2status_suffix|}}<!-- end of if pos-->}}<!-- end of ifeq:sub -->}}|[[Datei:Logo_{{BASEPAGENAME}}.png]]<!-- end of #if:{{{image|}}} else -->}}<!-- end of vardefine -->}}<!--
 
 
 
  2.2. targetgroup
 
-->{{#if:{{{targetgroup|}}} |{{#arraydefine:input_targetgroup |{{{targetgroup}}} |,|sort=asc,unique}} |{{#arraydefine:input_targetgroup|{{#var:defaulttargetgroup}}}} <!-- end of {{#if:{{{targetgroup|}}}-->}}<!-- plausibilty check, fills semantics and variable targetgroup, or var:error_targetgroup if user entered incorrect value -->{{#vardefine:targetgroup|{{#arrayprint:input_targetgroup ||@@@@ |{{#if:{{#arraysearch:targetgroup_valid_values|@@@@}} |{{#set:is written for target audience=@@@@}}@@@@,|{{#vardefine:error_targetgroup |{{#var:error_targetgroup|}}@@@@,<nowiki> </nowiki>}}}}}}<!-- end of vardefine:targetgroup -->}}<!--now check, whether targetgroup contains all three types of internal users (var:defaulttargetgroup). if so, replace them with #var:label_defaulttargetgroup -->{{#arraydefine:input_targetgroup|{{#sub:{{#var:targetgroup}}|0|-1}}}}{{#ifeq:{{#arrayprint:input_targetgroup||@@@|{{#if:{{#pos:{{#var:defaulttargetgroup}}|@@@}}|1}}}}|111|<!-- filter! -->{{#vardefine:targetgroup|{{#arrayprint:input_targetgroup||@@@|{{#if:{{#pos:{{#var:defaulttargetgroup}}|@@@}}||@@@,}}}}{{#var:label_defaulttargetgroup}}}}|<!-- end of ifeq-->}}{{#arraydefine:output_targetgroup|{{#var:targetgroup}}|,|sort=asc,unique}}<!--
 
 
 
  2.3. glossary
 
-->{{#if:{{#var:service_description|}}|{{yesno|{{{glossary|no}}}|yes={{#set:Glossary-Term={{#var:servicename}}|Glossary-Definition={{#var:service_description}}}}<!-- end of template:yesno -->}}<!-- end of {{#if:{{#var:service_description|}} -->}}<!--
 
 
 
  3. call the infobox
 
  --------------------------------
 
 
 
-->{{Infobox
 
| title = {{#var:servicename}}
 
| image = {{#var:image|Logo_{{#var:servicename}}.png}}
 
| subheader = Ein Dienst des IMT
 
| caption = {{#var:servicename}}
 
| header1 = Informationen
 
| label1 = Verantwortliche/r
 
| data1 = {{{responsible|}}}
 
| label2 = Zielgruppe
 
| data2 = {{#arrayprint:output_targetgroup|,<nowiki> </nowiki>}}<!--{{#if:{{#var:targetgroup}}|{{#var:targetgroup|}}<nowiki> </nowiki>}} do some error-output if applicable -->{{#if: {{#var:error_targetgroup|}} |{{errortext|UNKNOWN TARGET GROUP(S): {{#sub:{{#var:error_targetgroup|}}|0 |-2 }} }} }}
 
| data3 = {{#var:service_description|}}
 
<!-- end of {{Infobox -->}}[[Category:Dienstportalseiten]]<!--
 
 
 
  4. start putting out some errorboxes, if applicable
 
  ---------------------------------------------------
 
 
 
-->{{#if:{{#var:error_targetgroup|}}|{{Template warning|UNKNOWN TARGET GROUP(S): ''{{#sub:{{#var:error_targetgroup|}}|0 |-2 }}''|Infobox_service}} }}</includeonly><noinclude>
 
 
{{documentation}}
 
{{documentation}}
 
<!-- Add categories to the /doc subpage, not here! -->
 
<!-- Add categories to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Aktuelle Version vom 28. Februar 2023, 17:20 Uhr

Documentation icon Template documentation

Description[Quelltext bearbeiten]

Adds a descriptive infobox to a service landing page with some helpful information. Also adds some structural and sematic data.

Parameters[Quelltext bearbeiten]

For a service portal / service landing page this produces an infobox and sets some sematic data

Vorlagenparameter

ParameterBeschreibungTypStatus
Service imageimage

name of image or link to image to use; can be a simple string in which case the appropriate image from statusmeldung will be used

Standard
Logo_{{BASEPAGENAME}}.png
Dateivorgeschlagen
audience/target grouptargetgroup

The group of user/people, the service is implemented for, i.e. who can use this service

Standard
Angestellte, Gäste, Studierende
Zeilevorgeschlagen
Short descriptiondescription

A short description of this service

Zeichenfolgevorgeschlagen
glossary entryglossary

Set to true enters the service portal in the global glossary - provided description is set.

Booleschoptional

Usage[Quelltext bearbeiten]

{{service portal
|image=
|targetgroup=
|description=
|glossary=
}}

See also[Quelltext bearbeiten]

Cookies helfen uns bei der Bereitstellung des IMT HilfeWikis. Bei der Nutzung vom IMT HilfeWiki werden die in der Datenschutzerklärung beschriebenen Cookies gespeichert.