Commit 8e485448b6b359ae6bb37b9e95316ec52610c016

Authored by Luan
1 parent 59897745

Adding link to the remove icon on discussions and search

src/super_archives/templates/message-list.html
... ... @@ -28,10 +28,20 @@
28 28 <ul class="unstyled-list">
29 29 {% for list in lists %}
30 30 {% with list.name|add:" "|add:selected_lists as list_name %}
31   - <li {% if list.name in selected_lists %} title="{% trans "Remove filter" %}" class="selected" {% endif %}>
32   - <span class="glyphicon {% if list.name in selected_lists %}glyphicon-remove{% else %}glyphicon-chevron-right{% endif %}"></span>
33   - <a href="{% if not list.name in selected_lists %}{% append_to_get list=list_name p=1 %}{% else %}{% pop_from_get list=list.name %}{% endif %}">{{ list.name }}</a>
34   - </li>
  31 + {% if list.name in selected_lists %}
  32 + <li title="{% trans "Remove filter" %}" class="selected">
  33 + <a href="{% pop_from_get list=list.name %}">
  34 + <span class="glyphicon glyphicon-remove"></span> {{ list.name }}
  35 + </a>
  36 + </li>
  37 + {% else %}
  38 + <li>
  39 + <span class="glyphicon glyphicon-chevron-right"></span>
  40 + <a href="{% append_to_get list=list_name p=1 %}">
  41 + {{ list.name }}
  42 + </a>
  43 + </li>
  44 + {% endif %}
35 45 {% endwith %}
36 46 {% endfor %}
37 47 </ul>
... ...
src/templates/search/search.html
... ... @@ -20,10 +20,9 @@
20 20 {% if filters %}
21 21 <ul class="unstyled-list">
22 22 <li class="selected" title="{% trans "Remove filter" %}">
23   - <span class="glyphicon glyphicon-remove"></span>
24   - <a href="{% url 'haystack_search' %}?q={{ request.GET.q }}{% if request.GET.order %}&order={{ request.GET.order }}{% endif %}">
25   - {{ filters.name }}
26   - </a>
  23 + <a href="{% url 'haystack_search' %}?q={{ request.GET.q }}{% if request.GET.order %}&order={{ request.GET.order }}{% endif %}">
  24 + <span class="glyphicon glyphicon-remove"></span> {{ filters.name }}
  25 + </a>
27 26 </li>
28 27 </ul>
29 28 <hr />
... ...