Template:Election: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
! style="text-align: center;" colspan="4" | {{#if: {{{icon|}}} | [[Image:{{{icon|}}}{{!}}50px]] | [[Image:flag.gif{{!}}50px]]}} <hr> | ! style="text-align: center;" colspan="4" | {{#if: {{{icon|}}} | [[Image:{{{icon|}}}{{!}}50px]] | [[Image:flag.gif{{!}}50px]]}} <hr> | ||
|- | |- | ||
| style="text-align: left;" | {{#if: {{{previous_election|}}} | {{#if: {{{previous_date |}}} | [[{{{previous_election|}}}{!}← {{{previous_date |}}}]] | [[{{{previous_election|}}}{!}← previous]] }} | }} | | style="text-align: left;" | {{#if: {{{previous_election|}}} | {{#if: {{{previous_date |}}} | [[{{{previous_election|}}} {!} ← {{{previous_date |}}}]] | [[{{{previous_election|}}} {!} ← previous]] }} | }} | ||
| style="text-align: center;" colspan="2" | {{#if: {{{election_date_start|}}} | {{{election_date_start|}}} | }} {{#if: {{{election_date_end|}}} | - {{{election_date_end|}}} | }} | | style="text-align: center;" colspan="2" | {{#if: {{{election_date_start|}}} | {{{election_date_start|}}} | }} {{#if: {{{election_date_end|}}} | - {{{election_date_end|}}} | }} | ||
| style="text-align: right;" | {{#if: {{{next_election|}}} | {{#if: {{{next_date |}}} | [[{{{next_election|}}}{!}{{{next_date |}}} →]] | [[{{{next_election|}}}{!}next →]] }} | }} | | style="text-align: right;" | {{#if: {{{next_election|}}} | {{#if: {{{next_date |}}} | [[{{{next_election|}}} {!} {{{next_date |}}} →]] | [[{{{next_election|}}} {!} next →]] }} | }} | ||
|- | |- | ||
| style="width: 90px;" | || style="width: 90px;" | || style="width: 90px;" | || style="width: 90px;" | || <!--column spacer--> | | style="width: 90px;" | || style="width: 90px;" | || style="width: 90px;" | || style="width: 90px;" | || <!--column spacer--> | ||
Line 33: | Line 33: | ||
{{#if: {{{alliance1|}}} | | {{#if: {{{alliance1|}}} | | ||
{{!}} style="text-align: left;" {{!}} '''Alliance''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance1|}}} | {{{alliance1|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance2|}}} | {{{alliance2|}}} | }}{{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance3|}}} | {{{alliance3|}}} | }} | {{!}} style="text-align: left;" {{!}} '''Alliance''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance1|}}} | {{{alliance1|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance2|}}} | {{{alliance2|}}} | }}{{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance3|}}} | {{{alliance3|}}} | }} | ||
{{!}}- | }} | {{!}}- | {{!}}- }} | ||
{{#if: {{{leader_since1|}}} | | {{#if: {{{leader_since1|}}} | | ||
{{!}} style="text-align: left;" {{!}} '''Leader since''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since1|}}} | {{{leader_since1|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since2|}}} | {{{leader_since2|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since3|}}} | {{{leader_since3|}}} | }} | {{!}} style="text-align: left;" {{!}} '''Leader since''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since1|}}} | {{{leader_since1|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since2|}}} | {{{leader_since2|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since3|}}} | {{{leader_since3|}}} | }} | ||
Line 104: | Line 104: | ||
{{!}} style="text-align: left;" {{!}} '''Swing''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing4|}}} | {{{swing4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing5|}}} | {{{swing5|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing6|}}} | {{{swing6|}}} | }} | {{!}} style="text-align: left;" {{!}} '''Swing''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing4|}}} | {{{swing4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing5|}}} | {{{swing5|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing6|}}} | {{{swing6|}}} | }} | ||
{{!}}- | }} | {{!}}- | }} | ||
| style="text-align: center;" colspan="4" | <hr>{{#if: {{{img_name|}}} | [[Image:{{{img_name|}}}{{!}}{{#if: {{{img_size|}}} | {{{img_size|}}} | 400px }}]] | }}<br><small>{{#if: {{{img_caption|}}} | {{{ | | style="text-align: center;" colspan="4" | <hr>{{#if: {{{img_name|}}} | [[Image:{{{img_name|}}}{{!}}{{#if: {{{img_size|}}} | {{{img_size|}}} | 400px }}]] | }}<br><small>{{#if: {{{img_caption|}}} | {{{img_caption|}}} | }}</small><br><hr> | ||
|- | |- | ||
| style="text-align: left;" colspan="2" | {{#if: {{{title|}}} | '''Outgoing {{{title|}}}''' | }} || style="text-align: right;" colspan="2" | {{#if: {{{posttitle|}}} | '''Outgoing {{{posttitle|}}}''' | }} | | style="text-align: left;" colspan="2" | {{#if: {{{title|}}} | '''Outgoing {{{title|}}}''' | }} || style="text-align: right;" colspan="2" | {{#if: {{{posttitle|}}} | '''Outgoing {{{posttitle|}}}''' | }} |
Revision as of 04:40, 28 April 2018
| ||||
---|---|---|---|---|
Usage
This template is for pages about elections. To use it, copy and paste the following code to the page, substituting in the necessary variables where indicated.
It will probably be updated to support more options and election types.
{{Election | icon = Icon name (Cosa, Senate, provincial flag); if empty, Talossan flag | election_name = Name of the election; if empty, page name | election_date_start = Date when the election started; only write this if single-day; if empty, not displayed | election_date_end = Date when the election ended; leave empty if single-day; if empty, not displayed | previous_election = Name of the previous election's page; if empty, not displayed | previous_date = Previous date (e.g. "2018", "Apr 2018"); if empty, "Previous" | next_election = Name of the next election's page; if empty, not displayed | next_date = Next date (e.g. "2018", "Apr 2018"); if empty, "Next" | previous_mps = List of members elected in the previous election; if empty, not displayed | elected_mps = List of members elected in this election; if empty, not displayed | seats_up = Number of seats up for reelection; if empty, the final string will not be displayed | seats_all = Number of total seats; if empty, the final string will begin with "All X seats" | seats_assembly = Name of the assembly for the seats up string; if empty, not displayed | seats_majority = Seats needed for a majority; if empty, not displayed | voters_eligible = Number of eligible voters; if empty, not displayed | voters_turnout = Turnout percentage and shift; if empty, not displayed <!-- REPLACE # WITH 1 to 6 (eg. image1...swing1 for the first party/candidate, image2...swing2, ..., image6...swing6--> <!-- A maximum of six parties are supported --> | image# = Party logo, or leader/candidate photo | colour# = Colour of the party/candidate's party | leader# = Leader of the party; intended to be mutually exclusive with candidate# | candidate# = Candidate; intended to be mutually exclusive with leader# | party# = Name of the party, or candidate's party | alliance# = Name of the alliance, or candidate's alliance | leader_since# = Date of election as leader | leader_seat# = Seat held by the leader | last_election# = Seats won and vote percentage for the last election | seats_before# = Seats held before the election | seats# = Seats won | seats_change# = Seat number change | popular_vote# = Popular vote count | percentage# = Popular vote percentage | swing# = Popular vote swing | img_name = Image/map/chart | img_size = Size of the image (eg. 400px), default 400px | img_caption = Caption of the image | title = Name of the office decided by election (only name, eg. "Seneschal") | posttitle = Office after (full string, eg. "Presumptive nominee" or "Elected Seneschal") | before_election = Previous holder of the office | before_party = Party of the incumbent/last holder | after_election = New holder of the office | after_party = Party of the new holder }}