Commit 155f77414473e7c42228d709b202f2a79d3393b3
1 parent
101e2f87
Exists in
master
and in
39 other branches
Changing search datepicker for mobiles
Showing
1 changed file
with
41 additions
and
13 deletions
Show diff stats
src/search/templates/search/includes/search_filters.html
@@ -138,30 +138,58 @@ | @@ -138,30 +138,58 @@ | ||
138 | </ul> | 138 | </ul> |
139 | {% endif %} | 139 | {% endif %} |
140 | <hr /> | 140 | <hr /> |
141 | -<form role="form"> | 141 | + |
142 | +<!-- Desktop since and date filters --> | ||
143 | +<form role="form" class="hidden-sm hidden-xs"> | ||
142 | {% for name, value in request.GET.items %} | 144 | {% for name, value in request.GET.items %} |
143 | {% if value and not name == "since" and not name == "until" %} | 145 | {% if value and not name == "since" and not name == "until" %} |
144 | <input type="hidden" name="{{ name }}" value="{{ value }}" /> | 146 | <input type="hidden" name="{{ name }}" value="{{ value }}" /> |
145 | {% endif %} | 147 | {% endif %} |
146 | {% endfor %} | 148 | {% endfor %} |
149 | + | ||
147 | <div class="form-group"> | 150 | <div class="form-group"> |
148 | <label for="since">{% trans "Since" %}</label> | 151 | <label for="since">{% trans "Since" %}</label> |
149 | - <div class="input-group date" id="datepicker_since"> | ||
150 | - <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" /> | ||
151 | - <span class="input-group-addon"> | ||
152 | - <span class="glyphicon glyphicon-calendar"></span> | ||
153 | - </span> | ||
154 | - </div> | 152 | + <div class="input-group date" id="datepicker_since"> |
153 | + <input type="text" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" /> | ||
154 | + <span class="input-group-addon"> | ||
155 | + <span class="glyphicon glyphicon-calendar"></span> | ||
156 | + </span> | ||
157 | + </div> | ||
155 | </div> | 158 | </div> |
156 | <div class="form-group"> | 159 | <div class="form-group"> |
157 | <label for="until">{% trans "Until" %}</label> | 160 | <label for="until">{% trans "Until" %}</label> |
158 | - <div class="input-group date" id="datepicker_until"> | ||
159 | - <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" /> | ||
160 | - <span class="input-group-addon"> | ||
161 | - <span class="glyphicon glyphicon-calendar"></span> | ||
162 | - </span> | ||
163 | - </div> | 161 | + <div class="input-group date" id="datepicker_until"> |
162 | + <input type="text" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" /> | ||
163 | + <span class="input-group-addon"> | ||
164 | + <span class="glyphicon glyphicon-calendar"></span> | ||
165 | + </span> | ||
166 | + </div> | ||
167 | + </div> | ||
168 | + | ||
169 | + <p class="text-right"> | ||
170 | + <button type="submit" class="btn btn-default"> | ||
171 | + <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %} | ||
172 | + </button> | ||
173 | + </p> | ||
174 | +</form> | ||
175 | + | ||
176 | +<!-- Mobile since and date filters --> | ||
177 | +<form role="form" class="hidden-md hidden-lg"> | ||
178 | + {% for name, value in request.GET.items %} | ||
179 | + {% if value and not name == "since" and not name == "until" %} | ||
180 | + <input type="hidden" name="{{ name }}" value="{{ value }}" /> | ||
181 | + {% endif %} | ||
182 | + {% endfor %} | ||
183 | + | ||
184 | + <div class="form-group"> | ||
185 | + <label for="since">{% trans "Since" %}</label> | ||
186 | + <input type="date" class="form-control" placeholder="{% trans "Since" %}" name="since" value="{{ request.GET.since }}" /> | ||
164 | </div> | 187 | </div> |
188 | + <div class="form-group hidden-md hidden-lg"> | ||
189 | + <label for="until">{% trans "Until" %}</label> | ||
190 | + <input type="date" class="form-control" placeholder="{% trans "Until" %}" name="until" value="{{ request.GET.until }}" /> | ||
191 | + </div> | ||
192 | + | ||
165 | <p class="text-right"> | 193 | <p class="text-right"> |
166 | <button type="submit" class="btn btn-default"> | 194 | <button type="submit" class="btn btn-default"> |
167 | <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %} | 195 | <span class="glyphicon glyphicon-filter"></span> {% trans "Filter" %} |