Difference between revisions of "Template:Infobox referendum/results"
Jump to navigation
Jump to search
(Wikitable) |
(Align all row titles *the same*, to the left.) |
||
| Line 1: | Line 1: | ||
| − | {| border="1" class="wikitable" style="width:25em; margin:0" | + | {| border="1" class="wikitable" style="text-align:right; width:25em; margin:0" |
| − | |- style=" | + | |- style="background-color:#E9E9E9" |
! colspan="3" | Results | ! colspan="3" | Results | ||
{{!}}- style="background-color:#EEEEEE" | {{!}}- style="background-color:#EEEEEE" | ||
{{#if: {{{yes|}}} | | {{#if: {{{yes|}}} | | ||
| − | ! style="width: 17em" {{!}} | + | ! style="width: 17em" {{!}} |
| − | ! style="width: 5em" | + | ! style="width: 5em" {{!}} Votes |
| − | ! style="width: 7em" | + | ! style="width: 7em" {{!}} Of total |
{{!}}- | {{!}}- | ||
{{#ifexpr: {{formatnum:{{{yes}}}|R}} > {{formatnum:{{{no}}}|R}} | | {{#ifexpr: {{formatnum:{{{yes}}}|R}} > {{formatnum:{{{no}}}|R}} | | ||
| − | {{!}} style="text-align: left;" | + | {{!}} style="text-align: left;" {{!}} [[Image:Yes_check.svg|14px|link=]] '''Yes''' |
| − | {{!}} style=" | + | {{!}} style="margin-right: 0.5em" {{!}} '''{{formatnum: {{formatnum:{{{yes}}}|R}} }}''' |
| − | {{!}} style=" | + | {{!}} style="margin-right: 0.5em" {{!}} '''{{percentage| {{formatnum:{{{yes}}}|R}} | {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | 2 }}''' |
{{!}}- | {{!}}- | ||
| − | {{!}} style="text-align: left;" | + | {{!}} style="text-align: left;" {{!}} [[Image:X_mark.svg|14px|link=]] No |
| − | {{!}} | + | {{!}} {{!}} {{formatnum: {{formatnum:{{{no}}}|R}} }} |
| − | {{!}} | + | {{!}} {{!}} {{percentage| {{formatnum:{{{no}}}|R}} | {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | 2 }} |
{{!}}- | {{!}}- | ||
{{#if:{{{other|}}}| | {{#if:{{{other|}}}| | ||
| − | {{!}} style="text-align: left;" | + | {{!}} style="text-align: left;" {{!}} {{#if:{{{othertype|}}}|{{{othertype}}}|Other}} |
| − | {{!}} | + | {{!}} {{!}} {{formatnum: {{formatnum:{{{other}}}|R}} }} |
| − | {{!}} | + | {{!}} {{!}} {{percentage| {{formatnum:{{{other}}}|R}} | {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | 2 }} |
}} | }} | ||
| | | | ||
| − | {{!}} style="text-align: left;" | + | {{!}} style="text-align: left;" {{!}} [[Image:Yes_check.svg|14px|link=]] Yes |
| − | {{!}} style=" | + | {{!}} style="margin-right: 0.5em" {{!}} {{formatnum: {{formatnum:{{{yes}}}|R}} }} |
| − | {{!}} style=" | + | {{!}} style="margin-right: 0.5em" {{!}} {{percentage| {{formatnum:{{{yes}}}|R}} | {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | 2 }} |
{{!}}- | {{!}}- | ||
| − | {{!}} style="text-align: left;" | + | {{!}} style="text-align: left;" {{!}} [[Image:X_mark.svg|14px|link=]] '''No''' |
| − | {{!}} style=" | + | {{!}} style="margin-right: 0.5em" {{!}} '''{{formatnum: {{formatnum:{{{no}}}|R}} }}''' |
| − | {{!}} style=" | + | {{!}} style="margin-right: 0.5em" {{!}} '''{{percentage| {{formatnum:{{{no}}}|R}} | {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | 2 }}''' |
{{!}}- | {{!}}- | ||
{{#if:{{{other|}}}| | {{#if:{{{other|}}}| | ||
| − | {{!}} style="text-align: left;" | + | {{!}} style="text-align: left;" {{!}} {{#if:{{{othertype|}}}|{{{othertype}}}|Other}} |
| − | {{!}} | + | {{!}} {{!}} {{formatnum: {{formatnum:{{{other}}}|R}} }} |
| − | {{!}} | + | {{!}} {{!}} {{percentage| {{formatnum:{{{other}}}|R}} | {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | 2 }} |
}} | }} | ||
}} | }} | ||
| Line 40: | Line 40: | ||
{{#if: {{{total|}}}{{{invalid|}}} | | {{#if: {{{total|}}}{{{invalid|}}} | | ||
{{#if:{{{invalid|Ø}}}| | {{#if:{{{invalid|Ø}}}| | ||
| − | {{!}} style="text-align: | + | {{!}} style="text-align: left" {{!}} Valid votes |
| − | {{!}} | + | {{!}} {{!}} {{formatnum: {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }} |
| − | {{!}} | + | {{!}} {{!}} {{percentage| {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} + {{formatnum:{{{invalid}}}|R}} }}}}|R}} | 2 }} |
{{!}}- style="background-color:#EEEEEE" | {{!}}- style="background-color:#EEEEEE" | ||
| − | {{!}} style="text-align: | + | {{!}} style="text-align: left" {{!}} Invalid or blank votes |
| − | {{!}} | + | {{!}} {{!}} {{formatnum: {{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}} }} |
| − | {{!}} | + | {{!}} {{!}} {{percentage| {{formatnum:{{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}}|R}} | {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} + {{formatnum:{{{invalid}}}|R}} }}}}|R}} | 2 }} |
}} | }} | ||
{{!}}- style="background-color:#EEEEEE" | {{!}}- style="background-color:#EEEEEE" | ||
| − | {{!}} style="text-align: | + | {{!}} style="text-align: left" {{!}} '''Total votes'''{{{totalref|}}} |
| − | {{!}} | + | {{!}} {{!}} '''{{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} + {{formatnum:{{{invalid}}}|R}} }}}} }}''' |
| − | {{!}} | + | {{!}} {{!}} '''100.00%''' |
}}| | }}| | ||
{{!}}- | {{!}}- | ||
| − | {{!}} colspan="3" | + | {{!}} colspan="3" style="text-align: center" {{!}} '''Result not yet known''' |
}} | }} | ||
|- style="background-color:#EEEEEE" | |- style="background-color:#EEEEEE" | ||
{{#if: {{both|{{{electorate|}}}|{{{total|}}}{{{invalid|}}}}}{{{turnoutpct|}}} | | {{#if: {{both|{{{electorate|}}}|{{{total|}}}{{{invalid|}}}}}{{{turnoutpct|}}} | | ||
| − | {{!}} style="text-align: | + | {{!}} style="text-align: left" {{!}} Voter turnout |
| − | {{!}} colspan="2" | + | {{!}} colspan="2" {{!}} {{#if:{{{turnoutpct|}}}|{{{turnoutpct}}}%|{{percentage| {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}}|R}} + {{formatnum:{{{no}}}|R}} + {{formatnum:{{#if:{{{other|}}}|{{{other}}}|0}}|R}} + {{formatnum:{{{invalid}}}|R}} }}}}|R}} | {{formatnum:{{{electorate}}}|R}} | 2 }}}} |
}} | }} | ||
|- style="background-color:#EEEEEE" | |- style="background-color:#EEEEEE" | ||
{{#if: {{{electorate|}}} | | {{#if: {{{electorate|}}} | | ||
| − | {{!}} style="text-align: | + | {{!}} style="text-align:left" {{!}} Electorate |
| − | {{!}} colspan="2" | + | {{!}} colspan="2" {{!}} {{formatnum: {{{electorate}}} }} |
}} | }} | ||
|}<noinclude> | |}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 22:32, 23 May 2015
| Results | ||
|---|---|---|
| Result not yet known |
Usage
This subtemplate of {{Infobox referendum}} is used to generate the referendum results, it should not be used directly.
Examples
{{Infobox referendum/results|yes=218,000|no=217,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 218,000 | Template:Percentage |
| 14px No | 217,000 | Template:Percentage |
{{Infobox referendum/results|yes=218,000|no=217,000|total=450,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 218,000 | Template:Percentage |
| 14px No | 217,000 | Template:Percentage |
| Valid votes | 435,000 | Template:Percentage |
| Invalid or blank votes | 15,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=217,000|no=218,000|total=450,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 217,000 | Template:Percentage |
| 14px No | 218,000 | Template:Percentage |
| Valid votes | 435,000 | Template:Percentage |
| Invalid or blank votes | 15,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=218,000|no=217,000|other=5,000|othertype=Blank votes|total=450,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 218,000 | Template:Percentage |
| 14px No | 217,000 | Template:Percentage |
| Blank votes | 5,000 | Template:Percentage |
| Valid votes | 440,000 | Template:Percentage |
| Invalid or blank votes | 10,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=218,000|no=217,000|blank=5,000|total=450,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 218,000 | Template:Percentage |
| 14px No | 217,000 | Template:Percentage |
| Valid votes | 435,000 | Template:Percentage |
| Invalid or blank votes | 15,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=218,000|no=217,000|electorate=800,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 218,000 | Template:Percentage |
| 14px No | 217,000 | Template:Percentage |
| Electorate | 800,000 | |
{{Infobox referendum/results|yes=218,000|no=217,000|total=450,000|electorate=800,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 218,000 | Template:Percentage |
| 14px No | 217,000 | Template:Percentage |
| Valid votes | 435,000 | Template:Percentage |
| Invalid or blank votes | 15,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
| Voter turnout | Template:Percentage | |
| Electorate | 800,000 | |
{{Infobox referendum/results|yes=217,000|no=218,000|total=450,000|electorate=800,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 217,000 | Template:Percentage |
| 14px No | 218,000 | Template:Percentage |
| Valid votes | 435,000 | Template:Percentage |
| Invalid or blank votes | 15,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
| Voter turnout | Template:Percentage | |
| Electorate | 800,000 | |
{{Infobox referendum/results|yes=217,000|no=218,000|invalid=15,000|electorate=800,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 217,000 | Template:Percentage |
| 14px No | 218,000 | Template:Percentage |
| Valid votes | 435,000 | Template:Percentage |
| Invalid or blank votes | 15,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
| Voter turnout | Template:Percentage | |
| Electorate | 800,000 | |
{{Infobox referendum/results|yes=217,000|no=218,000|invalid=|total=450,000|electorate=800,000}}
| Results | ||
|---|---|---|
| Votes | Of total | |
| File:Yes check.svg Yes | 217,000 | Template:Percentage |
| 14px No | 218,000 | Template:Percentage |
| Total votes | 450,000 | 100.00% |
| Voter turnout | Template:Percentage | |
| Electorate | 800,000 | |
{{Infobox referendum/results|electorate=800,000}}
| Results | ||
|---|---|---|
| Result not yet known | ||
| Electorate | 800,000 | |
{{Infobox referendum/results|invalid=15,000}}
| Results | ||
|---|---|---|
| Result not yet known |
{{Infobox referendum/results|turnoutpct=95.1}}
| Results | ||
|---|---|---|
| Result not yet known | ||
| Voter turnout | 95.1% | |
{{Infobox referendum/results}}
| Results | ||
|---|---|---|
| Result not yet known |
| The above documentation is transcluded from Template:Infobox referendum/results/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |