Difference between revisions of "Template:Job"
(fix) |
m (add not use commas) |
||
(37 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude> | + | <noinclude>{{WStemplate |
− | '''Usage:''' | + | |categories=Semantic Templates |
+ | |summary=This template is for use in the {{!}}{{t|employment}} category of Wikispooks pages about people. | ||
+ | |description=This to be used once per stint of employment. All the parameters are optional. | ||
+ | }}'''Usage:''' | ||
<poem> | <poem> | ||
{{job | {{job | ||
− | |{{BLUE|title}}=Pagename of the job, e.g. [[US President]] | + | |{{BLUE|title}}=Pagename of the job, e.g. [[US President]]. The current standard practice is not to use commas in the title. |
|start= Date it began ''([[Property:Start]])'' | |start= Date it began ''([[Property:Start]])'' | ||
+ | |start_by= Date by which it had begun ''([[Property:Start_by]])'' {{RED|Not yet implemented}} | ||
|end= Date it ended ''([[Property:End]])'' | |end= Date it ended ''([[Property:End]])'' | ||
|next= Date the job was next held (For handling gaps in appointments) ''([[Property:Next]])'' | |next= Date the job was next held (For handling gaps in appointments) ''([[Property:Next]])'' | ||
|description=Human readable clarification ''([[Property:Description]])'' | |description=Human readable clarification ''([[Property:Description]])'' | ||
|{{GREEN|appointer}}=Pagename of the person who appointed this job holder ''([[Property:Has appointer]])'' | |{{GREEN|appointer}}=Pagename of the person who appointed this job holder ''([[Property:Has appointer]])'' | ||
− | |{{GREEN|location}}=Where the job was based | + | |{{GREEN|nominator}}=Pagename of the person who nominated this job holder ''([[Property:Has nominator]])'' |
+ | |{{GREEN|location}}=Where the job was based ''([[Property:Has location]])'' | ||
+ | |{{GREEN|ref}}=Content of ref(s) about this job | ||
|acting=Yes (For acting appointees) | |acting=Yes (For acting appointees) | ||
|{{BLUE|employer}}=Pagename of the employer ''([[Property:Has employer]])'' - Generally this should be a group, not a person's name. Usually used for obscure jobs, since if the job already exists as a page, the information is redundant. | |{{BLUE|employer}}=Pagename of the employer ''([[Property:Has employer]])'' - Generally this should be a group, not a person's name. Usually used for obscure jobs, since if the job already exists as a page, the information is redundant. | ||
Line 15: | Line 21: | ||
}} | }} | ||
</poem> | </poem> | ||
− | </noinclude><includeonly>[[ | + | </noinclude><includeonly>[[Has posting::{{{title|}}}| ]]{{#subobject: |
|Constitutes=Posting | |Constitutes=Posting | ||
|Has image={{#show: {{FULLPAGENAME}} ?Has image |link=none}} | |Has image={{#show: {{FULLPAGENAME}} ?Has image |link=none}} | ||
|Has jobTitle={{{title|}}} | |Has jobTitle={{{title|}}} | ||
|Has employer={{{employer|}}} | |Has employer={{{employer|}}} | ||
+ | |Start_by={{{start_by|}}} | ||
|Start={{{start|}}} | |Start={{{start|}}} | ||
|End={{{end|}}} | |End={{{end|}}} | ||
|Next={{{next|}}} | |Next={{{next|}}} | ||
|Display date={{FormatDate|{{{start|}}}|{{{end|}}}|}} | |Display date={{FormatDate|{{{start|}}}|{{{end|}}}|}} | ||
+ | <!-- |Display duration={{FormatDuration|{{{start|}}}|{{{end|}}}}} --> | ||
|Has deputy={{{deputies|}}}|+sep=, | |Has deputy={{{deputies|}}}|+sep=, | ||
|Has appointer={{{appointer|}}}|+sep=, | |Has appointer={{{appointer|}}}|+sep=, | ||
+ | |Has nominator={{{nominator|}}}|+sep=, | ||
+ | |Has location={{{location|}}}|+sep=, | ||
|description={{#if: {{{description|}}}|{{{description}}}|{{#ifeq: {{{acting|}}}|Yes|''Acting'' }}}} | |description={{#if: {{{description|}}}|{{{description}}}|{{#ifeq: {{{acting|}}}|Yes|''Acting'' }}}} | ||
}}<!--- | }}<!--- | ||
Now display in suitable format to put in an the footer of an infobox | Now display in suitable format to put in an the footer of an infobox | ||
− | -->{{Box|[[image: | + | -->{{Box|{{#ifexist: {{Display image of|pagename={{{title|}}}|link={{{title|}}}|size=x22px}}|{{Display image of|pagename={{{title|}}}|link={{{title|}}}|size=x22px}}|[[image:Employment.png|20px|link={{{title|}}}]]}} {{#ifeq: {{{acting|}}}|Yes|Acting }}{{ArrayMapListLink|{{{title|}}}}}{{#if: {{#show: {{{title|}}}| ?Has wikipediaPage2}}| [[image:wikipedia-icon.png|22px|link={{#show: {{{title|}}}| ?Has wikipediaPage2}}]]}}{{ArrayMapRefs|{{{ref|}}}}}|{{infobox |child = yes |
− | |header1=In office | + | |header1={{#if: {{{start|}}}{{{end|}}}|In office|Dates unknown}} |
|data2={{FormatDate|{{{start|}}}|{{{end|}}}}} | |data2={{FormatDate|{{{start|}}}|{{{end|}}}}} | ||
|label3=Employer | |label3=Employer | ||
Line 37: | Line 47: | ||
<!-- 2015-01-15: only display deputies when there is a start time and an end time --> | <!-- 2015-01-15: only display deputies when there is a start time and an end time --> | ||
|data4={{#if: {{{title|}}}| {{#if: {{#ask: [[-Has deputy::{{{title|}}}]]}}| {{#if: {{{start|}}}| {{#if: {{{end|}}}| | |data4={{#if: {{{title|}}}| {{#if: {{#ask: [[-Has deputy::{{{title|}}}]]}}| {{#if: {{{start|}}}| {{#if: {{{end|}}}| | ||
− | {{#ask: [[Constitutes::Posting]][[Has jobTitle::{{#ask: [[-Has deputy::{{{title|}}}]]}}]][[Start::> {{{start|}}}]][[Start::<<{{{end|}}}]] | + | {{#ask: [[Constitutes::Posting]][[Has jobTitle::{{#ask: [[-Has deputy::{{{title|}}}]]|link=none}}]][[Start::> {{{start|}}}]][[Start::<<{{{end|}}}]] |
<!-- Below is too inclusive | <!-- Below is too inclusive | ||
− | OR [[Constitutes::Posting]][[Has jobTitle::{{#ask: [[-Has deputy::{{{title|}}}]]}}]][[Start::<<{{{start|}}}]][[End::>>{{{end|}}}]] --> }} | + | OR [[Constitutes::Posting]][[Has jobTitle::{{#ask: [[-Has deputy::{{{title|}}}]]|link=none}}]][[Start::<<{{{start|}}}]][[End::>>{{{end|}}}]] --> }} |
}}}}}}}} | }}}}}}}} | ||
|below={{{description|}}} | |below={{{description|}}} | ||
− | |label5= | + | |label5=Boss |
− | |data5={{ | + | <!-- 2016-04-02: Copy the above --> |
+ | |data5={{#if: {{{title|}}}| {{#if: {{#ask: [[Has deputy::{{{title|}}}]]}}| {{#if: {{{start|}}}| {{#if: {{{end|}}}| | ||
+ | {{#ask: [[Constitutes::Posting]][[Has jobTitle::{{#ask: [[Has deputy::{{{title|}}}]]|link=none}}]][[Start::> {{{start|}}}]][[Start::<<{{{end|}}}]] | ||
+ | }} | ||
+ | }}}}}}}} | ||
|label6=Appointed by | |label6=Appointed by | ||
− | |data6={{ArrayMapListLink|{{{location|}}}}} | + | |data6={{ArrayMapListLink|{{{appointer|}}}}} |
− | | | + | |label8=Nominated by |
− | | | + | |data8={{ArrayMapListLink|{{{nominator|}}}}} |
+ | |label10=Location | ||
+ | |data10={{ArrayMapListLink|{{{location|}}}}} | ||
+ | |label12=Preceded by | ||
+ | <!-- 2016-04-03: Shouldn't put self there --> | ||
+ | |data12={{#if: {{{title|}}}|{{#switch: {{{title|}}} | ||
+ | |?= | ||
+ | |??= | ||
+ | |???= | ||
+ | |{{#if: {{{start|}}}|{{#switch: {{{start|}}} | ||
+ | |?= | ||
+ | |??= | ||
+ | |???= | ||
+ | |{{#ask: [[Next::{{{start|}}}]][[Has jobTitle::{{{title|}}}]][[-Has subobject::!{{FULLPAGENAME}}]] }}{{#ask: [[End::{{date-1|{{{start|}}}}}]][[Has jobTitle::{{{title|}}}]][[-Has subobject::!{{FULLPAGENAME}}]] }}{{#ask: [[End::{{{start|}}}]][[Has jobTitle::{{{title|}}}]][[-Has subobject::!{{FULLPAGENAME}}]]}} }} }} }} }} | ||
+ | |label13=Succeeded by | ||
+ | <!-- 2016-04-03: Shouldn't put self there --> | ||
+ | |data13={{#if: {{{title|}}}|{{#switch: {{{title|}}} | ||
|?= | |?= | ||
|??= | |??= | ||
|???= | |???= | ||
− | |{{#if: {{{ | + | |{{#if: {{{next|}}}|{{#ask: [[Start::{{{next|}}}]][[Has jobTitle::{{{title|}}}]][[-Has subobject::!{{FULLPAGENAME}}]] }}|{{#if: {{{end|}}}|{{#switch: {{{end|}}} |
− | |||
− | |||
|?= | |?= | ||
|??= | |??= | ||
|???= | |???= | ||
− | + | |{{#ask: [[Start::{{date+1|{{{end|}}}}}]][[Has jobTitle::{{{title|}}}]][[-Has subobject::!{{FULLPAGENAME}}]] }}{{#ask: [[Start::{{{end|}}}]][[Has jobTitle::{{{title|}}}]][[-Has subobject::!{{FULLPAGENAME}}]] }} }} }} }} }} }} | |
}} | }} | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 00:16, 25 August 2022
This template is for use in the |employment category of Wikispooks pages about people.
This to be used once per stint of employment. All the parameters are optional.
Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameterswere formerly available, but have been upgraded. Some may still work, but do not use these.
Usage:
{{job
|title=Pagename of the job, e.g. US President. The current standard practice is not to use commas in the title.
|start= Date it began (Property:Start)
|start_by= Date by which it had begun (Property:Start_by) Not yet implemented
|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:Description)
|appointer=Pagename of the person who appointed this job holder (Property:Has appointer)
|nominator=Pagename of the person who nominated this job holder (Property:Has nominator)
|location=Where the job was based (Property:Has location)
|ref=Content of ref(s) about this job
|acting=Yes (For acting appointees)
|employer=Pagename of the employer (Property:Has employer) - Generally this should be a group, not a person's name. Usually used for obscure jobs, since if the job already exists as a page, the information is redundant.
|deputies=Comma separated list of pagename(s) of the deputies (Property:Has deputy) (Experimental) (Should be auto generated)
}}