wcs: fix card info cell for fields without varname (#48452)
This commit is contained in:
parent
ae38713746
commit
154df07a3c
|
@ -10,6 +10,7 @@
|
|||
|
||||
{% if card %}
|
||||
{% for field in schema.fields %}
|
||||
{% if 'varname' in field and field.varname %}
|
||||
{% with card.fields|get:field.varname as value %}
|
||||
<p>
|
||||
<span class="label">{{ field.label }}</span>
|
||||
|
@ -22,6 +23,7 @@
|
|||
{% endif %}
|
||||
</p>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>{% trans 'Unknown Card' %}</p>
|
||||
|
|
|
@ -143,6 +143,11 @@ WCS_CARDDEF_SCHEMA = {
|
|||
{'label': 'Field B', 'varname': 'fieldb', 'type': 'bool'},
|
||||
{'label': 'Field C', 'varname': 'fieldc', 'type': 'date'},
|
||||
{'label': 'Related', 'varname': 'related', 'type': 'item'},
|
||||
{'label': 'Page', 'type': 'page'},
|
||||
{'label': 'Comment', 'type': 'comment'},
|
||||
{'label': 'Title', 'type': 'title'},
|
||||
{'label': 'Subtitle', 'type': 'subtitle'},
|
||||
{'label': 'Empty', 'varname': None, 'type': 'string'},
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue