[intranet/quota] modification du template svg de la barre d'occupation
darcs-hash:20090615093613-bd074-e2d18f3e8e151445c281538e9115949264df4267.gz
This commit is contained in:
parent
7ec896df47
commit
71d7591154
1 changed files with 9 additions and 6 deletions
|
@ -5,7 +5,10 @@
|
|||
#if $getVar('usage', False)
|
||||
|
||||
#set total = $limite
|
||||
#set barwidth = 700
|
||||
#set quota = $quota
|
||||
#set widthquota = int( barwidth * $quota/$limite )
|
||||
#set widthusage = int( barwidth * $usage/$limite )
|
||||
#set usage = $usage
|
||||
#set usage_percent = int( 100 * $usage/$limite )
|
||||
#set quota_percent = int( 100 * $quota/$limite )
|
||||
|
@ -19,16 +22,16 @@
|
|||
</defs>
|
||||
|
||||
<g font-family="Verdana" font-size="10">
|
||||
<rect x="1" y="1" width="$total" height="22" style="fill:url(#barre_gradient);stroke:black;stroke-width:2;"/>
|
||||
<line x1="$int(quota+2)" y1="15" x2="$int(quota+2)" y2="22" style="stroke:rgb(0,0,0);stroke-width:2"/>
|
||||
<rect x="1" y="1" width="$barwidth" height="22" style="fill:url(#barre_gradient);stroke:black;stroke-width:2;"/>
|
||||
<line x1="$int(widthquota+2)" y1="15" x2="$int(widthquota+2)" y2="22" style="stroke:rgb(0,0,0);stroke-width:2"/>
|
||||
<text x="2" y="40">0Mo</text>
|
||||
<text x="$int(quota+2)" y="40">$int(quota) Mo</text>
|
||||
<text x="$int(total+2)" y="40">$int(total) Mo</text>
|
||||
<text x="$int(widthquota-15)" y="40">$int(quota) Mo</text>
|
||||
<text x="$int(barwidth+5)" y="40">$int(total) Mo</text>
|
||||
</g>
|
||||
|
||||
<g font-family="Verdana" font-size="10">
|
||||
<rect x="2" y="2" width="$usage" height="20" style="fill:white;opacity:0.7"/>
|
||||
<line x1="$int(usage+2)" y1="2" x2="$int(usage+2)" y2="22" style="stroke:rgb(99,99,99);stroke-width:1"/>
|
||||
<rect x="2" y="2" width="$widthusage" height="20" style="fill:white;opacity:0.7"/>
|
||||
<line x1="$int(widthusage+2)" y1="2" x2="$int(widthusage+2)" y2="22" style="stroke:rgb(99,99,99);stroke-width:1"/>
|
||||
<text x="4" y="15">$percents%</text>
|
||||
</g>
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
Loading…
Add table
Add a link
Reference in a new issue