Template:UseCase: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Undo revision 5382 by Ferri Leberl (talk))
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="float:right; margin-left:10px; text-align:center"
<includeonly>{| class="wikitable" style="float:right; margin-left:10px; text-align:center"
|bgcolor="white"|'''{{{title|{{PAGENAME}}}}}'''{{#if:{{{abbr|}}}|<br>({{{abbr}}})}}<br>Subschema: {{#switch:{{{1}}}|IS=[[Infrastructure]]|IL=[[Interlocking]]|TT=[[Timetable|Timetable and Rostering]]|RS=[[Rollingstock]]|CO=[[Common]]|#default=Subschema missing!}}{{#if:{{{IS|}}}{{{IL|}}}{{{TT|}}}{{{CO|}}}{{{RS|}}}|<br>&nbsp;<br>Related subschemas:&nbsp;{{#if:{{{IS|}}}|[[Infrastructure|IS]]&nbsp;}}{{#if:{{{IL|}}}|[[Interlocking|IL]]&nbsp;}}{{#if:{{{TT|}}}|[[Timetable|TT]]&nbsp;}}{{#if:{{{RS|}}}|[[Rollingstock|RS]]&nbsp;}}{{#if:{{{CO|}}}|[[Common|CO]]}}}}{{#if:{{{reporter|}}}|<br>Reported by: {{{reporter}}}}}
|bgcolor="white"|'''{{{title|{{PAGENAME}}}}}'''{{#if:{{{abbr|}}}|<br>({{{abbr}}})}}<br>Subschema: {{#switch:{{{1}}}|IS=[[Infrastructure]]|IL=[[Interlocking]]|TT=[[Timetable|Timetable and Rostering]]|RS=[[Rollingstock]]|CO=[[Common]]|#default=Subschema missing!}}{{#if:{{{IS|}}}{{{IL|}}}{{{TT|}}}{{{CO|}}}{{{RS|}}}|<br>&nbsp;<br>Related subschemas:&nbsp;{{#if:{{{IS|}}}|[[Infrastructure|IS]]&nbsp;}}{{#if:{{{IL|}}}|[[Interlocking|IL]]&nbsp;}}{{#if:{{{TT|}}}|[[Timetable|TT]]&nbsp;}}{{#if:{{{RS|}}}|[[Rollingstock|RS]]&nbsp;}}{{#if:{{{CO|}}}|[[Common|CO]]}}}}{{#if:{{{reporter|}}}|<br>Reported by: {{{reporter}}}[[category:UC reported by {{{reporter}}}]]|[[category:UC without specified reporter]]}}[[category:AllUseCases]]
|-<!--
Hinweis auf das PDF, falls abgeschlossen; sonst „draft“
Please, employ template:UCpdf!
-->
|{{{pdf|{{UCpdf|{{{2|not yet specified}}}|draft}}}}}
|-
|-
{{version_hg|{{{2}}}}}
|For general information on use cases see [[UC:Use cases]]
|-
|For general information on use cases see [[Dev:Use cases]]
|}[[category:Use case ({{#switch:{{{1}}}|IS=IS|IL=IL|TT=TT|RS=RS|CO=CO|#default=unknown subschema}})]]<br clear="all"/></includeonly><noinclude>
|}[[category:Use case ({{#switch:{{{1}}}|IS=IS|IL=IL|TT=TT|RS=RS|CO=CO|#default=unknown subschema}})]]<br clear="all"/></includeonly><noinclude>
==Application==
==Usage==
This template is intended to help standardizing articles on [[Dev:Use cases|use cases]]. It allows for a variable headline, integrates the comment on the version as returned from [[Template:Version_hg]] and shows the subschema for which the use case applies. Moreover, the page is categorized into a subcategory of [[:Category:Use case]].
This template is intended to help standardizing articles on [[UC:Use cases|use cases]]. It allows for a variable headline, integrates the comment on the version as returned from [[Template:Version_hg]] and shows the subschema for which the use case applies. Moreover, the page is categorized into a subcategory of [[:Category:Use case]].
===Arguments===
===Arguments===
This template has two unnamed obligatory arguments and six named optional ones:
This template has two unnamed obligatory arguments and eight named optional ones:
*1: obligatory, unnamed argument, telling you, to which subschema the use case belongs. Use the abbreviation IS, IL, TT, RS or CO
*1: obligatory, unnamed argument, telling you, to which subschema the use case belongs. Use the abbreviation IS, IL, TT, RS or CO
*2: obligatory, unnamed argument, telling you, to which {{rml}} version a page refers. It is handed further to [[Template:Version_hg]].
*2: obligatory, unnamed argument, telling you, to which {{rml}} version a page refers.
*title: an optional argument for the page title. The standard value is <nowiki>{{PAGENAME}}</nowiki>. In this case the page name is inserted.
*title: an optional argument for the page title. The standard value is <nowiki>{{PAGENAME}}</nowiki>. In this case the page name is inserted.
*abbr: an optional argument for the abbreviation of the use case title.
*reporter: an optional argument for the name of the institution or person reporting the use case.
*IS, IL, TT, RS, CO: Give them any value if there is an interference with the subschema; otherwise ignore this argument.
*IS, IL, TT, RS, CO: Give them any value if there is an interference with the subschema; otherwise ignore this argument.
 
*pdf:Link to the consolidated pdf. '''Please, employ [[template:UCpdf]]!'''
===Dependencies===
===Dependencies===
This template employs [[Template:Version_hg]]. It is used by no other templates.
This template employs [[Template:Version_hg]]. It is used by no other templates.


==Example==
==Example==
<pre>{{UseCase|IS|2.3|title=This is an Example|abbr=TiaE|reporter={{rml}}}}</pre>
<pre>{{UseCase|IS|2.3|title=This is an Example of a draft|abbr=TiaE|reporter={{rml|link=no|R=no}}}}</pre>
delivers
delivers
{| class="wikitable" style="float:right; margin-left:10px; text-align:center"
{{UseCase|IS|2.3|title=This is an Example of a draft|abbr=TiaE|reporter={{rml|link=no|R=no}}}}<br clear="all"/>
|bgcolor="white"|'''This is an Example'''<br>(TiaE)<br>Subschema: [[Infrastructure]]<br>Reported by: {{rml}}
 
|-
<pre>{{UseCase|TT|2.2|title=This is an Example of a consolidated Use Case|RS=1|IS=1|pdf={{UCpdf|2.2|consolidated}}}}</pre>
|bgcolor={{#switch:2.3|{{current}}="green"|="red"|#default="#F0CA00"}}|This page refers to {{#if:2.3|version 2.3|'''no specified version'''}} of {{rml}}.<br>{{#if:2.3|Therefore the content is {{#switch:2.3|{{current}}=up to date.|#default=possibly outdated.<br>The current version is {{current}}.}}|'''Please, add the applicable version!'''<br>The current version is {{current}}.}}{{#switch: 2.3|0|1.0|1.1|2.0|2.2|2.3=[[category:Pages written for version 2.3]]|#default=[[category:Pages written for a nonexistant version]]}}
delivers
|-
{{UseCase|TT|2.2|title=This is an Example of a consolidated Use Case|RS=1|IS=1|pdf={{UCpdf|2.2|consolidated}}}}<br clear="all"/>
|For general information on use cases see [[Dev:Use cases]]
|}<br clear="all"/>


<pre>{{UseCase|TT|2.2|title=This is another Example|RS=1|IS=1}}</pre>
<pre>{{UseCase|IL|3.2|title=This is an Example of a finished Use Case|RS=1|IS=1|pdf={{UCpdf|3.2|https://upload.wikimedia.org/wikipedia/commons/3/39/Migrant_caravan.pdf}}}}</pre>
delivers
delivers
{| class="wikitable" style="float:right; margin-left:10px; text-align:center"
{{UseCase|IL|3.2|title=This is an Example of a finished Use Case|RS=1|IS=1|pdf={{UCpdf|3.2|https://upload.wikimedia.org/wikipedia/commons/3/39/Migrant_caravan.pdf}}}}<br clear="all"/>
|bgcolor="white"|'''This is another Example'''<br>Subschema: {{#switch:TT|IS=[[Infrastructure]]|IL=[[Interlocking]]|TT=[[Timetable|Timetable and Rostering]]|RS=[[Rollingstock]]|CO=[[Common]]|#default=Subschema missing!}}{{#if:1|<br>Related subschemas:<br>{{#if:1|[[Infrastructure|IS]]&nbsp;}}{{#if:|[[Interlocking|IL]]&nbsp;}}{{#if:|[[Timetable|TT]]&nbsp;}}{{#if:1|[[Rollingstock|RS]]&nbsp;}}{{#if:|[[Common|CO]]&nbsp;}}}}
 
|-
[[Category:Template for use cases]]
|bgcolor={{#switch:2.2|{{current}}="green"|#default="#F0CA00"}}|This page refers to version 2.2 of {{rml}}.<br>Therefore the content is {{#switch:2.2|{{current}}=up to date.|#default=possibly outdated.<br>The current version is {{current}}.}}
|-
|For general information on use cases see [[Dev:Use cases]]
|}<br clear="all"/>


[[Category:Template for use cases]]</noinclude>
{{interwiki}}
</noinclude>

Revision as of 18:23, 16 January 2023

Usage

This template is intended to help standardizing articles on use cases. It allows for a variable headline, integrates the comment on the version as returned from Template:Version_hg and shows the subschema for which the use case applies. Moreover, the page is categorized into a subcategory of Category:Use case.

Arguments

This template has two unnamed obligatory arguments and eight named optional ones:

  • 1: obligatory, unnamed argument, telling you, to which subschema the use case belongs. Use the abbreviation IS, IL, TT, RS or CO
  • 2: obligatory, unnamed argument, telling you, to which railML® version a page refers.
  • title: an optional argument for the page title. The standard value is {{PAGENAME}}. In this case the page name is inserted.
  • abbr: an optional argument for the abbreviation of the use case title.
  • reporter: an optional argument for the name of the institution or person reporting the use case.
  • IS, IL, TT, RS, CO: Give them any value if there is an interference with the subschema; otherwise ignore this argument.
  • pdf:Link to the consolidated pdf. Please, employ template:UCpdf!

Dependencies

This template employs Template:Version_hg. It is used by no other templates.

Example

{{UseCase|IS|2.3|title=This is an Example of a draft|abbr=TiaE|reporter={{rml|link=no|R=no}}}}

delivers

This is an Example of a draft
(TiaE)
Subschema: Infrastructure
Reported by: railML®[[category:UC reported by railML®]]
Stift.png (version(s) 2.3)
For general information on use cases see UC:Use cases



{{UseCase|TT|2.2|title=This is an Example of a consolidated Use Case|RS=1|IS=1|pdf={{UCpdf|2.2|consolidated}}}}

delivers

This is an Example of a consolidated Use Case
Subschema: Timetable and Rostering
 
Related subschemas: IS RS 
Finish.png (version(s) 2.2)
For general information on use cases see UC:Use cases



{{UseCase|IL|3.2|title=This is an Example of a finished Use Case|RS=1|IS=1|pdf={{UCpdf|3.2|https://upload.wikimedia.org/wikipedia/commons/3/39/Migrant_caravan.pdf}}}}

delivers

This is an Example of a finished Use Case
Subschema: Interlocking
 
Related subschemas: IS RS 
Pdf.png (version(s) 3.2)
For general information on use cases see UC:Use cases