fix errors in dynamic_list_page template

This commit is contained in:
bkfox 2016-11-16 02:28:48 +01:00
parent e5f47be608
commit f0f55176df
2 changed files with 13 additions and 15 deletions

View File

@ -12,18 +12,18 @@
{# Translators: terms are search terms, or tag tarms. url: url to the page #} {# Translators: terms are search terms, or tag tarms. url: url to the page #}
{% with terms=list_selector.terms %} {% with terms=list_selector.terms %}
{% if terms %} {% if terms %}
{% blocktrans %}Search in publications for <i>{{ terms }}</i>{% endblocktrans %} {% blocktrans %}Search in publications for <i>{{ terms }}</i>{% endblocktrans %}
{% elif list_selector.filter_related %} {% elif list_selector.filter_related %}
{# should never happen #} {# should never happen #}
{% with title=list_selector.filter_related.title url=list_selector.filter_related.url %} {% with title=list_selector.filter_related.title url=list_selector.filter_related.url %}
{% blocktrans %} {% blocktrans %}
Related to <a href="{{ url }}">{{ title }}</a>{% endblocktrans %} Related to <a href="{{ url }}">{{ title }}</a>
{% endwith %} {% endblocktrans %}
{% endwith %}
{% else %} {% else %}
{% blocktrans %}All the publications{% endblocktrans %} {% blocktrans %}All the publications{% endblocktrans %}
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% endif %}
</h1> </h1>
{% endblock %} {% endblock %}
@ -41,12 +41,10 @@
{{ page.body|richtext }} {{ page.body|richtext }}
</div> </div>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% with list_paginator=paginator %} {% with list_paginator=paginator %}
{% include "aircox_cms/snippets/list.html" %} {% include "aircox_cms/snippets/list.html" %}
{% endwith %}
{% endif %}
{% endwith %} {% endwith %}
{% endblock %} {% endblock %}

View File

@ -5,7 +5,7 @@
{% load wagtailsettings_tags %} {% load wagtailsettings_tags %}
{% block content %} {% block content %}
{% with list_page=settings.cms.WebsiteSettings.list_page %} {% with list_page=settings.aircox_cms.WebsiteSettings.list_page %}
<form action="{{ list_page.url }}" method="GET"> <form action="{{ list_page.url }}" method="GET">
<img src="{% static "aircox_cms/images/search.png" %}" class="icon"/> <img src="{% static "aircox_cms/images/search.png" %}" class="icon"/>
<input type="text" name="search" placeholder="{{ self.default_text }}"> <input type="text" name="search" placeholder="{{ self.default_text }}">