跳转到内容

Template:Officeholder table/doc

维基百科,自由的百科全书

The following templates, {{Officeholder table start}}, {{Officeholder table}} and {{Officeholder table end}} can be used to create a uniform lists in a table format across different types of executives (e.g. politicians, military officers, government officials and others).

Disadvantages

[编辑]

Our policy at WP:IMGSIZE states unequivocally

"Except with very good reason, do not use px ... which forces a fixed image width. In most cases upright=scaling factor should be used, thereby respecting the user's base preference (which may have been selected for that user's particular devices)."

However, this template can not utilize relative sizing.

Also, our policy at WP:MOSALT says "Alternative text is text associated with an image that serves the same purpose and conveys the same essential information as the image. In situations where the image is not available to the reader, perhaps because they have turned off images in their web browser or are using a screen reader due to a visual impairment, the alternative text ensures that no information or functionality is lost. Absent or unhelpful alternative text can be a source of frustration for visually impaired users."

"On Wikipedia, alternative text is typically supplied through a combination of the image caption and the text supplied for the image alt parameter in the MediaWiki markup."

However, this template can not utilize the image alt parameter.

Consequently, before using this template, serious consideration should be given to whether using this template offers any significant advantages that override the two policies outlined above.

Parameters

[编辑]

Officeholder table start

[编辑]
Parameter Description Example Default value
showorder = y Creates a column for numbering the persons who is displayed in the list.   not displayed
showseat = y Creates a column for seat numbers. This parameter can be used in the lists of members of legislative Assemblies.   not displayed
showimage = y Creates a column for portrait photos.   not displayed
image_title Headline for image. It is used with the parameter showimage = y. Portrait empty
officeholder_title Title of the position of the list relates to. Minister of Finance Name
showtitle = y Creates the column title. It can be used in lists where different officeholders had different titles.   not displayed
showtermstart = n Hides the column for the start of the term of service.   displayed
showtermend = n Hides the column for the end of the term of service.   displayed
showtimeinoffice = y Creates the column time in office.   not displayed
showparty = n Hides the column for political party.   displayed
showotherparty = y Displays a column for alternative party.   not displayed
otherparty_title Title for the column alternative party. It is used with the parameter showotherparty = y.   not displayed
showelection = y Creates column for elections. It can be used in lists of officeholders that are elected to the position.   not displayed
election_title Headline for election. It is used with the parameter showelection = y. Presidential election Election
showconstituency = y Creates the column constituency. It can be used in the lists of members of legislative Assemblies.   not displayed
showdefencebranch = y Creates a column for military branches. It can be used in lists of military officers.   not displayed
showpreviousoffice = y Creates a column for the previous office of the listed person.   not displayed
defence_branch_title = y Headline for the column military branch. It is used with the parameter showdefencebranch = y. Defence branch Defence branch
showaltofficeholder = y Creates a column for alternative officeholders (e.g. head of government or deputy).   not displayed
alt_officeholder_title Headline for the column alternative officeholder. It is used with the parameter showaltofficeholder = y. Vice President
showcoalition = y Creates a column for the parties in a coalition government. It can be used in lists of heads of government.   not displayed
showcabinet = y Creates a column for cabinets.   not displayed
showref = y Creates a column for citing sources.   not displayed

Usage

[编辑]

The template {{Officeholder table start}} create table headers and is added into the top of the table. Then put in a {{Officeholder table}} for each new officeholders in chronological order, with the first one in the top. The template {{Officeholder table end}} completes the table and are placed at the bottom of the table.

{{Officeholder table start
| showorder                     = 
| showseat                      = 
| showimage                     = 
| officeholder_title            = 
| showtitle                     = 
| showtermstart                 = 
| showtermend                   = 
| showparty                     = 
| showotherparty                = 
| otherparty_title              = 
| showelection                  = 
| election_title                = 
| showconstituency              = 
| showtermlenght                = 
| showdefencebranch             = 
| defence_branch_title          = 
| showpreviousoffice            = 
| showaltofficeholder           = 
| alt_officeholder_title        = 
| showcabinet                   = 
| cabinet_title                 = 
| showref                       = 
}}

{{Officeholder table
| order                         = 
| seat                          = 
| image                         = |bSize = |cWidth = |cHeight = |oTop = |oLeft = 
| military_rank                 = 
| officeholder                  = 
| officeholder_sort             = 
| officeholder_altname          = 
| officeholder_note             = 
| acting                        = y 
| born_year                     = 
| died_year                     = 
| substitute                    = 
| title                         = 
| term_start                    = 
| term_end                      = 
| timeinoffice                  = 
| died                          = y 
| party                         = 
| party_entry                   = 
| party_exit                    = 
| party_note                    = 
| party2                        = 
| party2_entry                  = 
| party2_exit                   = 
| party2_note                   = 
| party3                        = 
| party3_entry                  = 
| party3_exit                   = 
| party3_note                   = 
| party4                        = 
| party4_entry                  = 
| party4_exit                   = 
| party4_note                   = 
| party5                        = 
| party5_entry                  = 
| party5_exit                   = 
| party5_note                   = 
| otherparty                    = 
| otherparty_entry              = 
| otherparty_exit               = 
| otherparty_note               = 
| otherparty2                   = 
| otherparty2_entry             = 
| otherparty2_exit              = 
| otherparty2_note              = 
| otherparty3                   = 
| otherparty3_entry             = 
| otherparty3_exit              = 
| otherparty3_note              = 
| otherparty4                   = 
| otherparty4_entry             = 
| otherparty4_exit              = 
| otherparty4_note              = 
| otherparty5                   = 
| otherparty5_entry             = 
| otherparty5_exit              = 
| otherparty5_note              = 
| election                      = 
| election2                     = 
| election3                     = 
| election4                     = 
| election5                     = 
| constituency                  = 
| defence_branch                = 
| previous_office               = 
| alt_officeholder              = 
| alt_officeholder_sort         = 
| alt_officeholder_party        = 
| alt_officeholder_term_start   = 
| alt_officeholder_term_end     = 
| alt_officeholder2             = 
| alt_officeholder2_party       = 
| alt_officeholder2_term_start  = 
| alt_officeholder2_term_end    = 
| alt_officeholder3             = 
| alt_officeholder3_party       = 
| alt_officeholder3_term_start  = 
| alt_officeholder3_term_end    = 
| alt_officeholder4             = 
| alt_officeholder4_party       = 
| alt_officeholder4_term_start  = 
| alt_officeholder4_term_end    = 
| alt_officeholder5             = 
| alt_officeholder5_party       = 
| alt_officeholder5_term_start  = 
| alt_officeholder5_term_end    = 
| coalition                     = 
| coalition_term_start          = 
| coalition_term_end            = 
| coalition2                    = 
| coalition2_term_start         = 
| coalition2_term_end           = 
| coalition3                    = 
| coalition3_term_start         = 
| coalition3_term_end           = 
| coalition4                    = 
| coalition4_term_start         = 
| coalition4_term_end           = 
| coalition5                    = 
| coalition5_term_start         = 
| coalition5_term_end           = 
| cabinet                       = 
| cabinet_term_start            = 
| cabinet_term_end              = 
| cabinet2                      = 
| cabinet2_term_start           = 
| cabinet2_term_end             = 
| cabinet3                      = 
| cabinet3_term_start           = 
| cabinet3_term_end             = 
| cabinet4                      = 
| cabinet4_term_start           = 
| cabinet4_term_end             = 
| cabinet5                      = 
| cabinet5_term_start           = 
| cabinet5_term_end             = 
| ref                           = 
}}

{{Officeholder table end}}

Examples

[编辑]

Political lists

[编辑]

Minister

[编辑]

The following example show a people, who has served as the Minister of Justice of Sweden. One shows a how the regular table looks like, while the other shows how it looks like when the person served as an acting minister.

{{Officeholder table start
| showorder                     = y
| showimage                     = y
| showtermlenght                = y
| showaltofficeholder           = y
| alt_officeholder_title        = [[Prime Minister of Sweden|Prime Minister]]
| officeholder_title            = Minister of Justice
}}
{{Officeholder table
| order                         = –
| officeholder                  = [[Anna-Greta Leijon]]
| image                         = Anna-Greta Leijon.JPG
| officeholder_sort             = Leijon, Anna-Greta
| born_year                     = 1939
| term_start                    = {{Start date|1983|11|11}}
| term_end                      = {{Start date|1983|11|15}}
| timeinoffice                  = {{Age in years and days|1983|11|10|1983|11|15}}
| party                         = Swedish Social Democratic Party
| alt_officeholder              = [[Olof Palme]]
| alt_officeholder_sort         = Palme, Olof
| alt_officeholder_party        = Swedish Social Democratic Party
| acting                        = y
}}
{{Officeholder table
| order                         = 39
| officeholder                  = [[Beatrice Ask]]
| image                         = Beatrice Ask 1c310 7102.jpg|bSize = 100px|cWidth = 100|cHeight = 125|oTop = 7|oLeft = 0
| officeholder_sort             = Ask, Beatrice
| born_year                     = 1956
| term_start                    = {{Start date|2006|10|6}}
| term_end                      = {{Start date|2014|10|3}}
| timeinoffice                  = {{Age in years and days|2006|10|6|2014|10|3}}
| party                         = Moderate Party
| alt_officeholder              = [[Fredrik Reinfeldt]]
| alt_officeholder_sort         = Reinfeldt, Fredrik
| alt_officeholder_party        = Moderate Party
}}
{{Officeholder table end}}
任次 Minister of Justice 就职 离职 任职时间 政党 Prime Minister
Anna-Greta Leijon
Leijon, Anna-GretaAnna-Greta Leijon
(1939年出生)
[署任]
1983年11月11日 (1983-11-11)1983年11月15日 (1983-11-15)5天 [[Swedish Social Democratic Party|Party meta/shortname/Template:Swedish Social Democratic Party]]Palme, OlofOlof Palme ([[Swedish Social Democratic Party|Template:Swedish Social Democratic Party/meta/abbr]])
39
Beatrice Ask
Ask, BeatriceBeatrice Ask
(1956年出生)
2006年10月6日 (2006-10-06)2014年10月3日 (2014-10-03)7岁362天 [[Moderate Party|Party meta/shortname/Template:Moderate Party]]Reinfeldt, FredrikFredrik Reinfeldt ([[Moderate Party|Template:Moderate Party/meta/abbr]])

Prime Minister

[编辑]

An other example of a political list is the use of the template {{Officeholder table coalition}}, and the parameter order2 = y with political party. The following list show persons, who has served as Prime Minister of Denmark.

{{Officeholder table start
| showorder                        = y
| showimage                        = y
| officeholder_title               = Prime Minister
| showtermlenght                   = y
| showelection                     = y
| showcoalition                    = y
| showcabinet                      = y
| party_col                        = 1
}}
{{Officeholder table
| order2                           = 40
| image                            = Lars Løkke Rasmussen - 2009.jpg
| officeholder                     = [[Lars Løkke Rasmussen]]
| officeholder_sort                = Rasmussen, Lars Løkke
| born_year                        = 1964
| term_start                       = 5 April 2009
| term_end                         = 3 October 2011
| timeinoffice                     = {{age in years and days|2009|4|5|2011|10|3}}
| alt_party                        = Venstre (Denmark)
| election                         = —
| cabinet                          = [[Lars Løkke Rasmussen I Cabinet|L.L. Rasmussen]]
| coalition                        = {{Officeholder table coalition
  | party    = Venstre (Denmark)
  | party2   = Conservative People's Party (Denmark)
  }}
}}
{{Officeholder table
| order2                           = 41
| image                            = Helle Thorning-Schmidt portrait.jpg
| officeholder                     = [[Helle Thorning-Schmidt]]
| officeholder_sort                = Thorning-Schmidt, Helle
| born_year                        = 1966
| term_start                       = 3 October 2011
| timeinoffice                     = {{age in years and days|2011|10|3}}
| alt_party                        = Social Democrats (Denmark)
| election                         = [[Danish general election, 2011|2011]]
| cabinet                          = [[Helle Thorning-Schmidt I Cabinet|Thorning-Schmidt I]]
| coalition                        = {{Officeholder table coalition
  | party    = Social Democrats (Denmark)
  | party2   = Danish Social Liberal Party
  | party3   = Socialist People's Party (Denmark)
  }}
| coalition_term_start             = 2011
| coalition_term_end               = 2014
| cabinet2                         = [[Helle Thorning-Schmidt II Cabinet|Thorning-Schmidt II]]
| coalition2                       = {{Officeholder table coalition
  | party    = Social Democrats (Denmark)
  | party2   = Danish Social Liberal Party
  }}
| coalition2_term_start            = 2014
}}
{{Officeholder table end}}
任次 Prime Minister 就职 离职 任职时间 政党 选举 Coalition Cabinet
40
Lars Løkke Rasmussen
Rasmussen, Lars LøkkeLars Løkke Rasmussen
(1964年出生)
5 April 20093 October 20112岁181天[[Venstre (Denmark)|Template:Party meta/shortname/Venstre (Denmark)]]Template:Officeholder table coalitionL.L. Rasmussen I
41
Helle Thorning-Schmidt
Thorning-Schmidt, HelleHelle Thorning-Schmidt
(1966年出生)
3 October 201128 June 20153岁268天社会民主党2011Template:Officeholder table coalition
(2011 – 2014)
Template:Officeholder table coalition
(since 2014)
Thorning-Schmidt I
Thorning-Schmidt II

Supporting template

[编辑]

See also

[编辑]