changeset 1894:38454bb987f8

merged
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Dec 2012 16:29:13 +0100
parents f08df3e9c53e (current diff) 7f04d451cd7b (diff)
children 2143f1a8455e
files
diffstat 8 files changed, 19 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/admin/templates/user/interwikihelp.html	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/apps/admin/templates/user/interwikihelp.html	Sat Dec 22 16:29:13 2012 +0100
@@ -2,5 +2,5 @@
 {% extends theme("layout.html") %}
 {% block content %}
 <h1>{{ _("Known InterWiki names") }}</h1>
-{{ utils.table(headings, rows) }}
+{{ utils.table(headings, rows, url_cols=[2]) }}
 {% endblock %}
--- a/MoinMoin/apps/admin/templates/user/itemsize.html	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/apps/admin/templates/user/itemsize.html	Sat Dec 22 16:29:13 2012 +0100
@@ -2,5 +2,5 @@
 {% extends theme("layout.html") %}
 {% block content %}
 <h1>{{ _("Item sizes (latest revision)") }}</h1>
-{{ utils.table(headings, rows) }}
+{{ utils.table(headings, rows, itemname_cols=[2]) }}
 {% endblock %}
--- a/MoinMoin/templates/modify_text.html	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/templates/modify_text.html	Sat Dec 22 16:29:13 2012 +0100
@@ -2,10 +2,6 @@
 
 {% macro data_editor(form, item_name) %}
 {{ base_editor(form) }}
-{% if direction %}
-    {{ gen.textarea(form['data_text'], lang=lang, dir=direction, rows=form.rows|string, cols=form.cols|string) }}
-{% else %}
-    {{ gen.textarea(form['data_text'], lang=lang, rows=form.rows|string, cols=form.cols|string) }}
-{% endif %}
+{{ gen.textarea(form['data_text'], rows=form.rows|string, cols=form.cols|string) }}
 <br />
 {% endmacro %}
--- a/MoinMoin/templates/modify_text_html.html	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/templates/modify_text_html.html	Sat Dec 22 16:29:13 2012 +0100
@@ -6,5 +6,5 @@
 {% endmacro %}
 
 {% macro data_editor(form, item_name) %}
-{{ gen.textarea(form['data_text'], class='ckeditor', lang=lang, dir=direction, rows=form.rows|string, cols=form.cols|string) }}
+{{ gen.textarea(form['data_text'], class='ckeditor', rows=form.rows|string, cols=form.cols|string) }}
 {% endmacro %}
--- a/MoinMoin/templates/utils.html	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/templates/utils.html	Sat Dec 22 16:29:13 2012 +0100
@@ -23,7 +23,7 @@
 {% endmacro %}
 
 
-{% macro table(headings, rows) %}
+{% macro table(headings, rows, itemname_cols=[], url_cols=[]) %}
 <table class="zebra">
 <thead>
     <tr>
@@ -42,6 +42,10 @@
         {% for col in row %}
             {% 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>
+            {% elif loop.index in url_cols %}
+                <td><a href="{{ col }}">{{ col }}</a></td>
             {%- else -%}
                 <td>{{ col }}</td>
             {% endif %}
@@ -74,8 +78,10 @@
     </ul>
 {% endmacro %}
 
-{% macro render_subitem_navigation(itemname, newtab) %}
-    {% set subitems = theme_supp.subitem_index(itemname) %}
+{% macro render_subitem_navigation(itemname, newtab, subitems=None) %}
+    {% if not subitems %}
+        {% set subitems = theme_supp.subitem_index(itemname) %}
+    {% endif %}
     {% if caller %}
         {% set mycaller = caller %}
     {% endif %}
--- a/MoinMoin/themes/foobar/templates/show.html	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/themes/foobar/templates/show.html	Sat Dec 22 16:29:13 2012 +0100
@@ -43,11 +43,14 @@
             </ul>
         </li>
         {% endif %}
+        {% set subitems = theme_supp.subitem_index(item_name) %}
+        {% if subitems %}
         <li>
             {% block subitem_navigation %}
-            {{ utils.render_subitem_navigation(item_name, False) }}
+            {{ utils.render_subitem_navigation(item_name, False, subitems=subitems) }}
             {% endblock %}
         </li>
+        {% endif %}
     </ul>
 {% endblock %}
 
--- a/MoinMoin/themes/modernized/static/css/common.css	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/themes/modernized/static/css/common.css	Sat Dec 22 16:29:13 2012 +0100
@@ -274,7 +274,7 @@
 .moin-form button,.moin-form input[type="submit"]{clear:both;display:table;margin:auto}
 form[name="delete_item"] dd input,form[name="rename_item"] dd input,form[name="destroy_item"] dd input{width:100%}
 form[name="delete_item"] dt,form[name="rename_item"] dt,form[name="destroy_item"] dt{width:20%}
-#moin-modify dd{width:100%;}
+#moin-modify dd{width:100%;float:none;}
 #moin-modify dd input{width:99%}
 #moin-modify dt{width:auto;text-align:left}
 #moin-modify textarea{width:99.5%}
--- a/MoinMoin/themes/modernized/static/css/stylus/main.styl	Sat Dec 22 16:18:24 2012 +0100
+++ b/MoinMoin/themes/modernized/static/css/stylus/main.styl	Sat Dec 22 16:29:13 2012 +0100
@@ -415,6 +415,7 @@
 #moin-modify
     dd
         width 100%
+        float none
         input
             width 99%
     dt