Commit af50e491ba92f610efb82f62310d42631be07b51

Authored by Luan
1 parent 183cb97c

Changing search templates location and making the filter an include

src/search/templates/search/includes/search_filters.html 0 → 100644
... ... @@ -0,0 +1,172 @@
  1 +{% load i18n superarchives %}
  2 +
  3 +<h3>{% trans "Filters" %}</h3>
  4 +
  5 + {% if filters %}
  6 + <ul class="unstyled-list">
  7 + <li class="selected" title="{% trans "Remove filter" %}">
  8 + <a href="{% url 'haystack_search' %}?q={{ request.GET.q }}{% if request.GET.order %}&order={{ request.GET.order }}{% endif %}{% if request.GET.since %}&since={{ request.GET.since }}{% endif %}{% if request.GET.until %}&until={{ request.GET.until }}{% endif %}">
  9 + <span class="glyphicon glyphicon-remove"></span> {{ filters.name }}
  10 + </a>
  11 + </li>
  12 + </ul>
  13 + <hr />
  14 + <form role="form">
  15 + <input type="hidden" name="q" value="{{ request.GET.q }}" />
  16 + <input type="hidden" name="order" value="{{ request.GET.order }}" />
  17 + <input type="hidden" name="type" value="{{ type_chosen }}" />
  18 + <input type="hidden" name="since" value="{{ request.GET.since }}" />
  19 + <input type="hidden" name="until" value="{{ request.GET.until }}" />
  20 +
  21 + {% for field_lookup, field_display, field_value in filters.fields %}
  22 + <div class="form-group">
  23 + <label for="{{ field_lookup }}">{{ field_display }}</label>
  24 + {% if field_lookup == "list" %}
  25 + <select name="{{ field_lookup }}" class="form-control" multiple>
  26 + {% for value, option in form.fields.list.choices %}
  27 + <option value="{{ value }}" {% if value in field_value %}selected{% endif %}>{{ option }}</option>
  28 + {% endfor %}
  29 + </select>
  30 + {% elif field_lookup == "size" %}
  31 + <ul class="unstyled-list">
  32 + {% for value, option in size_choices %}
  33 + {% with value|add:" "|add:size_chosen as sizelistadd %}
  34 + {% if value in field_value %}
  35 + <li class="selected" title="{% trans "Remove filter" %}">
  36 + <span class="glyphicon glyphicon-remove"></span>
  37 + <a href="{% pop_from_get size=value %}">{{ option }}</a>
  38 + </li>
  39 + {% else %}
  40 + <li>
  41 + <span class="glyphicon glyphicon-chevron-right"></span>
  42 + <a href="{% append_to_get size=sizelistadd %}">{{ option }}</a>
  43 + </li>
  44 + {% endif %}
  45 + {% endwith %}
  46 + {% endfor %}
  47 + </ul>
  48 + {% elif field_lookup == "mimetype" %}
  49 + <ul class="unstyled-list">
  50 + {% for value, option in mimetype_choices %}
  51 + {% with value|add:" "|add:mimetype_chosen as mimelistadd %}
  52 + {% if value in mimetype_chosen %}
  53 + <li class="selected" title="{% trans "Remove filter" %}">
  54 + <span class="glyphicon glyphicon-remove"></span>
  55 + <a href="{% pop_from_get mimetype=value %}">{{ option }}</a>
  56 + </li>
  57 + {% else %}
  58 + <li>
  59 + <span class="glyphicon glyphicon-chevron-right"></span>
  60 + <a href="{% append_to_get mimetype=mimelistadd %}">{{ option }}</a>
  61 + </li>
  62 + {% endif %}
  63 + {% endwith %}
  64 + {% endfor %}
  65 + </ul>
  66 + {% elif field_lookup == "used_by" %}
  67 + <ul class="unstyled-list">
  68 + {% for value, option in used_by_choices %}
  69 + {% with value|add:" "|add:used_by_chosen as used_byadd %}
  70 + {% if value in used_by_chosen %}
  71 + <li class="selected" title="{% trans "Remove filter" %}">
  72 + <span class="glyphicon glyphicon-remove"></span>
  73 + <a href="{% pop_from_get used_by=value %}">{{ option }}</a>
  74 + </li>
  75 + {% else %}
  76 + <li>
  77 + <span class="glyphicon glyphicon-chevron-right"></span>
  78 + <a href="{% append_to_get used_by=used_byadd %}">{{ option }}</a>
  79 + </li>
  80 + {% endif %}
  81 + {% endwith %}
  82 + {% endfor %}
  83 + </ul>
  84 + {% else %}
  85 + <input type="text" class="form-control" placeholder="{{ field_display }}" name="{{ field_lookup }}" {% if field_value %}value="{{ field_value }}"{% endif %}>
  86 + {% endif %}
  87 + </div>
  88 + {% endfor %}
  89 + <button type="submit" class="btn btn-default pull-right">
  90 + <span class="glyphicon glyphicon-filter"></span> {% trans 'Filter' %}
  91 + </button>
  92 + </form>
  93 + <br /><br /><hr />
  94 + {% endif %}
  95 +
  96 + <h4>{% trans "Sort by" %}</h4>
  97 + <ul class="unstyled-list">
  98 + {% for option, dict_order in order_data.items %}
  99 + <li>
  100 + <span class="glyphicon glyphicon-chevron-right"></span>
  101 + <a href="{% append_to_get order=option p=1 %}">
  102 + {% ifequal request.GET.order option %}
  103 + {% blocktrans with name=dict_order.name %}<strong>{{ name }}</strong>{% endblocktrans %}
  104 + {% else %}
  105 + {% blocktrans with name=dict_order.name %}{{ name }}{% endblocktrans %}
  106 + {% endifequal %}
  107 + </a>
  108 + </li>
  109 + {% endfor %}
  110 + </ul>
  111 +
  112 + {% if not request.GET.type %}
  113 + <h4>{% trans "Types" %}</h4>
  114 +
  115 + <ul class="unstyled-list">
  116 + <li>
  117 + <span class="glyphicon glyphicon-book"></span>
  118 + <a href="{% append_to_get type='wiki' %}">{% trans "Wiki" %}</a>
  119 + </li>
  120 + <li>
  121 + <span class="glyphicon glyphicon-envelope"></span>
  122 + <a href="{% append_to_get type='thread' %}">{% trans "Discussion" %}</a>
  123 + </li>
  124 + <li>
  125 + <span class="glyphicon glyphicon-tag"></span>
  126 + <a href="{% append_to_get type='ticket' %}">{% trans "Ticket" %}</a>
  127 + </li>
  128 + <li>
  129 + <span class="glyphicon glyphicon-align-right"></span>
  130 + <a href="{% append_to_get type='changeset' %}">{% trans "Changeset" %}</a>
  131 + </li>
  132 + <li>
  133 + <span class="glyphicon glyphicon-user"></span>
  134 + <a href="{% append_to_get type='user' %}">{% trans "User" %}</a>
  135 + </li>
  136 + <li>
  137 + <span class="glyphicon glyphicon-file"></span>
  138 + <a href="{% append_to_get type='attachment' %}">{% trans "Attachment" %}</a>
  139 + </li>
  140 + </ul>
  141 + {% endif %}
  142 + <hr />
  143 + <form role="form">
  144 + {% for name, value in request.GET.items %}
  145 + {% if value and not name == "since" and not name == "until" %}
  146 + <input type="hidden" name="{{ name }}" value="{{ value }}" />
  147 + {% endif %}
  148 + {% endfor %}
  149 + <div class="form-group">
  150 + <label for="since">{% trans "Since" %}</label>
  151 + <div class="input-group date" id="datepicker_since">
  152 + <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" />
  153 + <span class="input-group-addon">
  154 + <span class="glyphicon glyphicon-calendar"></span>
  155 + </span>
  156 + </div>
  157 + </div>
  158 + <div class="form-group">
  159 + <label for="until">{% trans "Until" %}</label>
  160 + <div class="input-group date" id="datepicker_until">
  161 + <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" />
  162 + <span class="input-group-addon">
  163 + <span class="glyphicon glyphicon-calendar"></span>
  164 + </span>
  165 + </div>
  166 + </div>
  167 + <p class="text-right">
  168 + <button type="submit" class="btn btn-default">
  169 + <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %}
  170 + </button>
  171 + </p>
  172 + </form>
