Commits

Roger Haase committed 9a6a2ea

fix for 284 item sizes and interwiki names views should show links rather than text

  • Participants
  • Parent commits 0f45ee8

Comments (0)

Files changed (3)

File MoinMoin/apps/admin/templates/user/interwikihelp.html

 {% extends theme("layout.html") %}
 {% block content %}
 <h1>{{ _("Known InterWiki names") }}</h1>
-{{ utils.table(headings, rows) }}
+{{ utils.table(headings, rows, url_cols=[2]) }}
 {% endblock %}

File MoinMoin/apps/admin/templates/user/itemsize.html

 {% extends theme("layout.html") %}
 {% block content %}
 <h1>{{ _("Item sizes (latest revision)") }}</h1>
-{{ utils.table(headings, rows) }}
+{{ utils.table(headings, rows, itemname_cols=[2]) }}
 {% endblock %}

File MoinMoin/templates/utils.html

 {% endmacro %}
 
 
-{% macro table(headings, rows) %}
+{% macro table(headings, rows, itemname_cols=[], url_cols=[]) %}
 <table class="zebra">
 <thead>
     <tr>
         {% 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 %}