changeset 2859:84a9a0cc1ab8

remove jinja filesizeformat from Item Sizes, fix col alignment error introduced by addition of filesizeformat
author RogerHaase <haaserd@gmail.com>
date Sun, 30 Nov 2014 11:25:50 -0700
parents a205c67d91c1
children 233d63abbdaf
files MoinMoin/apps/admin/templates/user/itemsize.html MoinMoin/templates/utils.html
diffstat 2 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/templates/user/itemsize.html	Sun Nov 30 10:09:08 2014 -0700
+++ b/MoinMoin/apps/admin/templates/user/itemsize.html	Sun Nov 30 11:25:50 2014 -0700
@@ -2,5 +2,5 @@
 {% extends theme("layout.html") %}
 {% block content %}
     <h1>{{ _("Item Sizes (last revision)") }}</h1>
-    {{ utils.table(headings, rows, filesize_cols=[1], itemname_cols=[2]) }}
+    {{ utils.table(headings, rows, itemname_cols=[2]) }}
 {% endblock %}
--- a/MoinMoin/templates/utils.html	Sun Nov 30 10:09:08 2014 -0700
+++ b/MoinMoin/templates/utils.html	Sun Nov 30 11:25:50 2014 -0700
@@ -23,7 +23,7 @@
 {% endmacro %}
 
 
-{% macro table(headings, rows, itemname_cols=[], url_cols=[], filesize_cols=[]) %}
+{% macro table(headings, rows, itemname_cols=[], url_cols=[]) %}
     <table class="zebra table table-hover">
         <thead>
             <tr>
@@ -40,9 +40,7 @@
             {% for row in rows %}
                 <tr>
                     {% for col in row %}
-                        {% if loop.index in filesize_cols %}
-                            <td>{{ col|filesizeformat }}</td>
-                        {% elif col is number %}
+                        {% if col is number %}
                             <td class="moin-integer">{{ col }}</td>
                         {% elif loop.index in itemname_cols %}
                             <td><a href="{{ url_for('frontend.show_item', item_name=col) }}">{{ col }}</a></td>