Difference between revisions of "Template:Job"

From Wikispooks
Jump to navigation Jump to search
(Auto "acting" in empty description case)
(Add |Appointer parameter)
Line 4: Line 4:
 
{{job
 
{{job
 
|{{BLUE|title}}=Pagename of the job, e.g. [[US President]]
 
|{{BLUE|title}}=Pagename of the job, e.g. [[US President]]
|start= Date it began
+
|start= Date it began ''([[Property:Start]])''
|end= Date it ended
+
|end= Date it ended ''([[Property:End]])''
|next= Date the job was next held (For handling gaps in appointments)
+
|next= Date the job was next held (For handling gaps in appointments) ''([[Property:Next]])''
|description=Human readable clarification
+
|description=Human readable clarification ''([[Property:Ddescription]])''
 +
|{{BLUE|appointer}}=Pagename of the person who appointed this job holder ''([[Property:Has appointer]])''
 
|acting=Yes (For acting appointees)
 
|acting=Yes (For acting appointees)
 
|{{BLUE|employer}}=Pagename of the employer ''([[Property:Has employer]])''
 
|{{BLUE|employer}}=Pagename of the employer ''([[Property:Has employer]])''
Line 23: Line 24:
 
|Display date={{FormatDate|{{{start|}}}|{{{end|}}}|}}
 
|Display date={{FormatDate|{{{start|}}}|{{{end|}}}|}}
 
|Has deputy={{{deputies|}}}|+sep=,
 
|Has deputy={{{deputies|}}}|+sep=,
 +
|Has appointer={{{deputies|}}}|+sep=,
 
|description={{#if: {{{description|}}}|{{{description}}}|{{#ifeq: {{{acting|}}}|Yes|''Acting'' }}}}
 
|description={{#if: {{{description|}}}|{{{description}}}|{{#ifeq: {{{acting|}}}|Yes|''Acting'' }}}}
 
}}<!---
 
}}<!---
Line 39: Line 41:
 
}}}}}}}}
 
}}}}}}}}
 
|below={{{description|}}}
 
|below={{{description|}}}
|label5=Preceded by
+
|label5=Appointed by
|data5={{#if: {{{title|}}}| {{#if: {{{start|}}}|{{#ask: [[Next::{{{start|}}}]][[Has jobTitle::{{{title|}}}]] }}{{#ask: [[End::{{date-1|{{{start|}}}}}]][[Has jobTitle::{{{title|}}}]] }}{{#ask: [[End::{{{start|}}}]][[Has jobTitle::{{{title|}}}]] }} }} }}
+
|data5={{ArrayMapListLink|{{{appointer|}}}}}
|label6=Succeeded&nbsp;by
+
|label7=Preceded by
|data6={{#if: {{{title|}}}| {{#if: {{{next|}}}|{{#ask: [[Start::{{{next|}}}]][[Has jobTitle::{{{title|}}}]] }}|{{#if: {{{end|}}}|{{#ask: [[Start::{{date+1|{{{end|}}}}}]][[Has jobTitle::{{{title|}}}]] }}{{#ask: [[Start::{{{end|}}}]][[Has jobTitle::{{{title|}}}]] }} }} }} }}
+
|data7={{#if: {{{title|}}}| {{#if: {{{start|}}}|{{#ask: [[Next::{{{start|}}}]][[Has jobTitle::{{{title|}}}]] }}{{#ask: [[End::{{date-1|{{{start|}}}}}]][[Has jobTitle::{{{title|}}}]] }}{{#ask: [[End::{{{start|}}}]][[Has jobTitle::{{{title|}}}]] }} }} }}
 +
|label9=Succeeded&nbsp;by
 +
|data9={{#if: {{{title|}}}| {{#if: {{{next|}}}|{{#ask: [[Start::{{{next|}}}]][[Has jobTitle::{{{title|}}}]] }}|{{#if: {{{end|}}}|{{#ask: [[Start::{{date+1|{{{end|}}}}}]][[Has jobTitle::{{{title|}}}]] }}{{#ask: [[Start::{{{end|}}}]][[Has jobTitle::{{{title|}}}]] }} }} }} }}
 
}}
 
}}
 
}}</includeonly>
 
}}</includeonly>

Revision as of 14:10, 9 April 2015

This template is for use in the |employment category of Wikispooks pages about people, to be used once per stint of employment.
Usage:

{{job
|title=Pagename of the job, e.g. US President
|start= Date it began (Property:Start)
|end= Date it ended (Property:End)
|next= Date the job was next held (For handling gaps in appointments) (Property:Next)
|description=Human readable clarification (Property:Ddescription)
|appointer=Pagename of the person who appointed this job holder (Property:Has appointer)
|acting=Yes (For acting appointees)
|employer=Pagename of the employer (Property:Has employer)
|deputies=Comma separated list of pagename(s) of the deputies (Property:Has deputy) (Experimental) (Should be auto generated)
}}