Difference between revisions of "Template:Student"

From AIRWiki
Jump to: navigation, search
m
(Replaced content with "{{Student | firstname=Alberto | lastname=Gasparin | email=alberto.gasparin@mail.polimi.it | advisor=MatteoMatteucci | projectpage= | photo= | status=active. }}")
Line 1: Line 1:
<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 check the template at [[Template:Prof]].
+
{{Student
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 &ndash; there are far easier ways of creating tables in MediaWiki.
+
  | firstname=Alberto
 
+
  | lastname=Gasparin
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.
+
  | email=alberto.gasparin@mail.polimi.it
 
+
  | advisor=MatteoMatteucci
'''Please delete all lines that you do not give useful information for!'''
+
  | projectpage=
<pre>{{Student
+
  | photo=
  | firstname=Mario
+
  | status=active.
  | 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.
+
}}</pre>
+
The order of the fields is not relevant. The template should be given as the ''first'' thing on a page.
+
 
+
</noinclude>
+
 
+
<includeonly>
+
{| style="padding:10px" align="right" cellpadding="2" cellspacing="0" width="350px"
+
 
+
|-
+
{{Tablelongrow|Color=#CCF|Style=border-top: 1px solid #808080;|Value=<b>{{{firstname}}} {{{lastname}}}</b>}}
+
 
+
|-
+
{{#ifeq:{{{photo|}}}|||{{Tablelongrow|Value='''[[Image:{{{photo}}}|200px|Foto di {{PAGENAME}}]]'''}}}}
+
 
+
|-
+
{{#ifeq:{{{firstname|}}}|||{{Tablerow|Label=First Name|Value={{{firstname}}}}}}}
+
 
+
|-
+
{{#ifeq:{{{lastname|}}}|||{{Tablerow|Label=Last Name|Value={{{lastname}}}}}}}
+
 
+
|-
+
{{#ifeq:{{{email|}}}|||{{Tablerow|Label=E-Mail|Value={{Mailbox|{{{email}}}}}}}}}
+
 
+
|-
+
{{#ifeq:{{{advisor|}}}|||{{#arraymap:{{{advisor|}}}|; |x|[[hasAdvisor::User:x| ]]|}}}}
+
{{Tablerow|Label=Advisor|Value=<ul>{{#arraymap:{{#show: User:{{PAGENAME}} | ?hasAdvisor }}|, |x|<li>x</li>|}}</ul>}}
+
 
+
|-
+
{{#ifeq:{{{projectpage|}}}|||{{Tablerow|Label=Project page|Value=[[{{{projectpage}}}]]}}}}
+
|-
+
{{Tablerow
+
  |Label=Project page(s)
+
  |Value= {{#arraymap: {{#ask: [[Category:Project]][[prjStudent::User:{{PAGENAME}}]]}} }}
+
 
+
 
}}
 
}}
|-
 
{{#ifeq:{{{status|}}}|||{{Tablerow|Label=Status|Value=[[userStatus::{{{status}}}]]}}}}
 
|}
 
[[Category:Student]]
 
</includeonly>
 

Revision as of 18:36, 5 May 2016


Alberto Gasparin
First Name: Alberto
Last Name: Gasparin
E-Mail: alberto.gasparin@mail.polimi.it
Advisor:
    Project page(s):
    Status: active.