... ...
src/search/templates/search/search-message-preview.html 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +{% load i18n %}
  2 +
  3 +<span class="glyphicon glyphicon-envelope" title="{{ result.type }}"></span>
  4 +
  5 +{% if result.mailinglist %}
  6 + <a href="{% url 'super_archives.views.list_messages' %}?list={{ result.mailinglist }}">
  7 + <span class="label label-primary">{{ result.mailinglist }}</span>
  8 + </a>
  9 +{% endif %}
  10 +
  11 +<span class="subject">
  12 + <a href="{{ result.url }}#msg-{{ result.pk }}"
  13 + title="{% filter striptags|truncatewords:50 %}{{ result.description|escape }}{% endfilter %}">
  14 + {{ result.title }}
  15 + </a>
  16 +</span>
  17 +
  18 +<span class="quiet">- {{ result.description|striptags }}</span>
... ...
src/search/templates/search/search-revision-preview.html 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +{% load i18n %}
  2 +
  3 +<span class="glyphicon glyphicon-align-right" title="{{ result.type }}"></span>
  4 +
  5 +<span class="subject">
  6 + <a href="{{ result.url }}">{{ result.repository_name }} [{{ result.revision }}]</a>
  7 +</span>
  8 +
  9 +<span class="quiet">{% if result.message %}- {{ result.message }}{% endif %}</span>
... ...
src/search/templates/search/search-ticket-preview.html 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +{% load i18n %}
  2 +{% load highlight %}
  3 +
  4 +<span class="glyphicon glyphicon-tag" title="{{ result.type }}"></span>
  5 +
  6 +<a href="{{ result.url }}" title="{{ result.description|escape }}">
  7 +{% if result.status %}
  8 + <span class="label label-primary">{{ result.status }}</span>
  9 +{% endif %}
  10 +
  11 +<span class="subject">
  12 + #{{ result.pk }} - {% filter striptags|truncatewords:50 %}{{ result.summary|escape }}{% endfilter %}
  13 + </a>
  14 +</span>
  15 +
  16 +<span class="quiet">- {% highlight result.description with query max_length "150" %}</span>
... ...
src/search/templates/search/search-user-preview.html 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +{% load i18n %}
  2 +
  3 +<span class="glyphicon glyphicon-user" title="{{ result.type }}"></span>
  4 +
  5 +<span class="subject">
  6 + <a href="{% url 'user_profile' result.username %}">{{ result.name }}</a>
  7 +</span>
  8 +
  9 +<span class="quiet">{% if result.institution %}- {{ result.institution }}{% endif %}{% if result.role %} - {{ result.role }}{% endif %}</span>
... ...
src/search/templates/search/search-wiki-preview.html 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +{% load i18n %}
  2 +
  3 +<span class="glyphicon glyphicon-book" title="{{ result.type }}"></span>
  4 +
  5 +<span class="subject">
  6 + <a href="{{ result.url }}">{{ result.name }}</a>
  7 +</span>
  8 +
  9 +<span class="quiet">{% if result.wiki_text %}- {{ result.wiki_text|truncatechars:150 }}{% elif result.comment %}- {{ result.comment|truncatechars:150 }}{% endif %}</span>
... ...
src/search/templates/search/search.html 0 → 100644
... ... @@ -0,0 +1,79 @@
  1 +{% extends "base.html" %}
  2 +{% load i18n highlight superarchives %}
  3 +
  4 +{% block head_js %}
  5 +<script type="text/javascript" src="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
  6 +{% if use_language %}
  7 + <script type="text/javascript" src="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.{{ use_language }}.js"></script>
  8 +{% endif %}
  9 +
  10 +<script type="text/javascript">
  11 + $(function () {
  12 + $('#datepicker_since, #datepicker_until').datetimepicker({
  13 + pickTime: false,
  14 + {% if use_language and date_format %}
  15 + language: '{{ use_language }}',
  16 + format: '{{ date_format }}',
  17 + {% endif %}
  18 + });
  19 + });
  20 +</script>
  21 +{% endblock %}
  22 +
  23 +{% block head_css %}
  24 +<link rel="stylesheet" href="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"/>
  25 +{% endblock %}
  26 +
  27 +{% block main-content %}
  28 + <div class="row">
  29 + <div class="col-xs-6 col-sm-4 col-md-2 col-lg-2">
  30 + <h2>{% trans "Search" %}</h2>
  31 + </div>
  32 + <div class="col-xs-6 col-sm-8 col-md-10 col-lg-10">
  33 + <br/><br/>
  34 + <p class="text-right quiet">
  35 + {{ page.paginator.count }} {% trans "documents found" %}
  36 + </p>
  37 + </div>
  38 + </div>
  39 +
  40 + <hr/>
  41 +
  42 + <div class="row">
  43 + <div id="filters" class="hidden-xs hidden-sm col-md-2 col-lg-2">
  44 + {% include "search/includes/search_filters.html" %}
  45 + </div>
  46 +
  47 + <div class="col-lg-10">
  48 + <ul class="list-unstyled">
  49 + {% for result in page.object_list %}
  50 + {% include "message-preview.html" %}
  51 + {% empty %}
  52 + <li class="text-center">
  53 + {% trans "No results for your search." %}
  54 + </li>
  55 + {% endfor %}
  56 + </ul>
  57 +
  58 + {% if page.has_other_pages %}
  59 + <div class="text-center">
  60 + <span>
  61 + {% if page.has_previous %}
  62 + <a href="{% append_to_get page=page.previous_page_number %}">{% trans "Previous" %}</a>
  63 + {% endif %}
  64 + <span>
  65 + {% trans "Page" %} {{ page.number }} {% trans "of" %}
  66 + {{ page.paginator.num_pages }}
  67 + </span>
  68 +
  69 + {% if page.has_next %}
  70 + <a href="{% append_to_get page=page.next_page_number %}">{% trans "Next" %}</a>
  71 + {% endif %}
  72 + </span>
  73 + </div>
  74 + {% endif %}
  75 +
  76 + </div>
  77 + </div>
  78 +
  79 +{% endblock %}
... ...
src/templates/search/search-message-preview.html
... ... @@ -1,18 +0,0 @@
1   -{% load i18n %}
2   -
3   -<span class="glyphicon glyphicon-envelope" title="{{ result.type }}"></span>
4   -
5   -{% if result.mailinglist %}
6   - <a href="{% url 'super_archives.views.list_messages' %}?list={{ result.mailinglist }}">
7   - <span class="label label-primary">{{ result.mailinglist }}</span>
8   - </a>
9   -{% endif %}
10   -
11   -<span class="subject">
12   - <a href="{{ result.url }}#msg-{{ result.pk }}"
13   - title="{% filter striptags|truncatewords:50 %}{{ result.description|escape }}{% endfilter %}">
14   - {{ result.title }}
15   - </a>
16   -</span>
17   -
18   -<span class="quiet">- {{ result.description|striptags }}</span>
src/templates/search/search-revision-preview.html
... ... @@ -1,9 +0,0 @@
1   -{% load i18n %}
2   -
3   -<span class="glyphicon glyphicon-align-right" title="{{ result.type }}"></span>
4   -
5   -<span class="subject">
6   - <a href="{{ result.url }}">{{ result.repository_name }} [{{ result.revision }}]</a>
7   -</span>
8   -
9   -<span class="quiet">{% if result.message %}- {{ result.message }}{% endif %}</span>
src/templates/search/search-ticket-preview.html
... ... @@ -1,16 +0,0 @@
1   -{% load i18n %}
2   -{% load highlight %}
3   -
4   -<span class="glyphicon glyphicon-tag" title="{{ result.type }}"></span>
5   -
6   -<a href="{{ result.url }}" title="{{ result.description|escape }}">
7   -{% if result.status %}
8   - <span class="label label-primary">{{ result.status }}</span>
9   -{% endif %}
10   -
11   -<span class="subject">
12   - #{{ result.pk }} - {% filter striptags|truncatewords:50 %}{{ result.summary|escape }}{% endfilter %}
13   - </a>
14   -</span>
15   -
16   -<span class="quiet">- {% highlight result.description with query max_length "150" %}</span>
src/templates/search/search-user-preview.html
... ... @@ -1,9 +0,0 @@
1   -{% load i18n %}
2   -
3   -<span class="glyphicon glyphicon-user" title="{{ result.type }}"></span>
4   -
5   -<span class="subject">
6   - <a href="{% url 'user_profile' result.username %}">{{ result.name }}</a>
7   -</span>
8   -
9   -<span class="quiet">{% if result.institution %}- {{ result.institution }}{% endif %}{% if result.role %} - {{ result.role }}{% endif %}</span>
src/templates/search/search-wiki-preview.html
... ... @@ -1,9 +0,0 @@
1   -{% load i18n %}
2   -
3   -<span class="glyphicon glyphicon-book" title="{{ result.type }}"></span>
4   -
5   -<span class="subject">
6   - <a href="{{ result.url }}">{{ result.name }}</a>
7   -</span>
8   -
9   -<span class="quiet">{% if result.wiki_text %}- {{ result.wiki_text|truncatechars:150 }}{% elif result.comment %}- {{ result.comment|truncatechars:150 }}{% endif %}</span>
src/templates/search/search.html
... ... @@ -1,246 +0,0 @@
1   -{% extends "base.html" %}
2   -{% load i18n highlight superarchives %}
3   -
4   -{% block head_js %}
5   -<script type="text/javascript" src="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
6   -{% if use_language %}
7   - <script type="text/javascript" src="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.{{ use_language }}.js"></script>
8   -{% endif %}
9   -
10   -<script type="text/javascript">
11   - $(function () {
12   - $('#datepicker_since, #datepicker_until').datetimepicker({
13   - pickTime: false,
14   - {% if use_language and date_format %}
15   - language: '{{ use_language }}',
16   - format: '{{ date_format }}',
17   - {% endif %}
18   - });
19   - });
20   -</script>
21   -{% endblock %}
22   -
23   -{% block head_css %}
24   -<link rel="stylesheet" href="{{ STATIC_URL }}third-party/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"/>
25   -{% endblock %}
26   -
27   -{% block main-content %}
28   - <div class="row">
29   - <div class="col-xs-6 col-sm-4 col-md-2 col-lg-2">
30   - <h2>{% trans "Search" %}</h2>
31   - </div>
32   - <div class="col-xs-6 col-sm-8 col-md-10 col-lg-10">
33   - <br/><br/>
34   - <p class="text-right quiet">
35   - {{ page.paginator.count }} {% trans "documents found" %}
36   - </p>
37   - </div>
38   - </div>
39   -
40   - <hr/>
41   -
42   - <div class="row">
43   - <div id="filters" class="hidden-xs hidden-sm col-md-2 col-lg-2">
44   - <h3>{% trans "Filters" %}</h3>
45   -
46   - {% if filters %}
47   - <ul class="unstyled-list">
48   - <li class="selected" title="{% trans "Remove filter" %}">
49   - <a href="{% url 'haystack_search' %}?q={{ request.GET.q }}{% if request.GET.order %}&order={{ request.GET.order }}{% endif %}{% if request.GET.since %}&since={{ request.GET.since }}{% endif %}{% if request.GET.until %}&until={{ request.GET.until }}{% endif %}">
50   - <span class="glyphicon glyphicon-remove"></span> {{ filters.name }}
51   - </a>
52   - </li>
53   - </ul>
54   - <hr />
55   - <form role="form">
56   - <input type="hidden" name="q" value="{{ request.GET.q }}" />
57   - <input type="hidden" name="order" value="{{ request.GET.order }}" />
58   - <input type="hidden" name="type" value="{{ type_chosen }}" />
59   - <input type="hidden" name="since" value="{{ request.GET.since }}" />
60   - <input type="hidden" name="until" value="{{ request.GET.until }}" />
61   -
62   - {% for field_lookup, field_display, field_value in filters.fields %}
63   - <div class="form-group">
64   - <label for="{{ field_lookup }}">{{ field_display }}</label>
65   - {% if field_lookup == "list" %}
66   - <select name="{{ field_lookup }}" class="form-control" multiple>
67   - {% for value, option in form.fields.list.choices %}
68   - <option value="{{ value }}" {% if value in field_value %}selected{% endif %}>{{ option }}</option>
69   - {% endfor %}
70   - </select>
71   - {% elif field_lookup == "size" %}
72   - <ul class="unstyled-list">
73   - {% for value, option in size_choices %}
74   - {% with value|add:" "|add:size_chosen as sizelistadd %}
75   - {% if value in field_value %}
76   - <li class="selected" title="{% trans "Remove filter" %}">
77   - <span class="glyphicon glyphicon-remove"></span>
78   - <a href="{% pop_from_get size=value %}">{{ option }}</a>
79   - </li>
80   - {% else %}
81   - <li>
82   - <span class="glyphicon glyphicon-chevron-right"></span>
83   - <a href="{% append_to_get size=sizelistadd %}">{{ option }}</a>
84   - </li>
85   - {% endif %}
86   - {% endwith %}
87   - {% endfor %}
88   - </ul>
89   - {% elif field_lookup == "mimetype" %}
90   - <ul class="unstyled-list">
91   - {% for value, option in mimetype_choices %}
92   - {% with value|add:" "|add:mimetype_chosen as mimelistadd %}
93   - {% if value in mimetype_chosen %}
94   - <li class="selected" title="{% trans "Remove filter" %}">
95   - <span class="glyphicon glyphicon-remove"></span>
96   - <a href="{% pop_from_get mimetype=value %}">{{ option }}</a>
97   - </li>
98   - {% else %}
99   - <li>
100   - <span class="glyphicon glyphicon-chevron-right"></span>
101   - <a href="{% append_to_get mimetype=mimelistadd %}">{{ option }}</a>
102   - </li>
103   - {% endif %}
104   - {% endwith %}
105   - {% endfor %}
106   - </ul>
107   - {% elif field_lookup == "used_by" %}
108   - <ul class="unstyled-list">
109   - {% for value, option in used_by_choices %}
110   - {% with value|add:" "|add:used_by_chosen as used_byadd %}
111   - {% if value in used_by_chosen %}
112   - <li class="selected" title="{% trans "Remove filter" %}">
113   - <span class="glyphicon glyphicon-remove"></span>
114   - <a href="{% pop_from_get used_by=value %}">{{ option }}</a>
115   - </li>
116   - {% else %}
117   - <li>
118   - <span class="glyphicon glyphicon-chevron-right"></span>
119   - <a href="{% append_to_get used_by=used_byadd %}">{{ option }}</a>
120   - </li>
121   - {% endif %}
122   - {% endwith %}
123   - {% endfor %}
124   - </ul>
125   - {% else %}
126   - <input type="text" class="form-control" placeholder="{{ field_display }}" name="{{ field_lookup }}" {% if field_value %}value="{{ field_value }}"{% endif %}>
127   - {% endif %}
128   - </div>
129   - {% endfor %}
130   - <button type="submit" class="btn btn-default pull-right">
131   - <span class="glyphicon glyphicon-filter"></span> {% trans 'Filter' %}
132   - </button>
133   - </form>
134   - <br /><br /><hr />
135   - {% endif %}
136   -
137   - <h4>{% trans "Sort by" %}</h4>
138   - <ul class="unstyled-list">
139   - {% for option, dict_order in order_data.items %}
140   - <li>
141   - <span class="glyphicon glyphicon-chevron-right"></span>
142   - <a href="{% append_to_get order=option p=1 %}">
143   - {% ifequal request.GET.order option %}
144   - {% blocktrans with name=dict_order.name %}<strong>{{ name }}</strong>{% endblocktrans %}
145   - {% else %}
146   - {% blocktrans with name=dict_order.name %}{{ name }}{% endblocktrans %}
147   - {% endifequal %}
148   - </a>
149   - </li>
150   - {% endfor %}
151   - </ul>
152   -
153   - {% if not request.GET.type %}
154   - <h4>{% trans "Types" %}</h4>
155   -
156   - <ul class="unstyled-list">
157   - <li>
158   - <span class="glyphicon glyphicon-book"></span>
159   - <a href="{% append_to_get type='wiki' %}">{% trans "Wiki" %}</a>
160   - </li>
161   - <li>
162   - <span class="glyphicon glyphicon-envelope"></span>
163   - <a href="{% append_to_get type='thread' %}">{% trans "Discussion" %}</a>
164   - </li>
165   - <li>
166   - <span class="glyphicon glyphicon-tag"></span>
167   - <a href="{% append_to_get type='ticket' %}">{% trans "Ticket" %}</a>
168   - </li>
169   - <li>
170   - <span class="glyphicon glyphicon-align-right"></span>
171   - <a href="{% append_to_get type='changeset' %}">{% trans "Changeset" %}</a>
172   - </li>
173   - <li>
174   - <span class="glyphicon glyphicon-user"></span>
175   - <a href="{% append_to_get type='user' %}">{% trans "User" %}</a>
176   - </li>
177   - <li>
178   - <span class="glyphicon glyphicon-file"></span>
179   - <a href="{% append_to_get type='attachment' %}">{% trans "Attachment" %}</a>
180   - </li>
181   - </ul>
182   - {% endif %}
183   - <hr />
184   - <form role="form">
185   - {% for name, value in request.GET.items %}
186   - {% if value and not name == "since" and not name == "until" %}
187   - <input type="hidden" name="{{ name }}" value="{{ value }}" />
188   - {% endif %}
189   - {% endfor %}
190   - <div class="form-group">
191   - <label for="since">{% trans "Since" %}</label>
192   - <div class="input-group date" id="datepicker_since">
193   - <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" />
194   - <span class="input-group-addon">
195   - <span class="glyphicon glyphicon-calendar"></span>
196   - </span>
197   - </div>
198   - </div>
199   - <div class="form-group">
200   - <label for="until">{% trans "Until" %}</label>
201   - <div class="input-group date" id="datepicker_until">
202   - <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" />
203   - <span class="input-group-addon">
204   - <span class="glyphicon glyphicon-calendar"></span>
205   - </span>
206   - </div>
207   - </div>
208   - <button type="submit" class="btn btn-default pull-right">
209   - <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %}
210   - </button>
211   - </form>
212   - </div>
213   -
214   - <div class="col-lg-10">
215   - <ul class="list-unstyled">
216   - {% for result in page.object_list %}
217   - {% include "message-preview.html" %}
218   - {% empty %}
219   - <li class="text-center">
220   - {% trans "No results for your search." %}
221   - </li>
222   - {% endfor %}
223   - </ul>
224   -
225   - {% if page.has_other_pages %}
226   - <div class="text-center">
227   - <span>
228   - {% if page.has_previous %}
229   - <a href="{% append_to_get page=page.previous_page_number %}">{% trans "Previous" %}</a>
230   - {% endif %}
231   - <span>
232   - {% trans "Page" %} {{ page.number }} {% trans "of" %}
233   - {{ page.paginator.num_pages }}
234   - </span>
235   -
236   - {% if page.has_next %}
237   - <a href="{% append_to_get page=page.next_page_number %}">{% trans "Next" %}</a>
238   - {% endif %}
239   - </span>
240   - </div>
241   - {% endif %}
242   -
243   - </div>
244   - </div>
245   -
246   -{% endblock %}