Commit 03acbc86 authored by Robin's avatar Robin

Working theme list.

parent 9d380936
- load bootstrap3
%form.filter-form{'action': '{{action}}', 'method': 'get'}
- bootstrap_form form=form bound_css_class='filter-form-group'
- buttons
%button{'type': 'submit', 'class': 'btn btn-primary'}
{% bootstrap_icon "filter" %} Filter
- endbuttons
- if csv
- buttons
%button{'type': 'submit', 'name': 'csv', 'class': 'btn btn-default'}
{% bootstrap_icon "download-alt" %} Download as CSV
- endbuttons
{% load bootstrap3 %}
<form class=""filter-form" action="{{action}}" method="get">
{% bootstrap_form form=form bound_css_class="filter-form-group" %}
{% buttons %}
<button type="submit" class"btn btn-primary">
{% bootstrap_icon "filter" %} Filter
</button>
{% endbuttons %}
{% if csv %}
{% buttons %}
<button type="submit" name="csv" class="btn btn-default">
{% bootstrap_icon "download-alt" %} Download as CSV
</button>
{% endbuttons %}
{% endif %}
</form>
- extends "base.html"
- load i18n
- load memopol_tags
- block head
{{ filter.form.media }}
- block content
- block search
{% url 'theme-list' as action_url %}
- include '_filter_form.html' with action=action_url form=filter.form qs=request.GET.urlencode
- if object_list|length == 0
.no-results="No matching themes found :("
- else
- include 'core/blocks/pagination.html'
%h1
- trans "Themes"
%table.table
%tr
%th
- trans "Name"
- for theme in object_list
%tr
%td=
%a{'href': "{% url 'theme-detail' theme.slug %}"}
{{ theme.name }}
- include "core/blocks/pagination.html"
{% extends "base.html" %}
{% load i18n %}
{% load memopol_tags %}
{% block head %}
{{ filter.form.media }}
{% endblock %}
{% block content %}
{% block search %}
{% url 'theme-list' as action_url %}
{% include '_filter_form.html' with action=action_url form=filter.form qs=request.GET.urlencode %}
{% endblock %}
{% if object_list|length == 0 %}
<div class="no-results">
No matching themes found :(
</div>
{% else %}
{% include 'core/blocks/pagination.html' %}
<h1>
{% trans "Themes" %}
</h1>
<table>
<tr>
<th>
{% trans "Name" %}
</th>
</tr>
{% for theme in object_list %}
<tr>
<td>
<a href="{% url 'theme-detail' theme.slug %}">
{{ theme.name }}
</a>
</td>
</tr>
{% endfor %}
</table>
{% include "core/blocks/pagination.html" %}
{% endif %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment