Add a 'none' text on rendering when the custom fields is empty

close #347
This commit is contained in:
2014-11-20 17:35:16 +01:00
parent ff40e2991c
commit b687e9e07d
3 changed files with 15 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
{% if selected|length > 0 %}
<ul class="custom_fields choice">
{%- for choice in choices -%}
{% if choice['slug'] in selected %}{%- set is_selected = true -%}{%- else -%}{%- set is_selected = false -%}{%- endif -%}
@@ -16,4 +17,7 @@
</li>
{%- endif -%}
{%- endfor -%}
</ul>
</ul>
{% else %}
<div class="custom_fields_choice empty">{{ 'None'|trans }}</div>
{% endif %}

View File

@@ -1 +1 @@
{{ text }}
{% if text is not empty %}{{ text }}{% else %}<span class="custom_fields_text empty">{{ 'None'|trans }}</span>{% endif %}