camp/content/templates/results.html

88 lines
3.0 KiB
HTML
Raw Permalink Normal View History

2017-12-18 12:54:04 +00:00
{% extends 'base.html' %}
{% block content %}
<div class="row">
2017-12-19 09:40:14 +00:00
<div class="row">
2017-12-23 21:04:44 +00:00
<div class="medium-8 medium-offset-2 columns results-title">
2017-12-22 22:22:14 +00:00
{% if section %}
<h3> {{section }}</h3>
{% else %}
2017-12-19 09:40:14 +00:00
<h3> Search results </h3>
2017-12-22 22:22:14 +00:00
{% endif %}
2017-12-19 09:40:14 +00:00
</div>
</div>
2017-12-22 22:22:14 +00:00
{% for row in content %}
{% if row.type.name == 'news' %}
2017-12-18 12:54:04 +00:00
<div class="row">
2017-12-23 21:04:44 +00:00
<div class= "medium-8 medium-offset-2 columns">
2017-12-22 22:22:14 +00:00
<h6 class="sidebar-date"> <font color="#ef4e5c"> <b> {{row.datestart}} </b>
{{ row.title }} <br />
2018-06-16 11:48:28 +00:00
{{ row.formatted_header }} </font>
2017-12-18 12:54:04 +00:00
</h6>
</div>
</div>
2017-12-23 11:06:13 +00:00
{% else %}
<div class="row results">
2017-12-23 21:04:44 +00:00
<div class="small-6 medium-4 medium-offset-2 large-2 large-offset-2 columns">
{% if row.image_url %}
<a href="{{ row.get_absolute_url }}"> <img src="{{ row.image_url }}"> </a>
2018-08-21 10:43:37 +00:00
{% else %}
&nbsp;
{% endif %}
</div>
2017-12-23 21:04:44 +00:00
<div class="small-6 medium-4 end columns">
<a href="{{ row.get_absolute_url }}" class="sidebar-title">{{ row.title }}</a>
2017-12-23 11:06:13 +00:00
{% if row.type.name == 'events' %}
<h6 class="sidebar-date"> <font color="#ef4e5c"> <b> {{ row.datestart }} {% if row.dateend %} - {{row.dateend}} {% endif %} </b></font>
{% if row.place %}<br/> {{row.place}} {% endif%}</h6>
{% endif %}
2017-12-23 11:06:13 +00:00
<p> {{row.formatted_teaser}} </p>
<a href="{{ row.get_absolute_url }}">read more</a> </p>
2017-12-18 12:54:04 +00:00
</div>
</div>
{% endif %}
{% endfor %}
<br>
<br>
2018-08-21 18:13:38 +00:00
{% if years %}
<div class="row">
2018-08-27 10:51:26 +00:00
<ul class="years">
2018-08-21 18:13:38 +00:00
{% for y in years %}
{% if year == y %}
<li><span class="current">{{y}}</a></li>
{% else %}
<li><a href="?{{ base_query }}year={{ y }}">{{y}}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
2017-12-22 22:22:14 +00:00
{% if content.has_other_pages %}
2017-12-19 09:40:14 +00:00
<div class="row">
2017-12-23 21:04:44 +00:00
<div class="medium-8 medium-offset-2 end columns">
2017-12-19 09:40:14 +00:00
<ul class="pagination">
2017-12-22 22:22:14 +00:00
{% if content.has_previous %}
<li><a href="?{{ base_query }}&page={{ content.previous_page_number }}">&laquo;</a></li>
2017-12-19 09:40:14 +00:00
{% else %}
<li class="disabled"><span>&laquo;</span></li>
{% endif %}
2017-12-22 22:22:14 +00:00
{% for i in content.paginator.page_range %}
{% if content.number == i %}
2017-12-19 09:40:14 +00:00
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}
2017-12-22 22:22:14 +00:00
<li><a href="?{{ base_query }}page={{ i }}">{{ i }}</a></li>
2017-12-19 09:40:14 +00:00
{% endif %}
{% endfor %}
2017-12-22 22:22:14 +00:00
{% if content.has_next %}
<li><a href="?{{ base_query }}page={{ content.next_page_number }}">&raquo;</a></li>
2017-12-19 09:40:14 +00:00
{% else %}
<li class="disabled"><span>&raquo;</span></li>
{% endif %}
</ul>
</div>
</div>
2018-08-21 18:13:38 +00:00
{% endif %}
2017-12-18 12:54:04 +00:00
</div>
{% endblock %}