« Modèle:Progression » : différence entre les versions
Aller à la navigation
Aller à la recherche
Modèle>Spooky m (→Exemple : test 1%) |
Modèle>Spooky m (syntaxe !) |
||
| Ligne 4 : | Ligne 4 : | ||
| | | | ||
{|style="border: 1px solid black" cellspacing=1 width=100% height=15x | {|style="border: 1px solid black" cellspacing=1 width=100% height=15x | ||
{{#ifeq:{{{1|}}}|0|| {{!}}style="background: #7fff00; width: {{#ifexpr:{{{1}}} | {{#ifeq:{{{1|}}}|0|| {{!}}style="background: #7fff00; width: {{#ifexpr:({{{1}}}<1)|1%|{{{1}}}%}}"{{!}} }} | ||
{{#ifeq:{{{1|}}}|100|| {{!}}style="background: #ff7f50;" {{!}} }} | {{#ifeq:{{{1|}}}|100|| {{!}}style="background: #ff7f50;" {{!}} }} | ||
|} | |} | ||
Version du 2 février 2007 à 20:54
Syntaxe
- {{Progression|pourcentage}}
Le paramètre pourcentage est un nombre compris entre 0 et 100, non suivi du caractère %.
Si le nombre est décimal, le séparateur doit être le point et non la virgule, contrairement aux conventions typographiques utilisées en français.
Exemple
{{Progression|0}} donne :
| 0% accompli (estimation) | |
|
|
{{Progression|0.5}} donne :
| 0,5% accompli (estimation) | ||
|
|
{{Progression|0.5}} donne :
| 1% accompli (estimation) | ||
|
|
{{Progression|36.7}} donne :
| 36,7% accompli (estimation) | ||
|
|
{{Progression|100}} donne :
| 100% accompli (estimation) | |
|
|
Voir aussi