diff MoinMoin/templates/global_history.html @ 2944:afe523052a7f

rework global history styling for modernized and basic themes, add user and comment fields, partial fix #471
author RogerHaase <haaserd@gmail.com>
date Sun, 10 May 2015 13:51:39 -0700
parents 40fd6fac76f8
children 10423855df46
line wrap: on
line diff
--- a/MoinMoin/templates/global_history.html	Wed May 06 13:38:38 2015 -0700
+++ b/MoinMoin/templates/global_history.html	Sun May 10 13:51:39 2015 -0700
@@ -22,28 +22,19 @@
            {% set latest_timestamp = revs[0].meta['mtime'] %}
             <div class="moin-history-container">
                 <div class="moin-history-container-header">
-                    <h2>{{ day }}</h2>
+                    <span class="moin-history-date">{{ day }}</span>
                     {% if user.valid %}
-                        <a class="bookmark-link btn btn-primary" href="{{ url_for('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookmark") }}</a>
+                        <a class="moin-bookmark-link" href="{{ url_for('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookmark") }}</a>
                     {% endif %}
                 </div>
                 <div class="moin-history-container-body">
-                    <table class="zebra table table-hover">
-                        {% for rev in revs %}
+                    <table class="zebra">
+                        {% for rev in revs|sort(attribute='fqname') %}
                             {% set meta = rev.meta %}
                             <tr>
-                                <td class="moin-action col-md-1">
-                                    <span title="{{ meta.action|title }}" class="{{ awesome_class[meta.action] }}"></span>
-                                </td>
-                                <td class="moin-history-links col-md-1">
-                                    <a href="{{ url_for('frontend.history', item_name=rev.fqname, bookmark=bookmark_time) }}">HIST</a>
-                                    {% if bookmark_time -%}
-                                        <a href="{{ url_for('frontend.diff', item_name=rev.fqname, bookmark=bookmark_time) }}">DIFF</a>
-                                    {%- endif %}
-                                </td>
-                                <td class="moin-history-time col-md-1">{{ meta.mtime|timeformat }}</td>
-                                <td class="moin-history-item col-md-7">
-                                    <a class="{{ meta.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=rev.fqname) }}" title="{{ meta.contenttype }}">
+                                <td class="moin-history-item moin-wordbreak">
+                                    <a class="{{ meta.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=rev.fqname) }}"
+                                            title="{{ meta.contenttype|shorten_ctype }}">
                                         {% if meta.name %}
                                             {{ meta.name|join(' | ') }}
                                         {% elif meta.summary %}
@@ -53,6 +44,24 @@
                                         {% endif %}
                                     </a>
                                 </td>
+                                <td class="moin-wordbreak moin-history-editorinfo">{{ utils.editor_info(rev.meta) }}</td>
+                                <td class="moin-history-time">{{ meta.mtime|time_hh_mm }}</td>
+                                <td class="moin-history-action">
+                                    <span title="{{ meta.action|title }}" class="{{ awesome_class[meta.action] }}"></span>
+                                </td>
+                                <td class="moin-history-links">
+                                    <a href="{{ url_for('frontend.history', item_name=rev.fqname, bookmark=bookmark_time) }}">
+                                        <span class="fa fa-clock-o" title="{{ _('History') }}"></span>
+                                    </a>
+                                </td>
+                                {% if bookmark_time -%}
+                                    <td class="moin-history-links">
+                                        <a href="{{ url_for('frontend.diff', item_name=rev.fqname, bookmark=bookmark_time) }}">
+                                            <span class="fa fa-copy" title="{{ _('Diff') }}"></span>
+                                        </a>
+                                    </td>
+                                {%- endif %}
+                                <td class="moin-wordbreak moin-history-comment">{{ rev.meta['comment'] }}</td>
                             </tr>
                         {% endfor %}
                     </table>
@@ -62,8 +71,8 @@
         {% if bookmark_time %}
             <div class="moin-history-container">
                 <div class="moin-history-container-header">
-                    <h2>{{ bookmark_time|datetimeformat }}</h2>
-                    <a class="bookmark-link btn btn-danger" href="{{ url_for('frontend.bookmark', time='del') }}">{{ _("Delete bookmark") }}</a>
+                    <span class="moin-history-date">{{ bookmark_time|datetimeformat }}</span>
+                    <a class="moin-bookmark-link" href="{{ url_for('frontend.bookmark', time='del') }}">{{ _("Delete bookmark") }}</a>
                 </div>
             </div>
         {% endif %}