Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Search visuals #371

Merged
merged 3 commits into from
Oct 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web/templates/endless/show_more.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% load i18n %}
{% if querystring %}
<div class="endless_container">
<a class="endless_more" href="{{ path }}{{ querystring }}"
rel="{{ querystring_key }}">{% if label %}{{ label }}{% else %}{% trans "more" %}{% endif %}</a>
<div class="endless_container col-md-6 col-md-offset-3">
<a class="endless_more btn btn-primary btn-lg btn-block" href="{{ path }}{{ querystring }}"
rel="{{ querystring_key }}">{% if label %}{{ label }}{% else %}{% trans "more" %}{% endif %}</a>
<div class="endless_loading" style="display: none;">{{ loading|safe }}</div>
</div>
{% endif %}
5 changes: 4 additions & 1 deletion web/templates/pages/ajax_faceted_search_events.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{% load endless %}

{% if events %}
{% if not page %}
<div class="search-counter">{{ events|length }} {% if events|length > 1 %}events match{% else %}event matches{% endif %} your search criteria:</div>
{% lazy_paginate 6 events as pag_events %}
{% endif %}

{% lazy_paginate 10 events as pag_events %}
{% for event in pag_events %}
{% include 'layout/event_tile_long.html' %}
{% endfor %}
Expand Down
5 changes: 2 additions & 3 deletions web/templates/pages/search_events.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
<form id="faceted-search-events" method="post" action="{% url 'web.search_events' %}" enctype="multipart/form-data">{% csrf_token %}
{{ form.non_field_errors }}
<div class="row">
<div class="form-group col-md-8">
<div class="form-group col-md-9">
{{ form.search }}
</div>
<div class="col-md-3"><input type="submit" class="btn btn-primary btn-lg" value="Search" /></div>
<div class="col-md-12"><hr></div>
</div>
<div class="row">
Expand All @@ -41,8 +42,6 @@
<label>{{ form.fields.audience.label }}</label>
{{ form.audience }}
</div>
<hr>
<input type="submit" class="btn btn-primary btn-lg" value="Search" />
</div>
<div class="col-md-8">
<div id="events-container">
Expand Down
6 changes: 5 additions & 1 deletion web/views/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def search_events(request):
past_events = True if past and past=='yes' else False

search_query = request.GET.get('q', '')
page = request.GET.get('page', None)

template = 'pages/search_events.html'
page_template = 'pages/ajax_faceted_search_events.html'
Expand All @@ -302,7 +303,10 @@ def search_events(request):
if request.is_ajax():
return render_to_response(
page_template,
{'events':events},
{
'events':events,
'page': page
},
context_instance=RequestContext(request))

return render_to_response(
Expand Down