Template:UCpdf: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
No edit summary
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
|bgcolor={{#switch:{{{2}}}|consolidated|draft="yellow"|#default="green"}}|{{#switch:{{{2}}}|consolidated=[[file:finish.png|30px]]|draft=[[file:stift.png|30px]]|#default=[[file:pdf.png|30px|link={{{2}}}]]}} (version(s) {{{1}}})
|bgcolor={{#switch:{{{2}}}|consolidated|draft="#F0CA00"|#default="green"}}|{{#switch:{{{2}}}|consolidated=[[file:finish.png|x30px]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|draft=[[file:stift.png|x30px]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|#default=[[file:pdf.png|x30px|link={{{2}}}]]}}&nbsp;(version(s) {{{1}}})
|-
</includeonly><noinclude>
</includeonly><noinclude>
==Usage==
==Usage==
 
This template supports [[Template:UseCase]] by standardizing the links to approved [[dev:UseCase|usecase]] versions. It works only within [[Template:UseCase]].
===Arguments===
The template has two unnamed obligatory arguments:
*1: The version(s) to which the usecases (in a certain edition) applies
*2: Either status ''draft''/''consolidated'' or the link to an edition
==Example==
==Example==
<pre>{|
{{UCpdf|3.5|draft}}
{{UCpdf|3.2|consolidated}}
{{UCpdf|3.1, 3.2|https://upload.wikimedia.org/wikipedia/commons/3/39/Migrant_caravan.pdf}}
|}</pre>
delivers
{|
{|
{{UCpdf|3.5|draft}}
{{UCpdf|3.5|draft}}
|-
{{UCpdf|3.2|consolidated}}
{{UCpdf|3.2|consolidated}}
|-
{{UCpdf|3.1, 3.2|https://upload.wikimedia.org/wikipedia/commons/3/39/Migrant_caravan.pdf}}
{{UCpdf|3.1, 3.2|https://www.railml.org/en/event-reader/35th-railml-conference.html?file=files/download/events/conferences/railML_35th_linz/2019-04-03_railml_events-agenda-35-railml-conference-linz.pdf}}
|}
|}


[[category:template]]
[[Category:Template for use cases]]
</noinclude>
</noinclude>

Revision as of 13:56, 19 August 2019

Usage

This template supports Template:UseCase by standardizing the links to approved usecase versions. It works only within Template:UseCase.

Arguments

The template has two unnamed obligatory arguments:

  • 1: The version(s) to which the usecases (in a certain edition) applies
  • 2: Either status draft/consolidated or the link to an edition

Example

{|
{{UCpdf|3.5|draft}}
{{UCpdf|3.2|consolidated}}
{{UCpdf|3.1, 3.2|https://upload.wikimedia.org/wikipedia/commons/3/39/Migrant_caravan.pdf}}
|}

delivers

Stift.png                   (version(s) 3.5)
Finish.png                  (version(s) 3.2)
Pdf.png (version(s) 3.1, 3.2)