annotate static/tpl/special-changes.html @ 126:9079fb01abb8

Improved wiki history page: - Collapsable list of pages when there's more than one. - Added a `limit` parameter to the API. - Better code for special pages' views and models.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 24 Nov 2013 14:14:32 -0800
parents 6c261cb94631
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89
b03f083c3a29 Lots of HTML/JS/Less changes:
Ludovic Chabant <ludovic@chabant.com>
parents: 81
diff changeset
1 <article>
b03f083c3a29 Lots of HTML/JS/Less changes:
Ludovic Chabant <ludovic@chabant.com>
parents: 81
diff changeset
2 <header>
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 <h1>Wiki History</h1>
89
b03f083c3a29 Lots of HTML/JS/Less changes:
Ludovic Chabant <ludovic@chabant.com>
parents: 81
diff changeset
4 </header>
b03f083c3a29 Lots of HTML/JS/Less changes:
Ludovic Chabant <ludovic@chabant.com>
parents: 81
diff changeset
5 <section>
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 <p>Here are the recent changes on this wiki.</p>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 <form>
126
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
8 <table class="table table-hover history-list">
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 <thead>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10 <tr>
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
11 <th>Revision</th>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
12 <th>Information</th>
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13 </tr>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14 </thead>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 <tbody>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 {{#eachr history}}
126
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
17 <tr class='history-entry'>
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
18 <td>{{rev_name}}</td>
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19 <td>
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
20 <dl class="dl-horizontal">
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
21 <dt>Date</dt>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
22 <dd>{{date_from_now timestamp}}</dd>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
23 <dt>Author</dt>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
24 <dd>{{author}}</dd>
126
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
25 <dt>Pages ({{num_pages}})</dt>
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
26 <dd>
126
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
27 {{#if make_collapsable}}
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
28 <button class="btn page-details-toggler" data-index="{{index}}">Show/Hide</button>
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
29 <div class="page-details page-details-{{index}}">
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
30 {{/if}}
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
31 <ul class="unstyled">
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
32 {{#each changes}}
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
33 <li>
126
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
34 <a href="#/revision{{url}}/{{../rev_id}}">{{url}}</a>
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
35 {{#if is_edit}}(edit) {{/if}}
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
36 {{#if is_add}}(added) {{/if}}
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
37 {{#if is_delete}}(deleted) {{/if}}
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
38 </li>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
39 {{/each}}
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
40 </ul>
126
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
41 {{#if make_collapsable}}
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
42 </div>
9079fb01abb8 Improved wiki history page:
Ludovic Chabant <ludovic@chabant.com>
parents: 124
diff changeset
43 {{/if}}
81
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
44 </dd>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
45 <dt>Comment</dt>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
46 <dd>{{description}}</dd>
05d0a7cd85e8 Fixed site-wide history page.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
47 </dl>
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
48 </td>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
49 </tr>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
50 {{/eachr}}
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
51 </tbody>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
52 </table>
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
53 </form>
89
b03f083c3a29 Lots of HTML/JS/Less changes:
Ludovic Chabant <ludovic@chabant.com>
parents: 81
diff changeset
54 </section>
19
884eb6c8edf0 Added "wiki history" special page:
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
55 </article>