Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(589)

Side by Side Diff: MoinMoin/templates/global_history.html

Issue 242460043: Automation + Global History
Patch Set: Made changes as suggested by mentors Created 8 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 {% extends theme("layout.html") %} 1 {% extends theme("layout.html") %}
2 {% import "utils.html" as utils %} 2 {% import "utils.html" as utils %}
3
4 {# map meta.action to font awesome classes #} 3 {# map meta.action to font awesome classes #}
5 {% set awesome_class = { 4 {% set awesome_class = {
6 'REVERT': 'fa fa-undo', 5 'REVERT': 'fa fa-undo',
7 'SAVE': 'fa fa-save', 6 'SAVE': 'fa fa-save',
8 'RENAME': 'fa fa-pencil-square-o', 7 'RENAME': 'fa fa-pencil-square-o',
9 'TRASH': 'fa fa-trash-o', 8 'TRASH': 'fa fa-trash-o',
10 } %} 9 } %}
11 10
12 {% block head %} 11 {% block head %}
13 {{ super() }} 12 {{ super() }}
14 <link rel="alternate" title="Global History" href="{{ url_for('feed.atom') } }" type="application/atom+xml" /> 13 <link rel="alternate" title="Global History" href="{{ url_for('feed.atom') } }" type="application/atom+xml" />
15 {% endblock %} 14 {% endblock %}
15 {% block content %}
16 <div class="container">
RogerHaase 2015/06/22 16:08:29 same objection to making all future themes depende
yask123 2015/06/24 00:38:58 I transferred this template to theme specific temp
17 <h1>{{ _("Global History") }}</h1>
18 <br>
19 {% for day, revs in history %}
20 {% set latest_timestamp = revs[0].meta['mtime'] %}
21 <div class="panel panel-primary">
22 <div class="panel-heading">
23 <div class="panel-title">{{ day }}
24 {% if user.valid %}
25 <a class="moin-set-bookmark-btn btn btn-success" hre f="{{ url_for('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookma rk") }}</a>
26 {% endif %}</div>
27 </div>
28 <div class="moin-history-panel panel-body">
29 <table class="table moin-history-table table-hover">
30 {% for rev in revs %}
31 {% set meta = rev.meta %}
16 32
17 {% block content %} 33 <tbody>
18 <h1>{{ _("Global History") }}</h1> 34 <tr>
19 <div class='moin-clr'></div> 35 <td class="col-md-1"><span title="{{ met a.action|title }}" class="{{ awesome_class[meta.action] }}"></span></td>
20 <div id="moin-global-history"> 36 <td class="col-md-1"><a href="{{ url_for ('frontend.history', item_name=rev.fqname, bookmark=bookmark_time) }}">HIST</a>
21 {% for day, revs in history %} 37 {% if bookmark_time -%}
22 {% set latest_timestamp = revs[0].meta['mtime'] %} 38 <a href="{{ url_for('frontend.diff', item_name=rev.fqname, bookmark=bookmark_time) }}">DIFF</a>
23 <div class="moin-history-container"> 39 {%- endif %}</td>
24 <div class="moin-history-container-header"> 40 <td class="col-md-2">{{ meta.mtime|timef ormat }}</td>
25 <h2>{{ day }}</h2> 41 <td class="col-md-8"><a class="{{ meta.c ontenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_ name=rev.fqname) }}" title="{{ meta.contenttype }}">
26 {% if user.valid %} 42 {% if meta.name %}
27 <a class="bookmark-link btn btn-primary" href="{{ url_fo r('frontend.bookmark', time=latest_timestamp+1) }}">{{ _("Set bookmark") }}</a> 43 {{ meta.name|join(' | ') }}
28 {% endif %} 44 {% elif meta.summary %}
29 </div> 45 {{ meta.summary }}
30 <div class="moin-history-container-body"> 46 {% else %}
31 <table class="zebra table table-hover"> 47 {{ rev.fqname|shorten_fqname }}
32 {% for rev in revs %} 48 {% endif %}
33 {% set meta = rev.meta %} 49 </a></td>
34 <tr> 50 <td class="col-md-7"></td>
35 <td class="moin-action col-md-1"> 51 </tr>
36 <span title="{{ meta.action|title }}" class= "{{ awesome_class[meta.action] }}"></span> 52 {% endfor %}
37 </td> 53 </tbody>
38 <td class="moin-history-links col-md-1"> 54
39 <a href="{{ url_for('frontend.history', item _name=rev.fqname, bookmark=bookmark_time) }}">HIST</a> 55 </table>
40 {% if bookmark_time -%} 56 </div>
41 <a href="{{ url_for('frontend.diff', ite m_name=rev.fqname, bookmark=bookmark_time) }}">DIFF</a>
42 {%- endif %}
43 </td>
44 <td class="moin-history-time col-md-1">{{ meta.m time|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) }}" titl e="{{ meta.contenttype }}">
47 {% if meta.name %}
48 {{ meta.name|join(' | ') }}
49 {% elif meta.summary %}
50 {{ meta.summary }}
51 {% else %}
52 {{ rev.fqname|shorten_fqname }}
53 {% endif %}
54 </a>
55 </td>
56 </tr>
57 {% endfor %}
58 </table>
59 </div>
60 </div>
61 {% endfor %} 57 {% endfor %}
62 {% if bookmark_time %} 58 {% if bookmark_time %}
63 <div class="moin-history-container"> 59 <div class="panel panel-primary">
64 <div class="moin-history-container-header"> 60 <div class="panel-heading">
65 <h2>{{ bookmark_time|datetimeformat }}</h2> 61 <div class="panel-tittle">
66 <a class="bookmark-link btn btn-danger" href="{{ url_for('fr ontend.bookmark', time='del') }}">{{ _("Delete bookmark") }}</a> 62 {{ bookmark_time|datetimeformat }}
67 </div> 63 <a class="moin-del-bookmark-btn btn btn-danger" href="{{ url_for('frontend.bookmark', time='del') }}">{{ _("Delete bookmark") }} </a>
68 </div> 64 </div>
69 {% endif %} 65 </div>
66 </div>
67 {% endif %}
70 </div> 68 </div>
71 {% endblock %} 69 {% endblock %}
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b