From 5ef309d1d1abea79d873776a1529dd3f7eba71ab Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 13 Jun 2005 11:45:41 +0000 Subject: [PATCH] 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 --- include/functions.inc | 2 +- plugins/admin/groups/mail.tpl | 2 +- plugins/admin/systems/class_terminalInfo.inc | 2 +- plugins/personal/mail/class_mailAccount.inc | 2 +- plugins/personal/mail/generic.tpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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} -- 2.30.2