-
Notifications
You must be signed in to change notification settings - Fork 0
/
column-attribute-table-values.html.twig
72 lines (50 loc) · 2.5 KB
/
column-attribute-table-values.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% set count = 0 %}
{% set totalCount = (configArray | length) %}
{% for element in elements %}
{% set printRowEnd = false %}
{% if not subgroup is defined or subgroup == 0 %}
<tr class="{{ (count % 2 == 0) ? 'even' : '' }}">
{% set subgroup = 0 %}
{% set printRowEnd = true %}
{% endif %}
{% set isFirstColumn = true %}
{% for configElement in configArray %}
{% if configElement is instanceof('\\OutputDataConfigToolkitBundle\\ConfigElement\\Operator\\Group') %}
{%
include '@Web2PrintBricks/areas/print-product-table/spec_attribute/column-attribute-table-values.html.twig' with {
'configArray': configElement.childs,
'elements': [element],
'subgroup': (subgroup + 1)
}
%}
{% else %}
{% if element is instanceof('\\Web2PrintToolsBundle\\Model\\Document\\Tag\\Outputchanneltable\\MetaEntry\\Defaultentry') %}
{% if element.span %}
{% if isFirstColumn and subgroup == 0 %}
<td class="metaentry" colspan="{{ totalCount }}">{{ element.value }}</td>
{% endif %}
{% else %}
<td class="metaentry">{{ element.value }}</td>
{% endif %}
{% elseif element is instanceof('\\Web2PrintToolsBundle\\Model\\Document\\Tag\\Outputchanneltable\\MetaEntry\\Table') %}
{% if isFirstColumn and not subgroup %}
{% do element.resetNextValue() %}
{% endif %}
{% set value = element.nextValue %}
{% if value %}
<td colspan="{{ value['span'] }}">{{ value['value'] }}</td>
{% endif %}
{% else %}
<td>
{% set outputElement = configElement.getLabeledValue(element) %}
{{ app_print_output_spec_value(outputElement, thumbnailName) | raw }}
</td>
{% endif %}
{% endif %}
{% set isFirstColumn = false %}
{% endfor %}
{% if printRowEnd %}
</tr>
{% set count = count + 1 %}
{% endif %}
{% endfor %}