Template:PercentageMeter
From syn2cat - HackerSpace.lu
(Difference between revisions)
m |
m |
||
Line 2: | Line 2: | ||
<table border="0" style="border: 1px solid black; margin: auto; text-align:center; padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr> | <table border="0" style="border: 1px solid black; margin: auto; text-align:center; padding:1px;" width="75%" cellspacing=2 cellpadding=3><tr> | ||
<td bgcolor="lightgreen" width="{{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Pledged: € {{{1|<noinclude>2</noinclude>0}}} ({{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100 round 1}}%)</td> | <td bgcolor="lightgreen" width="{{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Pledged: € {{{1|<noinclude>2</noinclude>0}}} ({{#expr: ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100 round 1}}%)</td> | ||
− | <td bgcolor="#ff7f50" width="{{#expr: 100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Required: € {{{total|100}}} ({{#expr: (100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100) round 1}}%)</td> | + | <td bgcolor="#ff7f50" width="{{#expr: 100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100}}%">Required: € {{{ {{#expr: total - {{{1}}} }}|100}}} ({{#expr: (100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100) round 1}}%)</td> |
</tr></table> | </tr></table> |
Revision as of 00:34, 17 June 2012
Percentage meter template as borrowed from labitat.dk (Thanks guys ;))
Should be used by a semantic inline query (see Template:RadioShowPodcast), but you may also use it manually:
{{PercentageMeter|<current amount>|total=<total amount>}}