2020-10-27 14:12:58 +00:00
|
|
|
{%- if data -%}
|
|
|
|
{%- set visible_columns = get_visible_columns(doc.get(df.fieldname),
|
|
|
|
table_meta, df) -%}
|
|
|
|
<div {{ fieldmeta(df) }}>
|
|
|
|
<table class="table table-bordered table-condensed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 40px" class="table-sr">{{ _("Sr") }}</th>
|
|
|
|
{% for tdf in visible_columns %}
|
2020-10-29 08:49:34 +00:00
|
|
|
{% if (data and not print_settings.compact_item_print) or tdf.fieldname in doc.flags.compact_item_fields %}
|
2020-10-27 14:12:58 +00:00
|
|
|
<th style="width: {{ get_width(tdf) }};" class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
|
|
|
|
{{ _(tdf.label) }}</th>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for d in data %}
|
|
|
|
<tr>
|
|
|
|
<td class="table-sr">{{ d.idx }}</td>
|
|
|
|
{% for tdf in visible_columns %}
|
2020-10-29 08:49:34 +00:00
|
|
|
{% if not print_settings.compact_item_print or tdf.fieldname in doc.flags.compact_item_fields %}
|
2020-10-27 14:12:58 +00:00
|
|
|
<td class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
|
2020-10-29 08:49:34 +00:00
|
|
|
{% if doc.child_print_templates %}
|
|
|
|
{%- set child_templates = doc.child_print_templates.get(df.fieldname) %}
|
|
|
|
<div class="value">{{ print_value(tdf, d, doc, visible_columns, child_templates) }}</div></td>
|
|
|
|
{% else %}
|
|
|
|
<div class="value">{{ print_value(tdf, d, doc, visible_columns) }}</div></td>
|
|
|
|
{% endif %}
|
2020-10-27 14:12:58 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{%- endif -%}
|