Mercurial > wikked
diff 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 |
line wrap: on
line diff
--- a/static/tpl/special-changes.html Sun Nov 24 14:04:05 2013 -0800 +++ b/static/tpl/special-changes.html Sun Nov 24 14:14:32 2013 -0800 @@ -5,7 +5,7 @@ <section> <p>Here are the recent changes on this wiki.</p> <form> - <table class="table table-hover"> + <table class="table table-hover history-list"> <thead> <tr> <th>Revision</th> @@ -14,7 +14,7 @@ </thead> <tbody> {{#eachr history}} - <tr> + <tr class='history-entry'> <td>{{rev_name}}</td> <td> <dl class="dl-horizontal"> @@ -22,22 +22,25 @@ <dd>{{date_from_now timestamp}}</dd> <dt>Author</dt> <dd>{{author}}</dd> - <dt>Pages</dt> + <dt>Pages ({{num_pages}})</dt> <dd> + {{#if make_collapsable}} + <button class="btn page-details-toggler" data-index="{{index}}">Show/Hide</button> + <div class="page-details page-details-{{index}}"> + {{/if}} <ul class="unstyled"> {{#each changes}} <li> - {{#if valid_url}} - <a href="{{get_read_url url}}">{{url}}</a> - {{else}} - <code>{{url}}</code> - {{/if}} + <a href="#/revision{{url}}/{{../rev_id}}">{{url}}</a> {{#if is_edit}}(edit) {{/if}} {{#if is_add}}(added) {{/if}} {{#if is_delete}}(deleted) {{/if}} </li> {{/each}} </ul> + {{#if make_collapsable}} + </div> + {{/if}} </dd> <dt>Comment</dt> <dd>{{description}}</dd>