58 lines
1.6 KiB
HTML
58 lines
1.6 KiB
HTML
{% load assets i18n %}
|
|
|
|
{% block cell-content %}
|
|
|
|
{% block cell-header %}
|
|
{% if title %}<h2>{{ title }}</h2>{% endif %}
|
|
{% include "combo/asset_picture_fragment.html" %}
|
|
{% endblock %}
|
|
|
|
{% if card %}
|
|
<div class="cell--body">
|
|
{% spaceless %}
|
|
{% if cell.custom_schema %}
|
|
<div class="{{ cell.custom_schema.grid_class }}">
|
|
{% for item in cell.custom_schema.cells %}
|
|
<div class="{{ item.cell_size|default:"" }}">
|
|
{% for field in schema.fields %}
|
|
{% if field.varname == item.varname %}
|
|
{% with card.fields|get:item.varname as value %}
|
|
{% if item.display_mode == "title" %}
|
|
<h3>{% include "combo/wcs/card-field-value.html" with mode="inline" %}</h3>
|
|
{% endif %}
|
|
{% if item.display_mode == "label" or item.display_mode == "label-and-value" %}
|
|
<p class="label">{{ field.label }}</p>
|
|
{% endif %}
|
|
{% if item.display_mode == "value" or item.display_mode == "label-and-value" %}
|
|
{% include "combo/wcs/card-field-value.html" %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% endfor%}
|
|
</div>
|
|
{% endfor%}
|
|
</div>
|
|
|
|
{% else %}
|
|
{% for field in schema.fields %}
|
|
{% if 'varname' in field and field.varname and field.type != 'file' %}
|
|
{% with card.fields|get:field.varname as value %}
|
|
<div class="card--auto-field">
|
|
<span class="label">{{ field.label }}</span>
|
|
{% include "combo/wcs/card-field-value.html" %}
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endspaceless %}
|
|
</div>
|
|
|
|
{% else %}
|
|
<div class="cell--body">
|
|
<p>{% trans 'Unknown Card' %}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|