~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/pagination/pagination_mod.html

  • Committer: franku
  • Date: 2016-04-18 13:29:23 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160418132923-bfzkb5mvdr7l8mz4
added migrations to each app

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{% extends "pagination/pagination.html" %}
2
 
{% comment %}
3
 
This template overrides one block of the shipped template of
4
 
linaro-django-pagination to get a nice prequel to the
5
 
pagination: (x - y of z modelsname).
6
 
Involved: Custom filter in mainpage.templatetags.get_model_name
7
 
{% endcomment %}
8
 
 
9
 
{% load i18n %}
10
 
{% load wl_extras %}
11
 
  {% block previouslink %}
12
 
        <span class="summary">
13
 
                <strong>{{ page_obj.start_index }}</strong> &mdash;
14
 
                <strong>{{ page_obj.end_index }}</strong> {% trans "of" %}
15
 
                <strong>{{ paginator.count }}</strong>
16
 
                {{ paginator.object_list.0 | get_model_name }}{{ paginator.count|pluralize }}</span>
17
 
  {% if page_obj.has_previous %}
18
 
                {% if disable_link_for_first_page and page_obj.previous_page_number == 1 %}
19
 
                        <a href="{{ request.path }}
20
 
                        {% if getvars %}
21
 
                                ?{{ getvars|slice:"1:" }}
22
 
                        {% endif %}
23
 
                        " class="prev">{{ previous_link_decorator|safe }}{% trans "previous" %}</a>
24
 
                {% else %}
25
 
                        <a href="?page{{ page_suffix }}={{ page_obj.previous_page_number }}{{ getvars }}" class="prev">{{ previous_link_decorator|safe }}{% trans "previous" %}</a>
26
 
                {% endif %}
27
 
                {% else %}
28
 
                {% if display_disabled_previous_link %}
29
 
                        <span class="disabled prev">{{ previous_link_decorator|safe }}{% trans "previous" %}</span>
30
 
                {% endif %}
31
 
  {% endif %}
32
 
  {% endblock previouslink %}