mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
list.tpl:
- add handling for quota fields (visual quota indicator) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1726 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
1 parent
a826564962
commit
7a23b3cda8
1 file changed
+18
@@ -45,6 +45,24 @@
|
||||
{foreach key=key2 item=field2 from=$value_{$key}}<p>{$field2} {/foreach}
|
||||
{elseif $field.type == 'pass'}
|
||||
(hidden)
|
||||
{elseif $field.type == 'quot'}
|
||||
{assign "tmpkey" "_{$key}_percent"}
|
||||
|
||||
{if $item[$tmpkey]>90}
|
||||
{assign var="quota_level" value="high"}
|
||||
{elseif $item[$tmpkey]>55}
|
||||
{assign var="quota_level" value="mid"}
|
||||
{else}
|
||||
{assign var="quota_level" value="low"}
|
||||
{/if}
|
||||
{if $item[$tmpkey] > -1}
|
||||
<div class="quota quota_{$quota_level}" style="width:{$item[$tmpkey] *1.2}px;"></div>
|
||||
<div class="quota_bg"></div></div>
|
||||
<div class="quota_text quota_text_{$quota_level}">{$item[$key]}</div>
|
||||
{else}
|
||||
{$item[$key]}
|
||||
{/if}
|
||||
|
||||
{elseif $field.type == 'txtl'}
|
||||
{foreach key=key2 item=field2 from=$value_{$key}}<p>{$field2} {/foreach}
|
||||
{else}
|
||||
|
||||
Reference in new issue
Block a user