[Intranet] On désactive le module quota. Ah, et on committe les trucs que les autres n'ont pas commité.
Ignore-this: 57875a22b7c26a01dcd51b9331c93997 darcs-hash:20121031171234-b6762-b3c312f180024717569702a58bd59ed8a3cc0a83.gz
This commit is contained in:
parent
823e52de6c
commit
a74d31de0e
9 changed files with 9 additions and 8 deletions
43
intranet/disabled.modules/quota/templates/barre.svg.tmpl
Normal file
43
intranet/disabled.modules/quota/templates/barre.svg.tmpl
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
#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 )
|
||||
|
||||
<defs>
|
||||
<linearGradient id="barre_gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
||||
<stop offset="0%" style="stop-color:rgb(0,255,0);stop-opacity:1"/>
|
||||
<stop offset="$quota_percent%" style="stop-color:rgb(255,255,0);stop-opacity:1"/>
|
||||
<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<g font-family="Verdana" font-size="10">
|
||||
<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(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="$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>
|
||||
|
||||
#else
|
||||
<g font-family="Verdana" font-size="10">
|
||||
<text x="21" y="35" style="color:red">$getVar('erreur', 'BROKEN')</text>
|
||||
</g>
|
||||
#end if
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
13
intranet/disabled.modules/quota/templates/quota.tmpl
Normal file
13
intranet/disabled.modules/quota/templates/quota.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="framed_gray">
|
||||
|
||||
#for un_truc in $quotas
|
||||
<h3>$un_truc.label</h3>
|
||||
<embed src="$un_truc.svg_url" width="100%" height="50"
|
||||
type="image/svg+xml"
|
||||
pluginspage="http://www.adobe.com/svg/viewer/install/" />
|
||||
|
||||
#end for
|
||||
|
||||
<div style="text-align:right;">Si les graphiques ne s'affichent pas, essayez la <a href="index_html">version html</a></div>
|
||||
|
||||
</div>
|
22
intranet/disabled.modules/quota/templates/quota_html.tmpl
Normal file
22
intranet/disabled.modules/quota/templates/quota_html.tmpl
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div class="framed_gray">
|
||||
|
||||
|
||||
#for un_truc in $quotas
|
||||
<h3>$un_truc.label</h3>
|
||||
#set total = $un_truc.limite
|
||||
#set usage = int( 100 * $un_truc.usage/$un_truc.limite )
|
||||
#set quota = int( 100 * $un_truc.quota/$un_truc.limite )
|
||||
<div style="float:left;height:1.2em;width:40%;border:thin black solid;position:relative;background:#f99">
|
||||
<div style="float:left;height:.8em;width:$usage%;background:blue;position:absolute;top:0;left:0;">
|
||||
<span style="display:none">
|
||||
$un_truc.text_equiv
|
||||
</span>
|
||||
</div>
|
||||
<div style="float:left;height:1.2em;width:$quota%;background:#aaa"></div>
|
||||
</div> $un_truc['%'] %
|
||||
|
||||
#end for
|
||||
|
||||
<div style="text-align:right;"><a href="index">version svg</a></div>
|
||||
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue