Difference between revisions of "Template:Student"

From AIRWiki
Jump to: navigation, search
(New page: <noinclude>This template simplifies the creation of articles about generic users, in our case (non PhD!) students. For PhD students check the template at Template:PhD, for professors c...)
 
 
(31 intermediate revisions by 7 users not shown)
Line 13: Line 13:
 
  | projectpage=The name of your project page
 
  | projectpage=The name of your project page
 
  | photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
 
  | photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
 +
| status=user status. When a user is not active anymore she or her advisor should put her status to inactive.
 
}}</pre>
 
}}</pre>
 
The order of the fields is not relevant. The template should be given as the ''first'' thing on a page.
 
The order of the fields is not relevant. The template should be given as the ''first'' thing on a page.
  
</noinclude><includeonly>
+
</noinclude>
{| align="right" cellpadding="2" cellspacing="0" width="350px"
+
 
 +
<includeonly>
 +
{| style="padding:10px" align="right" cellpadding="2" cellspacing="0" width="350px"
  
 
|-
 
|-
Line 32: Line 35:
  
 
|-
 
|-
{{#ifeq:{{{email|}}}|||{{Tablerow|Label=E-Mail|Value={{{email}}}}}}}
+
{{#ifeq:{{{email|}}}|||{{Tablerow|Label=E-Mail|Value={{Mailbox|{{{email}}}}}}}}}
  
 
|-
 
|-
 
{{#ifeq:{{{advisor|}}}|||{{#arraymap:{{{advisor|}}}|; |x|[[hasAdvisor::User:x| ]]|}}}}
 
{{#ifeq:{{{advisor|}}}|||{{#arraymap:{{{advisor|}}}|; |x|[[hasAdvisor::User:x| ]]|}}}}
{{Tablerow|Label=Advisor|Value=<ul>{{#arraymap:{{#ask: [[User:{{PAGENAME}}]] | ?hasAdvisor= }}|, |x|<li>x</li>|}}</ul>}}
+
{{Tablerow|Label=Advisor|Value=<ul>{{#arraymap:{{#show: User:{{PAGENAME}} | ?hasAdvisor }}|, |x|<li>x</li>|}}</ul>}}
  
 
|-
 
|-
 
{{#ifeq:{{{projectpage|}}}|||{{Tablerow|Label=Project page|Value=[[{{{projectpage}}}]]}}}}
 
{{#ifeq:{{{projectpage|}}}|||{{Tablerow|Label=Project page|Value=[[{{{projectpage}}}]]}}}}
 +
|-
 +
{{Tablerow
 +
  |Label=Project page(s)
 +
  |Value= {{#arraymap: {{#ask: [[Category:Project]][[prjStudent::User:{{PAGENAME}}]]}} }}
  
|}[[Category:Student]]</includeonly>
+
}}
 +
|-
 +
{{#ifeq:{{{status|}}}|||{{Tablerow|Label=Status|Value=[[userStatus::{{{status}}}]]}}}}
 +
|}
 +
[[Category:Student]]
 +
</includeonly>

Latest revision as of 22:30, 5 June 2016

This template simplifies the creation of articles about generic users, in our case (non PhD!) students. For PhD students check the template at Template:PhD, for professors check the template at Template:Prof. When inserted in a person's page, it creates a decorative table with much helpful information. It also takes care of annotating the given data semantically, so that users can easily find it or query it in other articles. Do not try to read this page's source code for learning table syntax – there are far easier ways of creating tables in MediaWiki.

To use this template, insert the following at the beginning of your user page. All fields are strictly optional and should be omitted if no data is given.

Please delete all lines that you do not give useful information for!

{{Student
 | firstname=Mario
 | lastname=Rossi
 | email=mario.rossi(at)elet(dot)polimi(dot)it
 | advisor=NomeCognome (the first name and the last name of your advisor, with no spaces in between)
 |         ***NOTE:*** you can specify a LIST of advisors, separating them with a semicolon (;)
 | projectpage=The name of your project page
 | photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
 | status=user status. When a user is not active anymore she or her advisor should put her status to inactive.
}}

The order of the fields is not relevant. The template should be given as the first thing on a page.