changeset 2948:10423855df46

make global history one table so cell widths are consistent
author RogerHaase <haaserd@gmail.com>
date Mon, 08 Jun 2015 14:16:29 -0700
parents c155156148e4
children 65fe46bad988
files MoinMoin/static/css/common.css MoinMoin/templates/global_history.html
diffstat 2 files changed, 66 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/static/css/common.css	Sat May 30 20:41:33 2015 -0700
+++ b/MoinMoin/static/css/common.css	Mon Jun 08 14:16:29 2015 -0700
@@ -371,18 +371,13 @@
 
 /* Global history */
 
-#moin-global-history { font-size: 75%; }
-.moin-history-date { font-size: 150%; font-weight: bold; }
-.moin-history-container { border: 1px solid #4e7da9; margin: 2em 0em; border-top-left-radius: 5px; border-top-right-radius: 5px; }
-.moin-history-container-header { background: #00417f; margin: 0; padding: 4px; color: #fff; border-bottom: 1px solid #4e7da9;
-    border-top-left-radius: 5px; border-top-right-radius: 5px; }
-.moin-history-container-header a.moin-bookmark-link { margin-left: 20px; color: #fff; }
-.moin-history-container-body { margin: 0; padding: 0; font-size: 1.2em; }
-.moin-history-container-body table { margin: 0; border: none; width: 100%; }
-.moin-history-time { width: 3em; text-align: right; }
-.moin-history-item { width: 30%; }
-.moin-history-editorinfo { width: 15%; }
-.moin-history-comment { width: 40%; }
+#moin-global-history { font-size: 75%; width: 100%; }
+.moin-history-day-banner { background: #00417f; color: #fff; }
+.moin-history-day-banner a.moin-bookmark-link { margin-left: 20px; color: #fff; }
+.moin-history-date { font-size: 125%; font-weight: bold; }
+.moin-history-time { text-align: right; }
+.moin-history-comment { min-width: 30%; }
 .moin-history-action { width: .5em; cursor: default; }
 .moin-history-action a: hover { text-decoration: none; }
 .moin-history-links { width: .5em; }
+.moin-history-end-of-day { border: 0; border-top: 2px solid #4e7da9; }
--- a/MoinMoin/templates/global_history.html	Sat May 30 20:41:33 2015 -0700
+++ b/MoinMoin/templates/global_history.html	Mon Jun 08 14:16:29 2015 -0700
@@ -17,64 +17,63 @@
 {% block content %}
     <h1>{{ _("Global History") }}</h1>
     <div class='moin-clr'></div>
-    <div id="moin-global-history">
-        {% for day, revs in history %}
-           {% set latest_timestamp = revs[0].meta['mtime'] %}
-            <div class="moin-history-container">
-                <div class="moin-history-container-header">
-                    <span class="moin-history-date">{{ day }}</span>
-                    {% if user.valid %}
-                        <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">
-                        {% for rev in revs|sort(attribute='fqname') %}
-                            {% set meta = rev.meta %}
-                            <tr>
-                                <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 %}
-                                            {{ meta.summary }}
-                                        {% else %}
-                                            {{ rev.fqname|shorten_fqname }}
-                                        {% 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>
-                </div>
-            </div>
-        {% endfor %}
-        {% if bookmark_time %}
-            <div class="moin-history-container">
-                <div class="moin-history-container-header">
-                    <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 %}
-    </div>
+        <table id="moin-global-history">
+            {% for day, revs in history %}
+                {% set latest_timestamp = revs[0].meta['mtime'] %}
+                <tr class="moin-history-day-banner">
+                    <td colspan="7">
+                        <span class="moin-history-date">{{ day }}</span>
+                        {% if user.valid %}
+                            <a class="moin-bookmark-link" href="{{ url_for('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookmark") }}</a>
+                        {% endif %}
+                    </td>
+                </tr>
+                {% for rev in revs|sort(attribute='fqname') %}
+                    {% set meta = rev.meta %}
+                    <tr>
+                        <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 %}
+                                    {{ meta.summary }}
+                                {% else %}
+                                    {{ rev.fqname|shorten_fqname }}
+                                {% 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="{{ _("Last action: ") + 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 %}
+                <tr>
+                    <td class="moin-history-end-of-day" colspan="7">&nbsp;</td>
+                </tr>
+            {% endfor %}
+            {% if bookmark_time %}
+                <tr class="moin-history-container">
+                    <td class="moin-history-day-banner" colspan="7">
+                        <span class="moin-history-date">{{ bookmark_time|datetimeformat }}</span>
+                        <a class="moin-bookmark-link" href="{{ url_for('frontend.bookmark', time='del') }}">{{ _("Delete bookmark") }}</a>
+                    </td>
+                </tr>
+            {% endif %}
+        </table>
 {% endblock %}