Difference between revisions of "Template:Project info"

From SNIC Documentation
Jump to: navigation, search
Line 21: Line 21:
  
 
</noinclude><includeonly>{{#ifeq: {{{quiet}}}|true|
 
</noinclude><includeonly>{{#ifeq: {{{quiet}}}|true|
{{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|project financing={{{financing}}}|project start date={{{start date}}}|project 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>}}|
+
{{#set: name={{{name|{{PAGENAME}}}}}|description={{{description}}}|project financing={{{financing}}}|project start date={{{start date}}}|project 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 {{#if: {{{border|}}}|style="border: {{{border}}}; padding: 0 0.5em;"}}>
{{project info table|name={{{name|{{PAGENAME}}}}}|description={{{description|}}}|financing={{{financing|}}}|active={{{active|}}}|start date={{{start date|}}}|end date={{{end date|}}}}}
+
<tr>
}}
+
<th align="left">Name</th>
 +
<td>[[name::{{{name|{{PAGENAME}}}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">Description</th>
 +
<td>[[description::{{{description|<span style="font-weight: bold; color: red;">ERROR</span>}}}]]</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:Project active|Project active]]</th>
 +
<td>[[project active::{{{active}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">[[Property:Project start date|Project start date]]</th>
 +
<td>[[project start date::{{{start date}}}]]</td>
 +
</tr>
 +
<tr>
 +
<th align="left">[[Property:Project end date|Project end date]]</th>
 +
<td>[[project end date::{{{end date}}}]]</td>
 +
</tr>
 +
</table>}}
 
[[Category:Project]]</includeonly>
 
[[Category:Project]]</includeonly>

Revision as of 14:52, 8 February 2012

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.

Usage: {{project info|description=|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. financing indicates which organisation provides the main financing for the project (see Property:Project funding). 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. 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.

Example:

{{project info
|description=web portal frontend for a cluster resource for bioinformatics
|financing=SNIC
|active=yes
|start date=2011-05-20
|end date=
}}