Commit 906d704c by cahrens

Fix a11y issues.

TNL-6440, TNL-6439
parent f57db71c
...@@ -29,7 +29,7 @@ package_data = dict( ...@@ -29,7 +29,7 @@ package_data = dict(
setup( setup(
name = "django-wiki", name = "django-wiki",
version = "0.0.9", version = "0.0.10",
author = "Benjamin Bach", author = "Benjamin Bach",
author_email = "benjamin@overtag.dk", author_email = "benjamin@overtag.dk",
description = ("A wiki system written for the Django framework."), description = ("A wiki system written for the Django framework."),
......
...@@ -362,5 +362,4 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm): ...@@ -362,5 +362,4 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm):
class DirFilterForm(forms.Form): class DirFilterForm(forms.Form):
query = forms.CharField(widget=forms.TextInput(attrs={'placeholder': _(u'Filter...'), query = forms.CharField(label=_(u'Filter'), widget=forms.TextInput(attrs={'class': 'search-query'}))
'class': 'search-query'}))
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
{% trans "Add article" %} {% trans "Add article" %}
</a> </a>
</div> </div>
<div class="pull-right"> <div class="pull-right input-prepend">
{{ filter_form.query }} {{ filter_form.query.label_tag }} {{ filter_form.query }}
{% if filter_query %}
<div class="pull-right filter-clear">
<a href="{{ self_url }}">{% trans "clear" %}</a>
</div>
{% endif %}
</div> </div>
{% if filter_query %}
<div class="pull-right filter-clear">
<a href="{{ self_url }}">({% trans "clear" %})</a>
</div>
{% endif %}
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
...@@ -37,45 +37,47 @@ ...@@ -37,45 +37,47 @@
<p> <p>
{% with paginator.object_list.count as cnt %} {% with paginator.object_list.count as cnt %}
{% blocktrans with urlpath.path as path and cnt|pluralize:_("article,articles") as articles_plur and cnt|pluralize:_("is,are") as articles_plur_verb %} {% if filter_query %}
Browsing <strong><a href="{{ self_url }}">/{{ path }}</a></strong>. There {{ articles_plur_verb }} <strong>{{ cnt }} {{ articles_plur }}</strong> in this level. {% blocktrans with cnt|pluralize:_("article,articles") as articles_plur and cnt|pluralize:_("matches,match") as match_plur %}
{% endblocktrans %} {{ cnt }} {{ articles_plur }} in this level {{ match_plur }} your search.
{% endblocktrans %}
{% else %}
{% blocktrans with cnt|pluralize:_("article,articles") as articles_plur and cnt|pluralize:_("is,are") as articles_plur_verb %}
There {{ articles_plur_verb }} {{ cnt }} {{ articles_plur }} in this level.
{% endblocktrans %}
{% endif %}
{% endwith %} {% endwith %}
</p> </p>
<table class="table table-striped"> {% if directory %}
<tr> <table class="table table-striped">
<th>{% trans "Title" %}</th>
<th>{% trans "Slug" %}</th>
<th>{% trans "Last modified" %}</th>
</tr>
{% for urlpath in directory %}
<tr>
<td>
<a href="{% url 'wiki:get' path=urlpath.path %}"> {{ urlpath.article.current_revision.title }} </a>
<a href="{% url 'wiki:dir' path=urlpath.path %}" class="list-children"></a>
{% if urlpath.article.current_revision.deleted %}
<span class="icon-trash"></span>
{% endif %}
{% if urlpath.article.current_revision.locked %}
<span class="icon-lock"></span>
{% endif %}
</td>
<td>
{{ urlpath.slug }}
</td>
<td>
{{ urlpath.article.current_revision.created|naturaltime }}
</td>
</tr>
{% empty%}
<tr> <tr>
<td colspan="100"> <th scope="col">{% trans "Title" %}</th>
<em>{% trans "There are no articles in this level" %}</em> <th scope="col">{% trans "Slug" %}</th>
</td> <th scope="col">{% trans "Last modified" %}</th>
</tr> </tr>
{% endfor %} {% for urlpath in directory %}
</table> <tr>
<td>
<a href="{% url 'wiki:get' path=urlpath.path %}"> {{ urlpath.article.current_revision.title }} </a>
<a href="{% url 'wiki:dir' path=urlpath.path %}" class="list-children"></a>
{% if urlpath.article.current_revision.deleted %}
<span class="icon-trash"></span>
{% endif %}
{% if urlpath.article.current_revision.locked %}
<span class="icon-lock"></span>
{% endif %}
</td>
<td>
{{ urlpath.slug }}
</td>
<td>
{{ urlpath.article.current_revision.created|naturaltime }}
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% include "wiki/includes/pagination.html" %} {% include "wiki/includes/pagination.html" %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment