_sorting.html 720 Bytes
Newer Older
Nicolas Joyard's avatar
Nicolas Joyard committed
1 2 3 4
{% load i18n %}

{% trans "Order by" %}

Nicolas Joyard's avatar
Nicolas Joyard committed
5 6
<div class="btn-group" id="sort-menu">
  <button class="btn btn-default dropdown-toggle" type="button" id="sort-button" data-toggle="dropdown"
Nicolas Joyard's avatar
Nicolas Joyard committed
7
          aria-haspopup="true" aria-expanded="true">
Nicolas Joyard's avatar
Nicolas Joyard committed
8 9
    {% for mode in sort.modes %}
      {% if sort.mode == mode.id %}{% trans mode.label %}{% endif %}
Nicolas Joyard's avatar
Nicolas Joyard committed
10 11 12 13
    {% endfor %}
    <span class="caret"></span>
  </button>

Nicolas Joyard's avatar
Nicolas Joyard committed
14 15 16 17
  <ul class="dropdown-menu" aria-labelledby="sort-button">
    {% for mode in sort.modes|dictsort:'order' %}
      <li {% if sort.mode == mode.id %}class="disabled"{% endif %}>
        <a href="?{{ sort_querystring.urlencode }}&sort={{ mode.id }}">{% trans mode.label %}</a>
Nicolas Joyard's avatar
Nicolas Joyard committed
18 19 20 21
      </li>
    {% endfor %}
  </ul>
</div>