Difference between revisions of "Template:Seats box"
From Taijitu
(Increased width) |
(Now handles case where party has all seats) |
||
Line 1: | Line 1: | ||
{|cellspacing="0" cellpadding="2" style="width: 12em; height: 1em" | {|cellspacing="0" cellpadding="2" style="width: 12em; height: 1em" | ||
− | {{# | + | {{#switch: {{{seats|0}}}| |
− | |{{!}}align="center" style="background-color: {{{color}}}; width: {{#expr:{{{seats|0}}} / {{{total}}} * 100}}%"{{!}}{{{seats|0}}} | + | | 0 = {{!}}align="center" style="background-color: darkgray;"{{!}}0/{{{total|0}}} |
− | {{!}}align="center" style="background-color: darkgray;"{{!}}/{{{total}}}}} | + | | {{{total|0}}} = {{!}}align="center" style="background-color: {{{color}}};"{{!}}{{{total|0}}}/{{{total|0}}} |
+ | | #default = {{!}}align="center" style="background-color: {{{color}}}; width: {{#expr:{{{seats|0}}} / {{{total|0}}} * 100}}%"{{!}}{{{seats|0}}} | ||
+ | {{!}}align="center" style="background-color: darkgray;"{{!}}/{{{total|0}}}}} | ||
|} | |} |
Latest revision as of 15:44, 14 September 2011
0/0 |