Template:Referendum: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 11: Line 11:
|bgcolor=f9f9f9 align=left |{{{Answer1}}}
|bgcolor=f9f9f9 align=left |{{{Answer1}}}
|bgcolor=f9f9f9 align=right|{{formatnum:{{{Answer1number}}}}}
|bgcolor=f9f9f9 align=right|{{formatnum:{{{Answer1number}}}}}
|bgcolor=f9f9f9 align=right|{{#expr:({{{Answer1number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|1}})*100 round 2}}%
|bgcolor=f9f9f9 align=right|{{#iferror:{{#expr:({{{Answer1number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}})*100 round 2}}|0}}%
|- style="border-width: 20px"
|- style="border-width: 20px"
|bgcolor=f9f9f9 align=left |{{{Answer2}}}
|bgcolor=f9f9f9 align=left |{{{Answer2}}}
|bgcolor=f9f9f9 align=right|{{formatnum:{{{Answer2number}}}}}
|bgcolor=f9f9f9 align=right|{{formatnum:{{{Answer2number}}}}}
|bgcolor=f9f9f9 align=right|{{#expr:({{{Answer2number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|1}})*100 round 2}}%{{#if:{{{Answer3|}}}|<br>
|bgcolor=f9f9f9 align=right|{{#iferror:{{#expr:({{{Answer2number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}})*100 round 2}}|0}}%{{#if:{{{Answer3|}}}|<br>
{{!}}-
{{!}}-
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer3}}}
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer3}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer3number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer3number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer3number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|1}})*100 round 2}}%|}}{{#if:{{{Answer4|}}}|<br>
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#iferror:{{#expr:({{{Answer3number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}})*100 round 2}}|0}}%|}}{{#if:{{{Answer4|}}}|<br>
{{!}}-
{{!}}-
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer4}}}
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer4}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer4number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer4number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer4number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|1}})*100 round 2}}%|}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#iferror:{{#expr:({{{Answer4number|0}}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}})*100 round 2}}|0}}%|}}
|-
|-
|bgcolor=eeeeee align=left |Valid votes
|bgcolor=eeeeee align=left |Valid votes
Line 54: Line 54:
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer5}}}
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer5}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer5number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer5number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer5number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|1}})*100 round 2}}%
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#iferror:{{#expr:({{{Answer5number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}})*100 round 2}}|0}}%
{{!}}- style="border-width: 20px"
{{!}}- style="border-width: 20px"
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer6}}}
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer6}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer6number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer6number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer6number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|1}})*100 round 2}}%{{#if:{{{Answer7|}}}|<br>
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#iferror:{{#expr:({{{Answer6number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}})*100 round 2}}|0}}%{{#if:{{{Answer7|}}}|<br>
{{!}}-
{{!}}-
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer7}}}
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer7}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer7number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer7number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer7number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|1}})*100 round 2}}%|}}{{#if:{{{Answer8|}}}|<br>
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#iferror:{{#expr:({{{Answer7number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}})*100 round 2}}|0}}%|}}{{#if:{{{Answer8|}}}|<br>
{{!}}-
{{!}}-
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer8}}}
{{!}}bgcolor=f9f9f9 align=left {{!}} {{{Answer8}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer8number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{formatnum:{{{Answer8number}}}}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#expr:({{{Answer8number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|1}})*100 round 2}}% |}}
{{!}}bgcolor=f9f9f9 align=right{{!}} {{#iferror:{{#expr:({{{Answer8number|0}}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}})*100 round 2}}|0}}% |}}
{{!}}-
{{!}}-
{{!}}bgcolor=eeeeee align=left {{!}} Valid votes
{{!}}bgcolor=eeeeee align=left {{!}} Valid votes

Revision as of 01:04, 24 November 2020

Referendum
{{{Question1}}}
Results
Votes %
{{{Answer1}}} {{{Answer1number}}} 0%
{{{Answer2}}} {{{Answer2number}}} 0%
Valid votes 0 0%
Invalid votes 0 0%
Total votes 0 100%


[edit] [purge] 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 = 
}}