Template:Infobox legislative election: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 28: Line 28:
| data3 = {{#if:{{{reporting|}}}|{{center|{{Percentage bar|{{{reporting}}}|{{{reporting}}}%|1BCE0E}}}}as of '''{{{last_update}}} {{{time_zone}}}''' }}
| data3 = {{#if:{{{reporting|}}}|{{center|{{Percentage bar|{{{reporting}}}|{{{reporting}}}%|1BCE0E}}}}as of '''{{{last_update}}} {{{time_zone}}}''' }}


| belowstyle = padding:0 3px
| datastyle = padding:0 3px
| below = <nowiki />
| data4 = <nowiki />
{{(!}} class="wikitable" style="width: 100%; margin:0;"
{{(!}} class="wikitable" style="width: 100%; margin:0;"
{{!-}} class="nowrap"
{{!-}} class="nowrap"
Line 376: Line 376:
{{!)}}  
{{!)}}  
<div class="nowrap" style="width:100%;font-style: italic; padding:0.3em;">{{#switch:{{{ongoing|}}}|counting|yes=|#default=This lists parties that won seats. See the complete results [[#{{{results_sec|Results}}}|below]].}}</div><!--
<div class="nowrap" style="width:100%;font-style: italic; padding:0.3em;">{{#switch:{{{ongoing|}}}|counting|yes=|#default=This lists parties that won seats. See the complete results [[#{{{results_sec|Results}}}|below]].}}</div><!--
  -->{{infobox|child=yes
  -->| data11 =
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{map|}}}|upright={{#if:{{{map_upright|}}}|{{{map_upright}}}|1.3}}|alt={{{map_alt|}}}}}
{{#if:{{{map_image|}}}{{{map|}}}|<hr />{{#if:{{{map_image|}}}
| imagestyle = border-top:1px #aaa solid; padding:0.3em 0.5em;
|{{#invoke:InfoboxImage|InfoboxImage|image={{{map_image}}}|size={{{map_size|}}}|sizedefault=300px|alt={{{map_alt|}}}}}
| caption = {{{map_caption|}}}
|{{{map}}}
| belowstyle = border-top:1px #aaa solid; padding: 0.3em 0.5em;
}}{{#if:{{{map_caption|}}}|<div>{{{map_caption|}}}</div>}}
| below =  
}}
{{#if:{{{before_election|}}}{{{after_election|}}}|<table style="width: 100%; border-spacing: 0;">
| data12 =  
  <tr>
{{#if:{{{map2_image|}}}{{{map2|}}}|<hr />{{#if:{{{map2_image|}}}
  <th {{#if:{{{before_image|}}}|colspan="2"}} scope="col" style="width:50%;">{{#if:{{{before_election|}}}|{{#switch:{{{ongoing|}}}|counting|yes=Incumbent {{{title}}}|#default={{{title}}} before}}}}</th>
|{{#invoke:InfoboxImage|InfoboxImage|image={{{map2_image}}}|size={{{map2_size|}}}|sizedefault=300px|alt={{{map2_alt|}}}}}
  <th {{#if:{{{after_image|}}}|colspan="2"}} scope="col" style="width:50%; text-align:right;">{{#switch:{{{ongoing|}}}|counting|yes=|#default={{#if:{{{after_election|}}}|{{Ifempty|{{{posttitle|}}}|{{Delink|1={{{title}}}}} after}}}}}}</th>
|{{{map2}}}
</tr>
}}{{#if:{{{map2_caption|}}}|<div>{{{map2_caption|}}}</div>}}
<tr>{{#if:{{{before_image|}}}|
}}
  <td style="padding-right: 3px;">{{#invoke:InfoboxImage|InfoboxImage|image={{{before_image|}}}|size={{{before_image_size|}}}|sizedefault=x65px}}</td>}}
|data13 =
  <td style="width: 50%;">{{{before_election|}}}{{#if:{{{before_party|}}}|<br />{{Infobox election/shortname|name={{{before_party}}}}}}}</td>
{{#if:{{{map3_image|}}}{{{map3|}}}|<hr />{{#if:{{{map3_image|}}}
  <td style="text-align:right; width: 50%;">{{#switch:{{{ongoing|}}}|counting|yes=|#default={{#if:{{{after_election|}}}|{{{after_election}}}{{#if:{{{after_party|}}}|<br />{{Infobox election/shortname|name={{{after_party}}}}}}}}}}}</td>{{#if:{{{after_image|}}}|
|{{#invoke:InfoboxImage|InfoboxImage|image={{{map3_image}}}|size={{{map3_size|}}}|sizedefault=300px|alt={{{map3_alt|}}}}}
  <td style="padding-left: 3px;">{{#invoke:InfoboxImage|InfoboxImage|image={{{after_image|}}}|size={{{after_image_size|}}}|sizedefault=x65px}}</td>}}
|{{{map3}}}
</tr>
}}{{#if:{{{map3_caption|}}}|<div>{{{map3_caption|}}}</div>}}
</table>}} }}
}}
|data14 =
{{#if:{{{map4_image|}}}{{{map4|}}}|<hr />{{#if:{{{map4_image|}}}
|{{#invoke:InfoboxImage|InfoboxImage|image={{{map4_image}}}|size={{{map4_size|}}}|sizedefault=300px|alt={{{map4_alt|}}}}}
|{{{map4}}}
  }}{{#if:{{{map4_caption|}}}|<div>{{{map4_caption|}}}</div>}}
}}
| data15 = {{#if:{{{title|}}}|<hr />
{{{!}} cellspacing="0" cellpadding="0" style="background:transparent; width:100%;"
{{!}} style="width:50%; text-align:left;" {{!}}'''{{#if:{{{before_election|}}}{{{before_party|}}}|{{#ifeq:{{{type}}}|primary|Previous {{{title}}}|{{#ifeq:{{{ongoing|no}}}|yes|Incumbent {{#ifeq:{{lc:{{{title}}}}}|u.s. senator|[[List of United States senators from {{#ifeq:{{{country}}}|Georgia (U.S. state)|Georgia|{{{country}}}}}|U.S. senator]]|{{{title}}}}}|{{#ifeq:{{lc:{{{title}}}}}|u.s. senator|[[List of United States senators from {{#ifeq:{{{country}}}|Georgia (U.S. state)|Georgia|{{{country}}}}}|U.S. senator]]|{{{title}}}}} before election}}}}'''<br />
{{{before_election}}}<br />
{{#if:{{{before_party|}}}|{{Infobox election/shortname|link={{{party_name}}}|name={{{before_party}}}}} }} }}
{{!}} style="width:50%; text-align:right;" {{!}} {{#ifeq:{{{ongoing|no}}}|yes|{{#ifeq:{{{type}}}|primary|{{#if:{{{after_election|}}}|'''Presumptive {{#if:{{{posttitle|}}}|{{{posttitle}}}|{{{title}}}'''}}|}}|}} |'''{{#if:{{{posttitle|}}}|{{{posttitle}}}|{{#ifeq:{{{type}}}|primary||Elected}} {{{title}}}}}'''}} <br />
{{#ifeq:{{{ongoing|no}}}|yes|{{#ifeq:{{{type}}}|primary|{{#if:{{{after_election|}}}|{{{after_election}}}|}}}}}}
{{#ifeq:{{{ongoing|no}}}|yes||{{#if:{{{after_election|}}}|{{{after_election}}}|}}{{#if:{{{after_election|}}}{{{after_party|}}}||TBD}}<br />
{{#if:{{{after_party|}}}|{{Infobox election/shortname|link={{{party_name}}}|name={{{after_party}}}}}}} }}
{{!}}} }}
{{#if:{{{template_name|}}}|{{align|right|{{navbar|{{{template_name}}}|mini=2}}}} }}
| data16 = {{{module|}}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 06:37, 17 November 2021

[edit] [purge] Template documentation

This infobox is used for a parliamentary election with multiple parties winning seats.

Usage

{{{election_name}}}
[[File:{{{country}}} flag.png|border|50px|{{{country}}}|link=]]
← {{{previous_election}}} {{{election_date}}} {{{next_election}}} →

{{{seats_for_election}}}
{{{majority_seats}}} seats needed for a majority
Turnout {{{turnout}}}

Party Leader % Seats ±
{{{party1}}} {{{leader1}}} {{{percentage1}}} 20 +20
{{{party2}}} {{{leader2}}} {{{percentage2}}} 10 +5
This lists parties that won seats. See the complete results below.

{{{map}}}
{{{map_caption}}}

{{{title}}} before election

{{{before_election}}}
{{{before_party}}}

Elected {{{title}}}

{{{after_election}}}
{{{after_party}}}

}}

{{Infobox legislative election
| election_name      = 
| country            = 
| previous_election  = 
| next_election      = 
| election_date      = 
| seats_for_election = <!-- description-- >
| majority_seats     = <!-- number -->
| first_election     = <!-- yes/no (blank is no)-->
| opinion_polls =

| ongoing            = <!-- or future -->
| results_sec        =
| turnout            = 

| party1             = 
| colour1            = 
| leader1            = 
| percentage1        = <!-- incl. percentage sign -->
| seats1             = 
| last_election1     = <!-- Write 'new' if new party -->

| party2             = 
| colour2            = 
| leader2            = 
| percentage2        = <!-- incl. percentage sign -->
| seats2             = 
| last_election2     = <!-- Write 'new' if new party -->

| map                = 
| map_upright        = 
| map_alt            = 
| map_caption        = 

| title              = <!-- Prime Minister or similar -->
| before_election    = 
| before_party       = 
| after_election     = 
| after_party        = 
}}

Parameters

election_name
Name of the elections.
country
Name of the country or territory the elections are taking place in
previous_election
Link to the previous elections (e.g. [[1682 Natopian Frenzy election|1682]])
following_election
Link to the following elections (e.g. [[1685 Lesser Frenzy elections|1685]])
election_date
Date of the elections
seats_for_election
Description of which seats this election is about, incl. chamber and how many
majority_seats
The number of seats needed for a majority
first_election
Change to "yes" if this the first election of its kind
ongoing
Change to "yes" if the election results haven't been released
results_sec
Name of section in the article where the results of the election are listed.
turnout
% voter turnout
party1..30
Name of the party (e.g. Free Juice & Bagels Party)
leader1..30
Leader of the party
colour1..30
Custom party colour
percentage1..30
The party's popular vote share
seats1..30
Number of seats won by the party
last_election1..30
Number of seats won at the previous elections (template coding uses it to work out seat change)
heading1..30
Adds a heading above a particular results row
map
Image file of a map
map_upright
Map size scaling factor; default is 1.3
map_alt
WP:ALT
map_caption
Caption text, perhaps including a {{Legend}}
title
Title of the head of government (e.g. [[Prime Minister of the United Kingdom|Prime Minister]])
before_election
Head of government before the elections
before_party
Party of the head of government prior to the elections
before_image
Image of the outgoing head of government
after_election
Head of government after the elections
after_party
Party of the head of government after the elections
after_image
Image of the elected head of government