changeset 2703:23f66a758366

Improved Item Size view and Interwiki Names view Added bootstrap tables to both views and made item sizes in the Item Size view human readable
author Ajitesh Gupta <ajgupta93@gmail.com>
date Sat, 09 Aug 2014 23:22:15 +0530
parents e893ac118592
children 2ca8e9c8bfe2
files MoinMoin/apps/admin/templates/user/itemsize.html MoinMoin/templates/utils.html MoinMoin/themes/foobar/static/css/stylus/theme.styl MoinMoin/themes/foobar/static/css/theme.css MoinMoin/themes/modernized/static/css/stylus/theme.styl MoinMoin/themes/modernized/static/css/theme.css
diffstat 6 files changed, 6 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/templates/user/itemsize.html	Sat Aug 09 18:31:13 2014 +0530
+++ b/MoinMoin/apps/admin/templates/user/itemsize.html	Sat Aug 09 23:22:15 2014 +0530
@@ -2,5 +2,5 @@
 {% extends theme("layout.html") %}
 {% block content %}
 <h1>{{ _("Item Sizes (last revision)") }}</h1>
-{{ utils.table(headings, rows, itemname_cols=[2]) }}
+{{ utils.table(headings, rows, filesize_cols=[1], itemname_cols=[2]) }}
 {% endblock %}
--- a/MoinMoin/templates/utils.html	Sat Aug 09 18:31:13 2014 +0530
+++ b/MoinMoin/templates/utils.html	Sat Aug 09 23:22:15 2014 +0530
@@ -23,8 +23,8 @@
 {% endmacro %}
 
 
-{% macro table(headings, rows, itemname_cols=[], url_cols=[]) %}
-<table class="zebra">
+{% macro table(headings, rows, itemname_cols=[], url_cols=[], filesize_cols=[]) %}
+<table class="zebra table table-hover">
 <thead>
     <tr>
         {% for heading in headings %}
@@ -40,7 +40,9 @@
 {% for row in rows %}
     <tr>
         {% for col in row %}
-            {% if col is number %}
+            {% if loop.index in filesize_cols %}
+                <td>{{ col|filesizeformat }}</td>
+            {% elif 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>
--- a/MoinMoin/themes/foobar/static/css/stylus/theme.styl	Sat Aug 09 18:31:13 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/stylus/theme.styl	Sat Aug 09 23:22:15 2014 +0530
@@ -1139,10 +1139,6 @@
     font-size 1.17em
 .moin-small
     font-size .83em
-.moin-integer
-    text-align right
-    padding-right 1em
-    width 2%
 
 html,
 body
--- a/MoinMoin/themes/foobar/static/css/theme.css	Sat Aug 09 18:31:13 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/theme.css	Sat Aug 09 23:22:15 2014 +0530
@@ -445,7 +445,6 @@
 ins{background-color:inherit;text-decoration:underline}
 .moin-big{font-size:1.17em}
 .moin-small{font-size:.83em}
-.moin-integer{text-align:right;padding-right:1em;width:2%}
 html,body{height:100%}
 #moin-main-container{min-height:100%;position:relative}
 #moin-main-box{margin-bottom:60px}
--- a/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Sat Aug 09 18:31:13 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Sat Aug 09 23:22:15 2014 +0530
@@ -54,11 +54,6 @@
 .moin-small
     font-size .83em
 
-.moin-integer
-    text-align right
-    padding-right 1em
-    width 2%
-
 .moin-inline-label
     display inline
 
--- a/MoinMoin/themes/modernized/static/css/theme.css	Sat Aug 09 18:31:13 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/theme.css	Sat Aug 09 23:22:15 2014 +0530
@@ -198,7 +198,6 @@
 ins{background-color:inherit;text-decoration:underline}
 .moin-big{font-size:1.17em}
 .moin-small{font-size:.83em}
-.moin-integer{text-align:right;padding-right:1em;width:2%}
 .moin-inline-label{display:inline}
 h1{font-size:2em;margin:.67em 0;border-bottom:5px solid #4e7da9;padding-bottom:5px}
 h2{font-size:1.5em;margin:.75em 0;padding-bottom:4px}