Commit 9fe4b93562497ac772ed94fad8768d69f9c19329

Authored by Luan
1 parent 29c312c2

Adding missing collaborators subfilter and removing icon when filtering by type

src/search/views.py
... ... @@ -10,14 +10,17 @@ class ColabSearchView(SearchView):
10 10 def extra_context(self, *args, **kwargs):
11 11 types = {
12 12 'wiki': {
13   - 'icon': 'file',
14 13 'name': _(u'Wiki'),
15 14 'fields': (
16 15 ('author', _(u'Author'), self.request.GET.get('author')),
  16 + (
  17 + 'collaborators',
  18 + _(u'Collaborators'),
  19 + self.request.GET.get('collaborators'),
  20 + ),
17 21 ),
18 22 },
19 23 'thread': {
20   - 'icon': 'thread',
21 24 'name': _(u'Discussion'),
22 25 'fields': (
23 26 ('author', _(u'Author'), self.request.GET.get('author')),
... ... @@ -29,7 +32,6 @@ class ColabSearchView(SearchView):
29 32 ),
30 33 },
31 34 'ticket': {
32   - 'icon': 'ticket',
33 35 'name': _(u'Ticket'),
34 36 'fields': (
35 37 (
... ... @@ -72,7 +74,6 @@ class ColabSearchView(SearchView):
72 74 ),
73 75 },
74 76 'changeset': {
75   - 'icon': 'changeset',
76 77 'name': _(u'Changeset'),
77 78 'fields': (
78 79 ('author', _(u'Author'), self.request.GET.get('author')),
... ... @@ -84,7 +85,6 @@ class ColabSearchView(SearchView):
84 85 )
85 86 },
86 87 'user': {
87   - 'icon': 'user',
88 88 'name': _(u'User'),
89 89 'fields': (
90 90 (
... ...
src/templates/search/search.html
... ... @@ -22,8 +22,7 @@
22 22 <li class="selected" title="{% trans "Remove filter" %}">
23 23 <span class="glyphicon glyphicon-remove"></span>
24 24 <a href="{% url 'haystack_search' %}?q={{ request.GET.q }}{% if request.GET.order %}&order={{ request.GET.order }}{% endif %}">
25   - <span class="glyphicon glyphicon-{{ filters.icon }}"></span>
26   - {{ filters.name }}
  25 + {{ filters.name }}
27 26 </a>
28 27 </li>
29 28 </ul>
... ...