Difference between revisions of "Template:Training info"
(Created page with "<noinclude> This template registers the relevant categories and properties for a training. Will protest loudly in bold red if mandatory information is missing. If you do not wish...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
Usage: <nowiki>{{</nowiki>project info|''description''=|''fields''=|''active''=|''start date''=|''end date''=|''name''=<nowiki>{{PAGENAME}}}}</nowiki> | Usage: <nowiki>{{</nowiki>project info|''description''=|''fields''=|''active''=|''start date''=|''end date''=|''name''=<nowiki>{{PAGENAME}}}}</nowiki> | ||
− | All the parameters are named, and can be given in any order. ''description'' should be a shortest-possible style description of the training's purpose or activities, which should not start with the word "a" or a capital letter, and should not end with a full stop character. ''fields'' is a semicolon separated list of [[:Category:Field|fields]] associated with this training. ''start date'' and ''end date'' give the start and end dates of the training. ''active'' states whether or not the training is currently considered to be active (see [[Property:is active]]). ''name'' defaults to <nowiki>{{PAGENAME}}</nowiki> and should in principle never have to be set to anything else. | + | All the parameters are named, and can be given in any order. ''description'' should be a shortest-possible style description of the training's purpose or activities, which should not start with the word "a" or a capital letter, and should not end with a full stop character. ''city'' should be the name of the city where this training will be held. ''fields'' is a semicolon separated list of [[:Category:Field|fields]] associated with this training. ''start date'' and ''end date'' give the start and end dates of the training. ''active'' states whether or not the training is currently considered to be active (see [[Property:is active]]). ''name'' defaults to <nowiki>{{PAGENAME}}</nowiki> and should in principle never have to be set to anything else. |
This template produces a small table with the given information as readable output, but this can be suppressed by setting ''quiet''=true. | This template produces a small table with the given information as readable output, but this can be suppressed by setting ''quiet''=true. | ||
Line 14: | Line 14: | ||
|description=parallel performance optimization tools | |description=parallel performance optimization tools | ||
|fields=Bioinformatics; Commercial ecclesiasticities | |fields=Bioinformatics; Commercial ecclesiasticities | ||
+ | |location=Linköping | ||
|active=yes | |active=yes | ||
|start date=2014-05-20 | |start date=2014-05-20 | ||
Line 21: | Line 22: | ||
</noinclude><includeonly>{{#ifeq: {{{quiet}}}|true| | </noinclude><includeonly>{{#ifeq: {{{quiet}}}|true| | ||
− | {{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|start date={{{start date}}}|end date={{{end date}}}|active={{{active}}}}}{{#if: {{{description|}}}||<span style="font-weight: bold; color: red;">ERROR: No description.</span>}}|<table> | + | {{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|location={{{location}}}|start date={{{start date}}}|end date={{{end date}}}|active={{{active}}}}}{{#if: {{{description|}}}||<span style="font-weight: bold; color: red;">ERROR: No description.</span>}}|<table> |
<tr> | <tr> | ||
<th align="left">Name</th> | <th align="left">Name</th> | ||
Line 31: | Line 32: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <th align="left"> | + | <th align="left">Location</th> |
− | <td>[[ | + | <td>[[location::{{{location|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 43: | Line 44: | ||
</tr> | </tr> | ||
</table>}} | </table>}} | ||
− | [[Category: | + | [[Category:Training]]{{set category list|field|{{{fields|}}}}}</includeonly> |
Latest revision as of 06:15, 11 April 2014
This template registers the relevant categories and properties for a training. Will protest loudly in bold red if mandatory information is missing. If you do not wish to provide a certain piece of required information: do not use this template. Or else you will corrupt the database with incorrect information.
Usage: {{project info|description=|fields=|active=|start date=|end date=|name={{PAGENAME}}}}
All the parameters are named, and can be given in any order. description should be a shortest-possible style description of the training's purpose or activities, which should not start with the word "a" or a capital letter, and should not end with a full stop character. city should be the name of the city where this training will be held. fields is a semicolon separated list of fields associated with this training. start date and end date give the start and end dates of the training. active states whether or not the training is currently considered to be active (see Property:is active). name defaults to {{PAGENAME}} and should in principle never have to be set to anything else.
This template produces a small table with the given information as readable output, but this can be suppressed by setting quiet=true.
Example:
{{training info |description=parallel performance optimization tools |fields=Bioinformatics; Commercial ecclesiasticities |location=Linköping |active=yes |start date=2014-05-20 |end date=2014-05-24 }}