Difference between revisions of "Template:Training event info"

From SNIC Documentation
Jump to: navigation, search
(Created page with "<noinclude> This template registers the relevant categories and properties for a training event. Will protest loudly in bold red if mandatory information is missing. If you do no...")
 
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
  
 
<pre>
 
<pre>
{{training info
+
{{training event info
 
|description=parallel performance optimization tools
 
|description=parallel performance optimization tools
 
|fields=Bioinformatics; Commercial ecclesiasticities
 
|fields=Bioinformatics; Commercial ecclesiasticities
 +
|event type=Course
 
|location=Linköping
 
|location=Linköping
 
|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}}}|location={{{location}}}|start date={{{start date}}}|end date={{{end date}}}}}{{#if: {{{description|}}}||<span style="font-weight: bold; color: red;">ERROR: No description.</span>}}|<table>
+
{{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|event type={{{event type}}}|location={{{location}}}|start date={{{start date}}}|end date={{{end date}}}}}{{#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 29: Line 30:
 
  <th align="left">Description</th>
 
  <th align="left">Description</th>
 
  <td>[[description::{{{description|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</td>
 
  <td>[[description::{{{description|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">Type of event</th>
 +
<td>[[event type::{{{event type|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>

Latest revision as of 19:43, 11 April 2014

This template registers the relevant categories and properties for a training event. 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: {{training event info|description=|fields=|location=|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 event'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. location should be the name of the city where this training will be held or online for a web technology based event. 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. 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 event info
|description=parallel performance optimization tools
|fields=Bioinformatics; Commercial ecclesiasticities
|event type=Course
|location=Linköping
|start date=2014-05-20
|end date=2014-05-24
}}