Fixing template variables (#2879)

* subtitle is not always defined.

* model_name_plural does not exist. Should be verbose_name_plural.
pull/2851/merge
Adriaan Tijsseling 2016-08-01 12:32:43 +02:00 zatwierdzone przez Matt Westcott
rodzic 1a956be2f2
commit b81997cb0b
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -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">
@ -38,7 +38,7 @@
{% usage_count_enabled as uc_enabled %}
{% if uc_enabled and usage_object %}
<div class="usagecount">
<a href="{{ usage_object.usage_url }}">{% blocktrans count useage_count=usage_object.get_usage.count %}Used {{ useage_count }} time{% plural %}Used {{ useage_count }} times{% endblocktrans %}</a>
<a href="{{ usage_object.usage_url }}">{% blocktrans count useage_count=usage_object.get_usage.count %}Used {{ useage_count }} time{% plural %}Used {{ useage_count }} times{% endblocktrans %}</a>
</div>
{% endif %}
{% if add_link %}