Commit a6b3019c62902876b326c8fccda68198dbd60220

Authored by Sergio Oliveira
2 parents cf5016b7 919a2083

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

Conflicts:
	src/super_archives/views.py
src/search/templates/search/search.html
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 <script type="text/javascript"> 10 <script type="text/javascript">
11 $(function () { 11 $(function () {
  12 +
12 $('#datepicker_since, #datepicker_until').datetimepicker({ 13 $('#datepicker_since, #datepicker_until').datetimepicker({
13 pickTime: false, 14 pickTime: false,
14 {% if use_language and date_format %} 15 {% if use_language and date_format %}
@@ -16,6 +17,14 @@ @@ -16,6 +17,14 @@
16 format: '{{ date_format }}', 17 format: '{{ date_format }}',
17 {% endif %} 18 {% endif %}
18 }); 19 });
  20 +
  21 + $('#collapseFilters').on('hide.bs.collapse', function() {
  22 + $('.collapse-icon-controller').toggleClass('glyphicon-collapse-down glyphicon-collapse-up');
  23 + });
  24 + $('#collapseFilters').on('show.bs.collapse', function() {
  25 + $('.collapse-icon-controller').toggleClass('glyphicon-collapse-down glyphicon-collapse-up');
  26 + });
  27 +
19 }); 28 });
20 </script> 29 </script>
21 {% endblock %} 30 {% endblock %}
@@ -41,7 +50,7 @@ @@ -41,7 +50,7 @@
41 50
42 <div class="row"> 51 <div class="row">
43 52
44 - <form class="col-xs-12 col-sm-12 col-md-12 hidden-lg" action="{% url "haystack_search" %}"> 53 + <form class="col-xs-12 col-sm-12 hidden-md hidden-lg" action="{% url "haystack_search" %}">
45 <div class="input-group"> 54 <div class="input-group">
46 <input type="text" class="form-control" name="q" placeholder="{% trans "Search here" %}" 55 <input type="text" class="form-control" name="q" placeholder="{% trans "Search here" %}"
47 {% if request.GET.q %}value="{{ request.GET.q }}"{% endif %} /> 56 {% if request.GET.q %}value="{{ request.GET.q }}"{% endif %} />
@@ -64,7 +73,10 @@ @@ -64,7 +73,10 @@
64 <div class="panel panel-default"> 73 <div class="panel panel-default">
65 <div class="panel-heading subject"> 74 <div class="panel-heading subject">
66 <a data-toggle="collapse" data-parent="#accordion" href="#collapseFilters"> 75 <a data-toggle="collapse" data-parent="#accordion" href="#collapseFilters">
67 - <h4 class="panel-title">{% trans "Filters" %}</h4> 76 + <h4 class="panel-title">
  77 + {% trans "Filters" %}
  78 + <span class="glyphicon glyphicon-collapse-down pull-right collapse-icon-controller"></span>
  79 + </h4>
68 </a> 80 </a>
69 </div> 81 </div>
70 <div id="collapseFilters" class="panel-collapse collapse"> 82 <div id="collapseFilters" class="panel-collapse collapse">
src/super_archives/views.py
@@ -11,7 +11,7 @@ from django.conf import settings @@ -11,7 +11,7 @@ from django.conf import settings
11 from django.contrib import messages 11 from django.contrib import messages
12 from django.db import IntegrityError 12 from django.db import IntegrityError
13 from django.views.generic import View 13 from django.views.generic import View
14 -from django.core.paginator import Paginator 14 +from django.core.paginator import Paginator, EmptyPage
15 from django.utils.translation import ugettext as _ 15 from django.utils.translation import ugettext as _
16 from django.core.exceptions import ObjectDoesNotExist 16 from django.core.exceptions import ObjectDoesNotExist
17 from django.utils.decorators import method_decorator 17 from django.utils.decorators import method_decorator
src/templates/base.html
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 <li><a href="/report">{% trans "View Tickets" %}</a></li> 86 <li><a href="/report">{% trans "View Tickets" %}</a></li>
87 </ul> 87 </ul>
88 </li> 88 </li>
89 - <li> 89 + <li class="hidden-lg hidden-md">
90 <a href="{% url 'haystack_search' %}?q=">{% trans "Search" %}</a> 90 <a href="{% url 'haystack_search' %}?q=">{% trans "Search" %}</a>
91 </li> 91 </li>
92 </ul> 92 </ul>