comparison 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
comparison
equal deleted inserted replaced
2943:39d57a15fdef 2944:afe523052a7f
20 <div id="moin-global-history"> 20 <div id="moin-global-history">
21 {% for day, revs in history %} 21 {% for day, revs in history %}
22 {% set latest_timestamp = revs[0].meta['mtime'] %} 22 {% set latest_timestamp = revs[0].meta['mtime'] %}
23 <div class="moin-history-container"> 23 <div class="moin-history-container">
24 <div class="moin-history-container-header"> 24 <div class="moin-history-container-header">
25 <h2>{{ day }}</h2> 25 <span class="moin-history-date">{{ day }}</span>
26 {% if user.valid %} 26 {% if user.valid %}
27 <a class="bookmark-link btn btn-primary" href="{{ url_for('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookmark") }}</a> 27 <a class="moin-bookmark-link" href="{{ url_for('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookmark") }}</a>
28 {% endif %} 28 {% endif %}
29 </div> 29 </div>
30 <div class="moin-history-container-body"> 30 <div class="moin-history-container-body">
31 <table class="zebra table table-hover"> 31 <table class="zebra">
32 {% for rev in revs %} 32 {% for rev in revs|sort(attribute='fqname') %}
33 {% set meta = rev.meta %} 33 {% set meta = rev.meta %}
34 <tr> 34 <tr>
35 <td class="moin-action col-md-1"> 35 <td class="moin-history-item moin-wordbreak">
36 <span title="{{ meta.action|title }}" class="{{ awesome_class[meta.action] }}"></span> 36 <a class="{{ meta.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=rev.fqname) }}"
37 </td> 37 title="{{ meta.contenttype|shorten_ctype }}">
38 <td class="moin-history-links col-md-1">
39 <a href="{{ url_for('frontend.history', item_name=rev.fqname, bookmark=bookmark_time) }}">HIST</a>
40 {% if bookmark_time -%}
41 <a href="{{ url_for('frontend.diff', item_name=rev.fqname, bookmark=bookmark_time) }}">DIFF</a>
42 {%- endif %}
43 </td>
44 <td class="moin-history-time col-md-1">{{ meta.mtime|timeformat }}</td>
45 <td class="moin-history-item col-md-7">
46 <a class="{{ meta.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=rev.fqname) }}" title="{{ meta.contenttype }}">
47 {% if meta.name %} 38 {% if meta.name %}
48 {{ meta.name|join(' | ') }} 39 {{ meta.name|join(' | ') }}
49 {% elif meta.summary %} 40 {% elif meta.summary %}
50 {{ meta.summary }} 41 {{ meta.summary }}
51 {% else %} 42 {% else %}
52 {{ rev.fqname|shorten_fqname }} 43 {{ rev.fqname|shorten_fqname }}
53 {% endif %} 44 {% endif %}
54 </a> 45 </a>
55 </td> 46 </td>
47 <td class="moin-wordbreak moin-history-editorinfo">{{ utils.editor_info(rev.meta) }}</td>
48 <td class="moin-history-time">{{ meta.mtime|time_hh_mm }}</td>
49 <td class="moin-history-action">
50 <span title="{{ meta.action|title }}" class="{{ awesome_class[meta.action] }}"></span>
51 </td>
52 <td class="moin-history-links">
53 <a href="{{ url_for('frontend.history', item_name=rev.fqname, bookmark=bookmark_time) }}">
54 <span class="fa fa-clock-o" title="{{ _('History') }}"></span>
55 </a>
56 </td>
57 {% if bookmark_time -%}
58 <td class="moin-history-links">
59 <a href="{{ url_for('frontend.diff', item_name=rev.fqname, bookmark=bookmark_time) }}">
60 <span class="fa fa-copy" title="{{ _('Diff') }}"></span>
61 </a>
62 </td>
63 {%- endif %}
64 <td class="moin-wordbreak moin-history-comment">{{ rev.meta['comment'] }}</td>
56 </tr> 65 </tr>
57 {% endfor %} 66 {% endfor %}
58 </table> 67 </table>
59 </div> 68 </div>
60 </div> 69 </div>
61 {% endfor %} 70 {% endfor %}
62 {% if bookmark_time %} 71 {% if bookmark_time %}
63 <div class="moin-history-container"> 72 <div class="moin-history-container">
64 <div class="moin-history-container-header"> 73 <div class="moin-history-container-header">
65 <h2>{{ bookmark_time|datetimeformat }}</h2> 74 <span class="moin-history-date">{{ bookmark_time|datetimeformat }}</span>
66 <a class="bookmark-link btn btn-danger" href="{{ url_for('frontend.bookmark', time='del') }}">{{ _("Delete bookmark") }}</a> 75 <a class="moin-bookmark-link" href="{{ url_for('frontend.bookmark', time='del') }}">{{ _("Delete bookmark") }}</a>
67 </div> 76 </div>
68 </div> 77 </div>
69 {% endif %} 78 {% endif %}
70 </div> 79 </div>
71 {% endblock %} 80 {% endblock %}