-{% extends "base.html" %}
-{% load compressed %}
+{% extends "wiki/base.html" %}
-{% block extrahead %}
-{% compressed_css 'listing' %}
-{% endblock extrahead %}
+{% load i18n %}
+{% load wiki %}
{% block extrabody %}
-{% compressed_js 'listing' %}
+{{ block.super }}
<script type="text/javascript" charset="utf-8">
$(function() {
function search(event) {
event.preventDefault();
-
var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
-
- $('#file-list p').hide().filter(function(index) {
- console.log(expr.test($(this).attr('title')))
- return expr.test(slugify($('a', this).html()));
+ $('#file-list tbody tr').hide().filter(function(index) {
+ return expr.test(slugify( $('a', this).attr('data-id') ));
}).show();
}
-
+
$('#file-list-find-button').click(search).hide();
$('#file-list-filter').bind('keyup change DOMAttrModified', search);
});
</script>
{% endblock %}
-{% block maincontent %}
-<h1><img src="{{STATIC_URL}}/img/logo.png">Platforma Redakcyjna</h1>
-
-<div id="document-list">
- <div id="file-list">
- <form action="#" method="GET">
- <p>Filtr: <input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" />
- <input type="submit" value="Znajdź" id="file-list-find-button"/>
- <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
- </p>
- </form>
- {% for file in document_list %}
- <p><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></p>
+{% block leftcolumn %}
+ <form method="get" action="#">
+ <table id="file-list">
+ <thead>
+ <tr><th>Filtr:</th>
+ <th><input autocomplete="off" name="filter" id="file-list-filter" type="text" size="40" /></th>
+ <th><input type="reset" value="{% trans "Clear filter" %}" id="file-list-reset-button"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for doc in docs %}
+ <tr>
+ <td colspan="3"><a target="_blank" data-id="{{ doc }}"
+ href="{{ doc.get_absolute_url }}">{{ doc }}</a></td>
+ <!-- placeholder </td> -->
+ </tr>
{% endfor %}
- </div>
-
+ </tbody>
+ </table>
+ </form>
+{% endblock leftcolumn %}
+
+{% block rightcolumn %}
<div id="last-edited-list">
- <h2>Twoje ostatnio otwierane dokumenty:</h2>
- <ol>
- {% for name, date in last_docs %}
- <li><a href="{% url wiki.views.document_detail name|urlencode %}"
- target="_blank">{{ name }}</a><br/><span class="date">({{ date|date:"H:i:s, d/m/Y" }})</span></li>
- {% endfor %}
+ <h2>{% trans "Your last edited documents" %}</h2>
+ <ol>
+ {% for name, date in last_docs %}
+ <li><a href="{% url wiki_editor name %}"
+ target="_blank">{{ name|wiki_title }}</a><br/><span class="date">({{ date|date:"H:i:s, d/m/Y" }})</span></li>
+ {% endfor %}
</ol>
</div>
-</div>
-
-</div>
-{% endblock maincontent %}
+{% endblock rightcolumn %}