88 lines
3.1 KiB
HTML
88 lines
3.1 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="row">
|
|
<div class="small-4 small-offset-2 columns results-title">
|
|
{% if section %}
|
|
<h3> {{section }}</h3>
|
|
{% else %}
|
|
<h3> Search results </h3>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% for row in content %}
|
|
{% if row.type.name == 'news' %}
|
|
<div class="row">
|
|
<div class= "small-4 small-offset-2 columns">
|
|
<h6 class="sidebar-date"> <font color="#ef4e5c"> <b> {{row.datestart}} </b>
|
|
{{ row.title }} <br />
|
|
{{ row.formatted_header|striptags|safe }} </font>
|
|
</h6>
|
|
</div>
|
|
</div>
|
|
{% elif row.type.name == 'events' %}
|
|
<div class="row results">
|
|
<div class="small-4 small-offset-2 columns">
|
|
<img src="{{ row.image_url }}">
|
|
</div>
|
|
<div class="small-4 end columns">
|
|
<a href="{{ row.get_absolute_url }}" class="sidebar-title">{{ row.title }}</a>
|
|
<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>
|
|
<p> {{content.formatted_teaser}} </p>
|
|
<a href="{{ row.get_absolute_url }}">read more</a> </p>
|
|
</div>
|
|
</div>
|
|
{% elif row.type.name == 'projects' %}
|
|
<div class="row results">
|
|
<div class="small-4 small-offset-2 columns">
|
|
<img src="{{ row.image_url }}">
|
|
</div>
|
|
<div class="small-4 end columns">
|
|
<a href="{{ row.get_absolute_url }}" class="sidebar-title">{{ row.title }}</a>
|
|
<p> {{content.formatted_teaser}} </p>
|
|
<a href="{{ row.get_absolute_url }}">read more</a> </p>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
{% if request.user.is_staff %}
|
|
<div class="row">
|
|
<div class="small-4 small-offset-2 columns">
|
|
Add view for content type: {{row.type}}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
<br>
|
|
<br>
|
|
{% if content.has_other_pages %}
|
|
<div class="row">
|
|
<div class="small-4 small-offset-4 columns">
|
|
<ul class="pagination">
|
|
{% if content.has_previous %}
|
|
<li><a href="?{{ base_query }}&page={{ content.previous_page_number }}">«</a></li>
|
|
{% else %}
|
|
<li class="disabled"><span>«</span></li>
|
|
{% endif %}
|
|
{% for i in content.paginator.page_range %}
|
|
{% if content.number == i %}
|
|
<li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
|
|
{% else %}
|
|
<li><a href="?{{ base_query }}page={{ i }}">{{ i }}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if content.has_next %}
|
|
<li><a href="?{{ base_query }}page={{ content.next_page_number }}">»</a></li>
|
|
{% else %}
|
|
<li class="disabled"><span>»</span></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|