Skip to content

Commit

Permalink
Description of fields with labels for 'base-2016' and 'skeleton'
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter committed Jul 13, 2018
1 parent c62576d commit 6f21165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions base-2016/partials/_sub_field_blocks.twig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

{# Checkbox fields #}
{% if fieldtype == "checkbox" %}
<p>Checkbox {{ key }}: {{ value ? "checked" : "not checked" }}</p>
<p><strong>{{ record.contenttype.fields[key].label|default(key) }}</strong>: {{ value ? "checked" : "not checked" }}</p>
{% endif %}

{# Imagelist fields #}
Expand All @@ -82,7 +82,7 @@
{# No special case defined for this type of field. We just output them, if it's
a simple scalar, and 'dump' them otherwise. #}
{% if fieldtype in [ 'filelist', 'datetime', 'date', 'integer', 'float' ] and value is not empty %}
<p><strong>{{ key }}: </strong>
<p><strong>{{ record.contenttype.fields[key].label|default(key) }}: </strong>
{% if value is iterable %}
{{ dump(value) }}
{% else %}
Expand Down
6 changes: 3 additions & 3 deletions skeleton/partials/_sub_field_blocks.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@

{# Special case for 'select' fields: if it's a multiple select, the value is an array. #}
{% if fieldtype == "select" and value is not empty %}
<p><strong>{{ key }}: </strong>
<p><strong>{{ record.contenttype.fields[key].label|default(key) }}: </strong>
{{ value|join(", ") }}
</p>
{% endif %}

{# Checkbox fields #}
{% if fieldtype == "checkbox" %}
<p>Checkbox {{ key }}: {{ value ? "checked" : "not checked" }}</p>
<p><strong>{{ record.contenttype.fields[key].label|default(key) }}</strong>: {{ value ? "checked" : "not checked" }}</p>
{% endif %}

{# Imagelist fields #}
Expand All @@ -82,7 +82,7 @@
{# No special case defined for this type of field. We just output them, if it's
a simple scalar, and 'dump' them otherwise. #}
{% if fieldtype in [ 'filelist', 'datetime', 'date', 'integer', 'float' ] and value is not empty %}
<p><strong>{{ key }}: </strong>
<p><strong>{{ record.contenttype.fields[key].label|default(key) }}: </strong>
{% if value is iterable %}
{{ dump(value) }}
{% else %}
Expand Down

0 comments on commit 6f21165

Please sign in to comment.