Difference between revisions of "Template:Past Poll"
(Saving this for now.) |
(Now to go test it out in the Sandbox.) |
||
Line 1: | Line 1: | ||
− | {| style="border:1px solid #000000; border-collapse:collapse; margin:1px; width:auto;" | + | <includeonly>{| style="border:1px solid #000000; border-collapse:collapse; margin:1px; width:auto;" |
|- | |- | ||
! colspan="2" style="background-color:#9F3215; border:1px solid #000000; color:#FFFFFF; padding:3px;" | {{{question}}} | ! colspan="2" style="background-color:#9F3215; border:1px solid #000000; color:#FFFFFF; padding:3px;" | {{{question}}} | ||
Line 8: | Line 8: | ||
|- | |- | ||
| style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result1}}}% | | style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result1}}}% | ||
− | {{#ifexpr: {{{result1}}} > 0 | + | {{#if: {{{result1|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result1}}} * 2}}px;" {{!}} | + | | {{#ifexpr: {{{result1}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result1}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
|} | |} | ||
Line 18: | Line 20: | ||
|- | |- | ||
| style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result2}}}% | | style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" | {{{result2}}}% | ||
− | {{#ifexpr: {{{result2}}} > 0 | + | {{#if: {{{result2|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result2}}} * 2}}px;" {{!}} | + | | {{#ifexpr: {{{result2}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result2}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
|} | |} | ||
− | {{#if: {{{option3 | + | {{#if: {{{option3}}} |
| {{!}}- | | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option3 | + | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option3}}} |
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | {{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | ||
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | {{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result3 | + | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result3}}}% |
− | {{# | + | {{#if: {{{result3|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result3 | + | | {{#ifexpr: {{{result3}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result3}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
− | {{#if:{{{option4 | + | {{#if: {{{option4}}} |
| {{!}}- | | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option4 | + | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option4}}} |
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | {{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | ||
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | {{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result4 | + | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result4}}}% |
− | {{# | + | {{#if: {{{result4|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result4 | + | | {{#ifexpr: {{{result4}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result4}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
− | {{#if:{{{option5 | + | {{#if: {{{option5}}} |
| {{!}}- | | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option5 | + | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option5}}} |
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | {{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | ||
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | {{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result5 | + | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result5}}}% |
− | {{# | + | {{#if: {{{result5|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result5 | + | | {{#ifexpr: {{{result5}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result5}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
− | {{#if:{{{option6 | + | {{#if: {{{option6}}} |
| {{!}}- | | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option6 | + | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option6}}} |
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | {{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | ||
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | {{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result6 | + | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result6}}}% |
− | {{# | + | {{#if: {{{result6|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result6 | + | | {{#ifexpr: {{{result6}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result6}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
− | {{#if:{{{option7 | + | {{#if: {{{option7}}} |
| {{!}}- | | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option7 | + | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option7}}} |
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | {{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | ||
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | {{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result7 | + | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result7}}}% |
− | {{# | + | {{#if: {{{result7|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result7 | + | | {{#ifexpr: {{{result7}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result7}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
− | {{#if:{{{option8 | + | {{#if: {{{option8}}} |
| {{!}}- | | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option8 | + | {{!}} style="background-color:#F6F6F6; padding:3px;" {{!}} {{{option8}}} |
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | {{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}} | ||
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | {{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;" | ||
{{!}}- | {{!}}- | ||
− | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result8 | + | {{!}} style="background-color:#F6F6F6; font-size:10px; padding-right:3px; text-align:right;" {{!}} {{{result8}}}% |
− | {{# | + | {{#if: {{{result8|}}} |
− | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr:{{{result8 | + | | {{#ifexpr: {{{result8}}} > 0 |
+ | | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result8}}} * 2}}px;" {{!}} | ||
+ | }} | ||
}} | }} | ||
{{!}}} | {{!}}} | ||
Line 95: | Line 111: | ||
}} | }} | ||
|- | |- | ||
− | | colspan="3" style="background-color:#F6F6F6; font-size:10px; padding:3px; text-align:right;" | ({{{totalvotes | + | | colspan="3" style="background-color:#F6F6F6; font-size:10px; padding:3px; text-align:right;" | ({{{totalvotes}}} votes total) |
− | |}[[Template:Past Poll]] is designed for use on the [[UOGuide:Polls|Past Polls]] page to display | + | |}</includeonly>[[Template:Past Poll]] is designed for use on the [[UOGuide:Polls|Past Polls]] page to display a poll that has was once featured on the front page of UOGuide and has since been archived. |
+ | |||
+ | ==Template== | ||
+ | <pre> | ||
+ | {{Past Poll | ||
+ | |question= | ||
+ | |option1= | ||
+ | |result1= | ||
+ | |option2= | ||
+ | |result2= | ||
+ | |option3= | ||
+ | |result3= | ||
+ | |option4= | ||
+ | |result4= | ||
+ | |option5= | ||
+ | |result5= | ||
+ | |option6= | ||
+ | |result6= | ||
+ | |option7= | ||
+ | |result7= | ||
+ | |option8= | ||
+ | |result8= | ||
+ | |totalvotes= | ||
+ | }} | ||
+ | </pre> |
Revision as of 10:25, 1 September 2009
Template:Past Poll is designed for use on the Past Polls page to display a poll that has was once featured on the front page of UOGuide and has since been archived.
Template
{{Past Poll |question= |option1= |result1= |option2= |result2= |option3= |result3= |option4= |result4= |option5= |result5= |option6= |result6= |option7= |result7= |option8= |result8= |totalvotes= }}