Template:Referendum: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
(added second question) |
No edit summary |
||
Line 10: | Line 10: | ||
|- | |- | ||
|bgcolor=f9f9f9 align=left |{{{Answer1}}} | |bgcolor=f9f9f9 align=left |{{{Answer1}}} | ||
|bgcolor=f9f9f9 align=right|{{{Answer1number}}} | |bgcolor=f9f9f9 align=right|{{formatnum:{{{Answer1number}}}}} | ||
|bgcolor=f9f9f9 align=right|{{{ | |bgcolor=f9f9f9 align=right|{{#expr:({{{Answer1number|0}}})/({{{Answer1number|1}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}})*100 round 2}}% | ||
|- style="border-width: 20px" | |- style="border-width: 20px" | ||
|bgcolor=f9f9f9 align=left |{{{Answer2}}} | |bgcolor=f9f9f9 align=left |{{{Answer2}}} | ||
|bgcolor=f9f9f9 align=right|{{{Answer2number}}} | |bgcolor=f9f9f9 align=right|{{formatnum:{{{Answer2number}}}}} | ||
|bgcolor=f9f9f9 align=right|{{{ | |bgcolor=f9f9f9 align=right|{{#expr:({{{Answer2number|0}}})/({{{Answer1number|1}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}})*100 round 2}}%{{#if:{{{Answer3|}}}|<br> | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=f9f9f9 align=left {{!}} {{ | {{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer3}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}} {{# | {{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer3number}}}}} | ||
{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer3number|0}}})/({{{Answer1number|1}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}})*100 round 2}}%|}}{{#if:{{{Answer4|}}}|<br> | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=f9f9f9 align=left {{!}} {{ | {{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer4}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}} {{# | {{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer4number}}}}} | ||
{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer4number|0}}})/({{{Answer1number|1}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}})*100 round 2}}%|}} | ||
|- | |- | ||
|bgcolor=eeeeee align=left |Valid votes | |bgcolor=eeeeee align=left |Valid votes | ||
|bgcolor=eeeeee align=right|{{{ | |bgcolor=eeeeee align=right|{{formatnum:{{#expr:{{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}}}}}} | ||
|bgcolor=eeeeee align=right|{{{ | |bgcolor=eeeeee align=right|{{#expr:({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|1}}})*100 round 2}}% | ||
|- | |- | ||
|bgcolor=eeeeee align=left |Invalid votes | |bgcolor=eeeeee align=left |Invalid votes | ||
|bgcolor=eeeeee align=right|{{{Invalid1number}}} | |bgcolor=eeeeee align=right|{{formatnum:{{{Invalid1number|0}}}}} | ||
|bgcolor=eeeeee align=right|{{{ | |bgcolor=eeeeee align=right|{{#expr:{{{Invalid1number|0}}}/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|1}}})*100 round 2}}% | ||
|- | |- | ||
!bgcolor=eeeeee align=left |Total votes | !bgcolor=eeeeee align=left |Total votes | ||
|bgcolor=eeeeee align=right|{{{ | |bgcolor=eeeeee align=right|{{formatnum:{{#expr:({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3number|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4number|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|0}}})}}}} | ||
|bgcolor=eeeeee align=right| | |bgcolor=eeeeee align=right|100%<!-- | ||
START SECOND QUESTION | START SECOND QUESTION | ||
Line 52: | Line 52: | ||
!bgcolor=e9e9e9 {{!}}% | !bgcolor=e9e9e9 {{!}}% | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=f9f9f9 align=left {{!}}{{{ | {{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer5}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}}{{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer5number}}}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}}{{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer5number|0}}})/({{{Answer5number|1}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}})*100 round 2}}% | ||
{{!}}- style="border-width: 20px" | {{!}}- style="border-width: 20px" | ||
{{!}}bgcolor=f9f9f9 align=left {{!}}{{{ | {{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer6}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}}{{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer6number}}}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}}{{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer6number|0}}})/({{{Answer5number|1}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}})*100 round 2}}%{{#if:{{{Answer7|}}}|<br> | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=f9f9f9 align=left {{!}} {{ | {{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer7}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}} {{# | {{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer7number}}}}} | ||
{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer7number|0}}})/({{{Answer5number|1}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}})*100 round 2}}%|}}{{#if:{{{Answer8|}}}|<br> | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=f9f9f9 align=left {{!}} {{ | {{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer8}}} | ||
{{!}}bgcolor=f9f9f9 align=right{{!}} {{# | {{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer8number}}}}} | ||
{{ | {{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer8number|0}}})/({{{Answer5number|1}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}})*100 round 2}}% |}} | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=eeeeee align=left {{!}}Valid votes | {{!}}bgcolor=eeeeee align=left {{!}} Valid votes | ||
{{!}}bgcolor=eeeeee align=right{{!}}{{{ | {{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{#expr:{{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}}}}}} | ||
{{!}}bgcolor=eeeeee align=right{{!}}{{{ | {{!}}bgcolor=eeeeee align=right{{!}} {{#expr:({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|1}}})*100 round 2}}% | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=eeeeee align=left {{!}}Invalid votes | {{!}}bgcolor=eeeeee align=left {{!}} Invalid votes | ||
{{!}}bgcolor=eeeeee align=right{{!}}{{{Invalid2number}}} | {{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{{Invalid2number|0}}}}} | ||
{{!}}bgcolor=eeeeee align=right{{!}}{{{ | {{!}}bgcolor=eeeeee align=right{{!}} {{#expr:{{{Invalid2number|0}}}/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|1}}})*100 round 2}}% | ||
{{!}}- | {{!}}- | ||
{{!}}bgcolor=eeeeee align=left {{!}}Total votes | {{!}}bgcolor=eeeeee align=left {{!}} Total votes | ||
{{!}}bgcolor=eeeeee align=right{{!}}{{{ | {{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{#expr:({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7number|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8number|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|0}}})}}}} | ||
{{!}}bgcolor=eeeeee align=right{{!}} | {{!}}bgcolor=eeeeee align=right{{!}} 100% |}} | ||
|} | |} | ||
Line 84: | Line 84: | ||
{{documentation}} | {{documentation}} | ||
[[Category:Infobox templates]] | [[Category:Infobox templates]] | ||
</noinclude> | </noinclude> |
Revision as of 00:51, 24 November 2020
{{{Question1}}} | ||||
Results | ||||
Votes | % | |||
---|---|---|---|---|
{{{Answer1}}} | {{{Answer1number}}} | 0% | ||
{{{Answer2}}} | {{{Answer2number}}} | 0% | ||
Valid votes | 0 | 0% | ||
Invalid votes | 0 | 0% | ||
Total votes | 0 | 100% |
[edit] [ ] Template documentation
- You can use up to 4 options per referendum
- Answers 3 and 4 are not shown when left blank
{{Referendum |Question1 = Referendum question |Answer1 = Answer 1 |Answer1number = Number of votes for answer 1 |Answer2 = |Answer2number = |Answer3 = |Answer3number = |Answer4 = |Answer4number = |Invalid1number = Number of invalid votes (must be at least 0) |Question2 = Second referendum question |Answer5 = Answer 1 to second question |Answer5number = |Answer6 = |Answer6number = |Answer7 = |Answer7number = |Answer8 = |Answer8number = |Invalid2number = }}
The above documentation is transcluded from Template:Referendum/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |