From: hickert Date: Mon, 13 Jun 2005 11:45:41 +0000 (+0000) Subject: addedprogressbar to M plugins/personal/mail/generic.tpl X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ef309d1d1abea79d873776a1529dd3f7eba71ab;p=gosa.git addedprogressbar to M plugins/personal/mail/generic.tpl M plugins/personal/mail/class_mailAccount.inc M plugins/admin/groups/mail.tpl M plugins/admin/systems/class_terminalInfo.inc M include/functions.inc git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@694 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index 4571a6643..495fd4574 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1746,7 +1746,7 @@ function progressbar($percentage,$width=100,$height=15,$showvalue=false) background-color:#".$color2.$color2.$color."; \">"; - if($height >10){ + if(($height >10)&&($showvalue)){ $str.= " ".$percentage."% "; diff --git a/plugins/admin/groups/mail.tpl b/plugins/admin/groups/mail.tpl index fd6ac7602..9fd577bc0 100644 --- a/plugins/admin/groups/mail.tpl +++ b/plugins/admin/groups/mail.tpl @@ -27,7 +27,7 @@
{if $quotadefined eq "true"} - + {$quotausage} {else} {t}not defined{/t} {/if} diff --git a/plugins/admin/systems/class_terminalInfo.inc b/plugins/admin/systems/class_terminalInfo.inc index 7316c3fb0..ab32135f8 100644 --- a/plugins/admin/systems/class_terminalInfo.inc +++ b/plugins/admin/systems/class_terminalInfo.inc @@ -162,7 +162,7 @@ class terminfo extends plugin $device= preg_replace('/^STRING: */', '', $device); $usage= @snmpget($host, $community, "UCD-SNMP-MIB::dskPercent.$n"); $usage= preg_replace('/^INTEGER: */', '', $usage); - $partitions.= "$device\"\"\n"; + $partitions.= "$device".progressbar($usage,100;16,true)."\n"; } $smarty->assign("partitions", $partitions); } else { diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 97b025d25..cdf374a8f 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -435,7 +435,7 @@ class mailAccount extends plugin } if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){ - $smarty->assign("quotausage", $this->quotaUsage * 100 / $this->gosaMailQuota); + $smarty->assign("quotausage", progressbar(($this->quotaUsage * 100)/ $this->gosaMailQuota,100,15,true)); $smarty->assign("quotadefined", "true"); } else { $smarty->assign("quotadefined", "false"); diff --git a/plugins/personal/mail/generic.tpl b/plugins/personal/mail/generic.tpl index 8fff52d82..7f8825415 100644 --- a/plugins/personal/mail/generic.tpl +++ b/plugins/personal/mail/generic.tpl @@ -24,7 +24,7 @@
{if $quotadefined eq "true"} - + {$quotausage} {else} {t}not defined{/t} {/if}