Commits

Zhang Huangbin committed 6943df8

Typo in template files.

Comments (0)

Files changed (6)

templates/default/ldap/domain/list.html

         load_jquery,
         set_account_status_img,
         display_number_of_account_limited,
-        display_progress_bar,
         display_add_domain,
         show_pages,
         with context
 
                         {% set timestamp = entries.get('createTimestamp', ['--------------'])[0] %}
 
-                        {# Get domain quota size & unit #}
-                        {% set domainQuota = accountSetting.get('domainQuota', '0:GB') |e %}
-                        {% set domainQuotaSize, domainQuotaUnit = domainQuota.split(':') %}
-
-                        {% set domainCurrentQuotaSize = entries.get('domainCurrentQuotaSize', ['0'])[0] |int %}
-
-                        {% if domainQuotaUnit == 'TB' %}
-                            {% set domainQuotaBytes = domainQuotaSize |int * 1024 * 1024 * 1024 * 1024 %}
-                        {% elif domainQuotaUnit == 'GB' %}
-                            {% set domainQuotaBytes = domainQuotaSize |int * 1024 * 1024 * 1024 %}
-                        {% else %}
-                            {% set domainQuotaBytes = domainQuotaSize |int * 1024 * 1024 %}
-                        {% endif %}
-
                         <tr class="{{ accountStatus |lower }}">
                             {% if session.get('domainGlobalAdmin') is sameas true %}
                                 <td class="checkbox"><input type="checkbox" class="checkbox " name="domainName" value="{{domain}}" /></td>
                             <td class="vcenter">{% if cn != '' and cn != domain %}{{ cn |cutString }}{% endif %}</td>
                             {# Mail user count #}
                             <td class="vcenter">
-                                {% if numberOfUsers > 0 %}
-                                    {% set percentOfNumberOfUsers = domainCurrentUserNumber |getPercentage(numberOfUsers) %}
-
-                                    <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;">{{ percentOfNumberOfUsers }}% <span class="grey">({{domainCurrentUserNumber}} {{ display_number_of_account_limited(numberOfUsers) }})</span></a>
-                                    {{ display_progress_bar(percentOfNumberOfUsers, style='thin') }}
-                                {% else %}
-                                    <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;">{{domainCurrentUserNumber}}</a>
-                                {% endif %}
+                                <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;">{{domainCurrentUserNumber}}</a>
                             </td>
 
                             <td class="vcenter">{{ timestamp |setDatetimeFormat(hour=False) }}</td>

templates/default/ldap/user/list.html

         display_subnav,
         set_account_status_img,
         highlight_username_in_mail,
-        display_progress_bar,
         show_pages,
         with context %}
 

templates/default/macros/general.html

     </div>
 {%- endmacro %}
 
-{% macro display_progress_bar(percent, tooltip=none, show_zero=false, style='normal', width='100%') -%}
-    {% set percent = percent |int %}
-    {% if percent < 0 %}
-        {% set percent = 0 %}
-    {% elif percent > 100 %}
-        {% set percent = 100 %}
-    {% endif %}
-
-    {% if tooltip is sameas none %}
-        {% set tooltip = percent |string + '%' %}
-    {% endif %}
-
-    {% if style == 'thin' %}
-        {% set height = '3px' %}
-    {% else %}
-        {% set height = '1.1em' %}
-    {% endif %}
-
-    {% if percent < 80 %}
-        {% set bgcolor = '#ACE97C' %}
-    {% elif 80 <= percent < 90 %}
-        {% set bgcolor = 'yellow' %}
-    {% elif 90 <= percent < 99 %}
-        {% set bgcolor = '#F76541' %}
-    {% else %}
-        {% set bgcolor = '#F62217' %}
-    {% endif %}
-
-    {% if percent > 0 or show_zero is sameas true %}
-        <div class="progress-container" title="{{ tooltip |e }}" style="width: {{ width |e }}; height: {{height}};">
-            <div class="progress-bar" style="height: {{height}}; width: {{percent}}%; background-color: {{bgcolor}};"></div>
-        </div>
-    {% endif %}
-{%- endmacro %}
 
 {% macro display_input_employeeid(value='') -%}
     {% if value is sameas none %}
             {% elif spare_quota_bytes |int == -1 %}
                 {% set comment = _('Set to 0 for unlimited.') %}
             {% endif %}
-
-            {% if show_used_quota is sameas true %}
-                {% if session.get('enableShowUsedQuota') is sameas true and value.isdigit() and used_quota.isdigit() %}
-                    {% set percent = used_quota |getPercentage(value |int * 1024 * 1024) %}
-                    <label class="fl-space"><em style="color: black; font-style: normal;">
-                        {{ display_progress_bar(percent, show_zero=true, width='80px') }}&nbsp;
-                        {{ _('Used') }}&nbsp;{{ used_quota |filesizeformat }}.&nbsp;({{ percent }}%)
-                    </em></label>
-                {% endif %}
-            {% endif %}
         </span>
 
         <span><input type="hidden" name="oldMailQuota" value="{{ value |e }}" /></span>

templates/default/mysql/domain/list.html

         load_jquery,
         set_account_status_img,
         display_number_of_account_limited,
-        display_progress_bar,
         display_add_domain,
         show_pages,
         with context
 
                             {#-- Users --#}
                             <td class="vcenter">
-                                {% if r.mailboxes > 0 %}
-                                    {% set percentOfNumberOfUsers = r.mailbox_count |getPercentage(r.mailboxes) %}
-
-                                    <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;">{{ percentOfNumberOfUsers }}% <span class="grey">({{ r.mailbox_count }} {{ display_number_of_account_limited(r.mailboxes) }})</span></a>
-                                    {{ display_progress_bar(percentOfNumberOfUsers, style='thin') }}
-                                {% else %}
-                                    <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;">{{ r.mailbox_count }}</a>
-                                {% endif %}
+                                <a href="{{ctx.homepath}}/users/{{domain}}" title="{{ _('List all mail users.') }}" style="text-decoration: none;">{{ r.mailbox_count }}</a>
                             </td>
 
                             <td class="vcenter">{{ r.created |setDatetimeFormat(hour=False) }}</td>

templates/default/mysql/user/list.html

         display_subnav,
         set_account_status_img,
         highlight_username_in_mail,
-        display_progress_bar,
         show_pages,
         with context %}
 
                     {### mail quota #}
 
                     {% if r.quota == 0 %}
-                        <td class="vcenter">{{ r.bytes |filesizeformat(baseMB=True) }} / {{ _('Unlimited') }}</td>
+                        <td class="vcenter">{{ _('Unlimited') }}</td>
                     {% else %}
-                        {% set percent = r.bytes |getPercentage(r.quota * 1024 * 1024) %}
-                        <td class="vcenter">
-                            <div>
-                                <span title="{{ _('Edit quota setting') }}"><a href="{{ctx.homepath}}/profile/user/general/{{username}}">{{ percent }}%</a></span>
-                                <span class="grey">(<span title="{{ _('Stored') }}">{{ r.messages }} {{_('Emails') }}/{{ r.bytes |filesizeformat }}</span>)/<span title="{{ _('Allocated') }}">{{ r.quota |filesizeformat(baseMB=True) }}</span></span>
-                            </div>
-                            {{ display_progress_bar(percent, show_zero=true, width='60%', style='thin') }}
-                        </td>
+                        <td class="vcenter">{{ r.quota |filesizeformat(baseMB=True) }}</td>
                     {% endif %}
 
                     <td class="vcenter">{{ r.created |setDatetimeFormat(hour=False) }}</td>

templates/default/mysql/user/profile.html

                         </div>{#-- .col2-3 --#}
                     </div>{#-- .columns --#}
 
-                    <div class="rule"></div>
-
                     {{ display_button_submit() }}
                 </form>
             </div>{# #profile_general #}