Difference between revisions of "Template:Infobox election/row"
Jump to navigation
Jump to search
Template documentation
imported>Frietjes (simplify) |
imported>Χ (primary type per Template talk:Infobox election) |
||
| Line 24: | Line 24: | ||
{{#if:{{{nominee1|}}}{{{nominee2|}}}{{{nominee3|}}}|<!-- Presidential & by-election nominee --> | {{#if:{{{nominee1|}}}{{{nominee2|}}}{{{nominee3|}}}|<!-- Presidential & by-election nominee --> | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | primary | ||
| + | | Primary | ||
| presidential | | presidential | ||
| Presidential | | Presidential | ||
| Line 71: | Line 73: | ||
{{#if:{{{home_state1|}}}{{{home_state2|}}}{{{home_state3|}}}| | {{#if:{{{home_state1|}}}{{{home_state2|}}}{{{home_state3|}}}| | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | primary | ||
| + | | Primary | ||
| presidential | | presidential | ||
| Presidential = | | Presidential = | ||
| Line 108: | Line 112: | ||
|-<!-- Delegate count --> | |-<!-- Delegate count --> | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | primary | ||
| + | | Primary | ||
| presidential | | presidential | ||
| Presidential = | | Presidential = | ||
| Line 120: | Line 126: | ||
|-<!-- States carried --> | |-<!-- States carried --> | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | primary | ||
| + | | Primary = | ||
| + | {{#if:{{{states_carried1|}}}{{{states_carried2|}}}{{{states_carried3|}}}| | ||
| + | ! style="text-align:left" {{!}} Delegations with plurality | ||
| + | {{!}} style="{{#if:{{{states_carried2|}}}|width:75px;}}text-align:center" {{!}} {{{states_carried1|}}} | ||
| + | {{!}} style="{{#if:{{{states_carried2|}}}|width:75px;}}text-align:center" {{!}} {{{states_carried2|}}} | ||
| + | {{#if:{{{col3|}}}|{{!}} style="{{#if:{{{states_carried2|}}}|width:75px;}}text-align:center" {{!}} {{{states_carried3|}}}}} | ||
| + | }} | ||
| presidential | | presidential | ||
| Presidential = | | Presidential = | ||
| Line 253: | Line 267: | ||
}} | }} | ||
|-<!-- popular vote --> | |-<!-- popular vote --> | ||
| − | {{#ifeq:{{{ongoing|}}}|yes|| | + | {{#ifexpr:not {{#ifeq:{{{ongoing|}}}|yes|1|0}} or {{#ifeq:{{{type|}}}|primary|1|0}}| |
{{#if:{{{popular_vote1|}}}{{{popular_vote2|}}}{{{popular_vote3|}}}| | {{#if:{{{popular_vote1|}}}{{{popular_vote2|}}}{{{popular_vote3|}}}| | ||
! style="text-align:left" {{!}} {{{vote_type|Popular}}} vote | ! style="text-align:left" {{!}} {{{vote_type|Popular}}} vote | ||
| Line 262: | Line 276: | ||
}} | }} | ||
|-<!-- percentage --> | |-<!-- percentage --> | ||
| − | {{#ifeq:{{{ongoing|}}}|yes|| | + | {{#ifexpr:not {{#ifeq:{{{ongoing|}}}|yes|1|0}} or {{#ifeq:{{{type|}}}|primary|1|0}}| |
{{#if:{{{percentage1|}}}{{{percentage2|}}}{{{percentage3|}}}| | {{#if:{{{percentage1|}}}{{{percentage2|}}}{{{percentage3|}}}| | ||
! style="text-align:left" {{!}} Percentage | ! style="text-align:left" {{!}} Percentage | ||
| Line 272: | Line 286: | ||
|-<!-- Counties won --> | |-<!-- Counties won --> | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | primary | ||
| + | | Primary | ||
| presidential | | presidential | ||
| Presidential = | | Presidential = | ||
| − | {{#ifeq:{{{ongoing|}}}|yes|| | + | {{#ifexpr:not {{#ifeq:{{{ongoing|}}}|yes|1|0}} or {{#ifeq:{{{type|}}}|primary|1|0}}| |
{{#if:{{{counties_won1|}}}{{{counties_won2|}}}{{{counties_won3|}}}| | {{#if:{{{counties_won1|}}}{{{counties_won2|}}}{{{counties_won3|}}}| | ||
! style="text-align:left" {{!}} Counties won | ! style="text-align:left" {{!}} Counties won | ||
| Line 286: | Line 302: | ||
|-<!-- Counties 25% threshold --> | |-<!-- Counties 25% threshold --> | ||
{{#switch:{{{type|}}} | {{#switch:{{{type|}}} | ||
| + | | primary | ||
| + | | Primary | ||
| presidential | | presidential | ||
| Presidential = | | Presidential = | ||
| − | {{#ifeq:{{{ongoing|}}}|yes|| | + | {{#ifexpr:not {{#ifeq:{{{ongoing|}}}|yes|1|0}} or {{#ifeq:{{{type|}}}|primary|1|0}}| |
{{#if:{{{counties_threshold1|}}}{{{counties_threshold2|}}}{{{counties_threshold3|}}}| | {{#if:{{{counties_threshold1|}}}{{{counties_threshold2|}}}{{{counties_threshold3|}}}| | ||
! style="text-align:left" {{!}} Counties with 25% vote | ! style="text-align:left" {{!}} Counties with 25% vote | ||
Revision as of 14:06, 2 March 2016
This is a subtemplate of template:infobox election used to generate the candidate block rows. It should not be used directly.
| Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Subpages of this template. |