Difference between revisions of "Template:PhD"

From AIRWiki
Jump to: navigation, search
m
 
(12 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
  |        ***NOTE:*** you can specify a LIST of research areas, separating them with a semicolon (;)
 
  |        ***NOTE:*** you can specify a LIST of research areas, separating them with a semicolon (;)
 
  | 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=active or inactive according to the fact that it is still a PhD student tor not
 
}}</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><includeonly>
{| align="right" cellpadding="2" cellspacing="0" width="350px"
+
{| style="padding:10px" align="right" cellpadding="2" cellspacing="0" width="200px"
  
 
|-
 
|-
Line 25: Line 26:
 
{{#ifeq:{{{photo|}}}|||{{Tablelongrow|Value='''[[Image:{{{photo}}}|200px|Foto di {{PAGENAME}}]]'''}}}}
 
{{#ifeq:{{{photo|}}}|||{{Tablelongrow|Value='''[[Image:{{{photo}}}|200px|Foto di {{PAGENAME}}]]'''}}}}
  
 +
<!--
 
|-
 
|-
 
{{#ifeq:{{{firstname|}}}|||{{Tablerow|Label=First Name|Value={{{firstname}}}}}}}
 
{{#ifeq:{{{firstname|}}}|||{{Tablerow|Label=First Name|Value={{{firstname}}}}}}}
Line 30: Line 32:
 
|-
 
|-
 
{{#ifeq:{{{lastname|}}}|||{{Tablerow|Label=Last Name|Value={{{lastname}}}}}}}
 
{{#ifeq:{{{lastname|}}}|||{{Tablerow|Label=Last Name|Value={{{lastname}}}}}}}
 +
-->
  
 
|-
 
|-
Line 36: Line 39:
 
|-
 
|-
 
{{#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:{{{resarea|}}}|||{{#arraymap:{{{resarea|}}}|;|x|[[hasResArea::x| ]]|}}}}
{{#ifeq:{{{resarea|}}}|||{{#arraymap:{{{resarea|}}}|;|x|[[hasResArea::x| ]]|}}}}
+
 
<!-- NOTE: this solution for research areas is nicer to see, but it doesn't work fine
 
<!-- NOTE: this solution for research areas is nicer to see, but it doesn't work fine
 
           with areas whose name contains the sequence of chars ", " as it's used as
 
           with areas whose name contains the sequence of chars ", " as it's used as
           a separator for ASK results
+
           a separator for ASK results-->
{{Tablerow|Label=Research Areas|Value=<ul>{{#arraymap:{{#ask: [[User:{{PAGENAME}}]] | ?hasResArea= }}|, |x|<li>x</li>|}}</ul>}}
+
{{Tablerow|Label=Research Areas|Value=<ul>{{#arraymap:{{#show: User:{{PAGENAME}} | ?hasResArea }}|, |x|<li>x</li>|}}</ul>}}
-->
+
{{Tablerow|Label=Research Areas|Value={{#ask: [[User:{{PAGENAME}}]] | ?hasResArea= }}}}
+
  
 +
<!--{{Tablerow|Label=Research Areas|Value={{#show: User:{{PAGENAME}} | ?hasResArea }}}}-->
 +
 +
|-
 +
{{#ifeq:{{{projectpage|}}}|||{{Tablerow|Label=Project page(s)|Value=<ul>{{#arraymap:{{{projectpage|}}}|;|x|<li>[[x]]</li>|}}</ul>}}}}
 
|-
 
|-
{{#ifeq:{{{projectpage|}}}|||{{Tablerow|Label=Project page|Value=[[{{{projectpage}}}]]}}}}
+
{{#ifeq:{{{status|}}}|||{{Tablerow|Label=Status|Value=[[userStatus::{{{status}}}]]}}}}
<!--{{#arraymap:{{{projectpage|}}}|;|x|[[x]]|}}-->
+
 
|}[[Category:PhD]]</includeonly>
 
|}[[Category:PhD]]</includeonly>

Latest revision as of 23:06, 17 August 2017

This template simplifies the creation of articles about PhD students. 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!

{{PhD
 | firstname=Mario
 | lastname=Rossi
 | email=mario.rossi@elet.polimi.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 (;)
 | resarea=The name of your research area
 |         ***NOTE:*** you can specify a LIST of research areas, separating them with a semicolon (;)
 | photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
 | status=active or inactive according to the fact that it is still a PhD student tor not
}}

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