total mess: some random experiments with images and lqc's dvcs
[redakcja.git] / apps / wiki_img / templates / wiki_img / document_list.html
1 {% extends "wiki/base.html" %}
2
3 {% load i18n %}
4 {% load wiki %}
5
6 {% block extrabody %}
7 {{ block.super }}
8 <script type="text/javascript" charset="utf-8">
9 $(function() {
10         function search(event) {
11         event.preventDefault();
12         var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
13         $('#file-list tbody tr').hide().filter(function(index) {
14             return expr.test(slugify( $('a', this).attr('data-id') ));
15         }).show();
16     }
17
18     $('#file-list-find-button').click(search).hide();
19         $('#file-list-filter').bind('keyup change DOMAttrModified', search);
20 });
21 </script>
22 {% endblock %}
23
24 {% block leftcolumn %}
25         <form method="get" action="#">
26     <table  id="file-list">
27         <thead>
28                 <tr><th>Filtr:</th>
29                         <th><input autocomplete="off" name="filter" id="file-list-filter" type="text" size="40" /></th>
30                         <th><input type="reset" value="{% trans "Clear filter" %}" id="file-list-reset-button"/></th>
31                         </tr>
32                 </thead>
33                 <tbody>
34         {% for doc in object_list %}
35             <tr>
36                 <td colspan="3"><a target="_blank" data-id="{{doc.name}}"
37                                         href="{% url wiki_img_editor doc.slug %}">{{ doc.name }}</a></td>
38                                 <!-- placeholder </td> -->
39                         </tr>
40         {% endfor %}
41                 </tbody>
42     </table>
43         </form>
44 {% endblock leftcolumn %}
45
46 {% block rightcolumn %}
47         <div id="last-edited-list">
48                 <h2>{% trans "Your last edited documents" %}</h2>
49             <ol>
50                         {% for name, date in last_docs %}
51                         <li><a href="{% url wiki_editor name %}"
52                                 target="_blank">{{ name|wiki_title }}</a><br/><span class="date">({{ date|date:"H:i:s, d/m/Y" }})</span></li>
53                         {% endfor %}
54                 </ol>
55         </div>
56 {% endblock rightcolumn %}