Template:PercentageMeter

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
 
<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}}%">Income: € {{{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}}%">All expenses: € {{{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: € {{{total|100}}} ({{#expr: (100 - ({{{1|<noinclude>2</noinclude>0}}}/{{{total|100}}}) * 100) round 1}}%)</td>
  
 
</tr></table>
 
</tr></table>

Revision as of 00:29, 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>}}
Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools