kopia lustrzana https://github.com/wagtail/wagtail
Use full width (drop right column) if usage is off
rodzic
9b0139ff33
commit
feb02e7857
|
@ -7,25 +7,28 @@
|
||||||
|
|
||||||
<div class="row row-flush">
|
<div class="row row-flush">
|
||||||
|
|
||||||
|
{% usage_count_enabled as uc_enabled %}
|
||||||
|
{% if uc_enabled %}
|
||||||
<div class="col10 divider-after">
|
<div class="col10 divider-after">
|
||||||
|
{% else %}
|
||||||
|
<div class="col12">
|
||||||
|
{% endif %}
|
||||||
<form action="{% url 'wagtailsnippets:edit' model_opts.app_label model_opts.model_name instance.id %}" method="POST" novalidate{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
<form action="{% url 'wagtailsnippets:edit' model_opts.app_label model_opts.model_name instance.id %}" method="POST" novalidate{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ edit_handler.render_form_content }}
|
{{ edit_handler.render_form_content }}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if uc_enabled %}
|
||||||
<div class="col2 ">
|
<div class="col2 ">
|
||||||
<dl>
|
<dl>
|
||||||
{% usage_count_enabled as uc_enabled %}
|
|
||||||
{% if uc_enabled %}
|
|
||||||
<dt>{% trans "Usage" %}</dt>
|
<dt>{% trans "Usage" %}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<a href="{{ instance.usage_url }}">{% blocktrans count usage_count=instance.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
|
<a href="{{ instance.usage_url }}">{% blocktrans count usage_count=instance.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
|
||||||
</dd>
|
</dd>
|
||||||
{% endif %}
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
|
Ładowanie…
Reference in New Issue