0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Fixing template variables (#2879)

* subtitle is not always defined.

* model_name_plural does not exist. Should be verbose_name_plural.
This commit is contained in:
Adriaan Tijsseling 2016-08-01 12:32:43 +02:00 committed by Matt Westcott
parent 1a956be2f2
commit b81997cb0b
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
<label for="id_q" class="visuallyhidden">{% trans 'Search for' %}</label>
<div class="field-content">
<div class="input icon-search ">
<input id="id_q" name="{{ search_var }}" value="{{ view.query }}" placeholder="{% blocktrans with view.model_name_plural|lower as name %}Search {{ name }}{% endblocktrans %}" type="text">
<input id="id_q" name="{{ search_var }}" value="{{ view.query }}" placeholder="{% blocktrans with view.verbose_name_plural|lower as name %}Search {{ name }}{% endblocktrans %}" type="text">
<span></span>
</div>
</div>

View File

@ -21,7 +21,7 @@
<div class="row">
<div class="left">
<div class="col">
<h1 class="icon icon-{{ icon }}">{{ title }} <span>{{ subtitle }}</span></h1>
<h1 class="icon icon-{{ icon }}">{{ title }}{% if subtitle %} <span>{{ subtitle }}</span>{% endif %}</h1>
</div>
{% if search_url %}
<form class="col search-form" action="{% url search_url %}{% if query_parameters %}?{{ query_parameters }}{% endif %}" method="get">