Commit eb6eb08a92a0397b799eafca04b0a989af170489

Authored by Sergio Oliveira
2 parents dc0168e0 8e485448

Merge branch 'master' of github.com:TracyWebTech/colab

src/search/views.py
@@ -10,14 +10,17 @@ class ColabSearchView(SearchView): @@ -10,14 +10,17 @@ class ColabSearchView(SearchView):
10 def extra_context(self, *args, **kwargs): 10 def extra_context(self, *args, **kwargs):
11 types = { 11 types = {
12 'wiki': { 12 'wiki': {
13 - 'icon': 'file',  
14 'name': _(u'Wiki'), 13 'name': _(u'Wiki'),
15 'fields': ( 14 'fields': (
16 ('author', _(u'Author'), self.request.GET.get('author')), 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 'thread': { 23 'thread': {
20 - 'icon': 'thread',  
21 'name': _(u'Discussion'), 24 'name': _(u'Discussion'),
22 'fields': ( 25 'fields': (
23 ('author', _(u'Author'), self.request.GET.get('author')), 26 ('author', _(u'Author'), self.request.GET.get('author')),
@@ -29,7 +32,6 @@ class ColabSearchView(SearchView): @@ -29,7 +32,6 @@ class ColabSearchView(SearchView):
29 ), 32 ),
30 }, 33 },
31 'ticket': { 34 'ticket': {
32 - 'icon': 'ticket',  
33 'name': _(u'Ticket'), 35 'name': _(u'Ticket'),
34 'fields': ( 36 'fields': (
35 ( 37 (
@@ -72,7 +74,6 @@ class ColabSearchView(SearchView): @@ -72,7 +74,6 @@ class ColabSearchView(SearchView):
72 ), 74 ),
73 }, 75 },
74 'changeset': { 76 'changeset': {
75 - 'icon': 'changeset',  
76 'name': _(u'Changeset'), 77 'name': _(u'Changeset'),
77 'fields': ( 78 'fields': (
78 ('author', _(u'Author'), self.request.GET.get('author')), 79 ('author', _(u'Author'), self.request.GET.get('author')),
@@ -84,7 +85,6 @@ class ColabSearchView(SearchView): @@ -84,7 +85,6 @@ class ColabSearchView(SearchView):
84 ) 85 )
85 }, 86 },
86 'user': { 87 'user': {
87 - 'icon': 'user',  
88 'name': _(u'User'), 88 'name': _(u'User'),
89 'fields': ( 89 'fields': (
90 ( 90 (
src/super_archives/templates/message-list.html
@@ -28,10 +28,20 @@ @@ -28,10 +28,20 @@
28 <ul class="unstyled-list"> 28 <ul class="unstyled-list">
29 {% for list in lists %} 29 {% for list in lists %}
30 {% with list.name|add:" "|add:selected_lists as list_name %} 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 {% endwith %} 45 {% endwith %}
36 {% endfor %} 46 {% endfor %}
37 </ul> 47 </ul>
src/templates/search/search.html
@@ -3,12 +3,12 @@ @@ -3,12 +3,12 @@
3 3
4 {% block main-content %} 4 {% block main-content %}
5 <div class="row"> 5 <div class="row">
6 - <div class="col-lg-2"> 6 + <div class="col-lg-12">
7 <h2>{% trans "Search" %}</h2> 7 <h2>{% trans "Search" %}</h2>
8 - </div>  
9 - <span class="pull-right quiet"> 8 + <p class="text-right quiet">
10 {{ page.paginator.count }} {% trans "documents found" %} 9 {{ page.paginator.count }} {% trans "documents found" %}
11 - </span> 10 + </p>
  11 + </div>
12 </div> 12 </div>
13 13
14 <hr/> 14 <hr/>
@@ -20,11 +20,9 @@ @@ -20,11 +20,9 @@
20 {% if filters %} 20 {% if filters %}
21 <ul class="unstyled-list"> 21 <ul class="unstyled-list">
22 <li class="selected" title="{% trans "Remove filter" %}"> 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 - <span class="glyphicon glyphicon-{{ filters.icon }}"></span>  
26 - {{ filters.name }}  
27 - </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>
28 </li> 26 </li>
29 </ul> 27 </ul>
30 <hr /> 28 <hr />