Difference between revisions of "Template:Project info"

From SNIC Documentation
Jump to: navigation, search
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template and registers the relevant categories and properties for a project. 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.
+
This template registers the relevant categories and properties for a project. 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: <nowiki>{{</nowiki>project info|''description''=|''organisation''=|''active''=|''start''=|''end''=|''name''=<nowiki>{{PAGENAME}}}}</nowiki>
+
Usage: <nowiki>{{</nowiki>project info|''description''=|''fields''=|''research project''=|''financing''=|''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 project'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. ''organisation'' should be set to one of "PRACE", "SNIC" or "Other". ''start date'' and ''end date'' give the start and end dates of the project. ''active'' states whether or not the project is currently considered to be active, and is used both to simplify queries and to handle corner cases in an explicit manner. ''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 project'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 project. ''financing'' indicates which organisation provides the main financing for the project (see [[Property:Project financing]]). ''start date'' and ''end date'' give the start and end dates of the project. ''active'' states whether or not the project is currently considered to be active (see [[Property:Project 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. If you do, you may want to add something closely resembling this table to the page instead, and take special care to remember to update this table manually as data changes.  
+
This template produces a small table with the given information as readable output, but this can be suppressed by setting ''quiet''=true.
  
 
Example:
 
Example:
Line 13: Line 13:
 
{{project info
 
{{project info
 
|description=web portal frontend for a cluster resource for bioinformatics
 
|description=web portal frontend for a cluster resource for bioinformatics
|organisation=SNIC
+
|fields=Bioinformatics; Commercial ecclesiasticities
 +
|research project=SeRC: World dominion in five easy steps
 +
|financing=SNIC
 
|active=yes
 
|active=yes
 
|start date=2011-05-20
 
|start date=2011-05-20
Line 21: Line 23:
  
 
</noinclude><includeonly>{{#ifeq: {{{quiet}}}|true|
 
</noinclude><includeonly>{{#ifeq: {{{quiet}}}|true|
{{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|organisation={{{organisation}}}|start date={{{start}}}|end date={{{end}}}|active={{{active}}}}}{{#if: {{{description|}}}||<span style="font-weight: bold; color: red;">ERROR: No description.</span>}}{{#if: {{{organisation|}}}||<span style="font-weight: bold; color: red;">ERROR: No organisation.</span>}}|
+
{{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|project financing={{{financing}}}|start date={{{start date}}}|end date={{{end date}}}|active={{{active}}}}}{{#if: {{{description|}}}||<span style="font-weight: bold; color: red;">ERROR: No description.</span>}}{{#if: {{{finacing|}}}||<span style="font-weight: bold; color: red;">ERROR: No financing.</span>}}|<table>
{|
+
<tr>
|+Project information
+
<th align="left">Name</th>
|- |Name | [[name::{{{name|{{PAGENAME}}}}}]]
+
<td>[[name::{{{name|{{PAGENAME}}}}}]]</td>
|- |Description | [[description::{{{description|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]
+
</tr>
|- |Organisation | [[organisation::{{{organisation|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]
+
<tr>
|- |Active | [[active::{{{active}}}]]
+
<th align="left">Description</th>
|- |Start date | [[start date::{{{start date}}}]]
+
<td>[[description::{{{description|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</td>
|- |End date | [[end date::{{{end date}}}]]
+
</tr>{{#if: {{{ research project | }}} |
|}
+
<tr>
[[Category:Project]]</includeonly>
+
<th align="left">Research project</th>
 +
<td>[[research project::{{{ research project }}} ]]</td>
 +
</tr> | }}
 +
<tr>
 +
<th align="left">[[Property:Project financing|Project financing]] &nbsp;</th>
 +
<td>[[project financing::{{{financing|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">[[Property:Is active|Is active]]</th>
 +
<td>[[is active::{{{active}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">[[Property:Start date|Start date]]</th>
 +
<td>[[start date::{{{start date}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">[[Property:End date|End date]]</th>
 +
<td>[[end date::{{{end date}}}]]</td>
 +
</tr>
 +
</table>}}
 +
[[Category:Project]]{{set category list|field|{{{fields|}}}}}</includeonly>

Latest revision as of 06:11, 11 April 2014

This template registers the relevant categories and properties for a project. 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=|research project=|financing=|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 project'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 fields associated with this project. financing indicates which organisation provides the main financing for the project (see Property:Project financing). start date and end date give the start and end dates of the project. active states whether or not the project is currently considered to be active (see Property:Project 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:

{{project info
|description=web portal frontend for a cluster resource for bioinformatics
|fields=Bioinformatics; Commercial ecclesiasticities
|research project=SeRC: World dominion in five easy steps 
|financing=SNIC
|active=yes
|start date=2011-05-20
|end date=
}}