log.twig
2.43 KB
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
<!--suppress CssInvalidPropertyValue, CssOverwrittenProperties -->
<div class="icl_tm_wrap wpml-wrap" style="overflow: auto;">
<p>
{{ strings.header }}
</p>
{% if rows %}
<p>
<a href="{{ urls.switch_mode }}" class="button-secondary">{{ strings.switch_mode }}</a>
</p>
<table class="widefat">
<thead>
<tr>
{% for header_key, header_label in headers %}
<th scope="col" class="manage-column manage-column-{{ header_key }}" style="font-size:10px;">
{{ header_label }}
</th>
{% endfor %}
</tr>
</thead>
<tfoot>
<tr>
{% for header_key, header_label in headers %}
<th scope="col" class="manage-column manage-column-{{ header_key }}" style="font-size:10px;">
{{ header_label }}
</th>
{% endfor %}
</tr>
</tfoot>
<tbody>
{% set row = 0 %}
{% for log_item in rows %}
<tr class="{{ row is divisible by(2) ? 'alternate' : '' }}">
{% for header_key, header_label in headers %}
{% set item_value = log_item[header_label] is defined ? log_item[header_label] : '' %}
<td class="column-{{ header_key }}" style="font-size:10px; overflow-wrap: break-word; word-wrap: break-word; -ms-word-break: break-all; word-break: break-all; word-break: break-word; -ms-hyphens: auto; -moz-hyphens: auto; -webkit-hyphens: auto; hyphens: auto;">
{% if is_url(item_value) %}
<a href="{{ item_value }}" target="_blank">{{ log_item.Title }}</a>
{% else %}
{% if item_value is iterable %}
{% set sub_items_count = item_value|length %}
{% set sub_items_index = 1 %}
{% for item_value_sub_item in item_value %}
{{ item_value_sub_item }}
{% if sub_items_index < sub_items_count %}
<br>
{% endif %}
{% set sub_items_index = sub_items_index + 1 %}
{% endfor %}
{% else %}
{{ item_value }}
{% endif %}
{% endif %}
</td>
{% set row = row + 1 %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<form method="post" id="{{ misc.ui_key }}-form" name="{{ misc.ui_key }}-form" action="{{ urls.main }}">
<p>
<input class="button-secondary" type="submit" name="{{ misc.ui_key }}-clear" value="{{ strings.clear_log }}"> <input class="button-secondary" type="submit" name="{{ misc.ui_key }}-export-csv" value="{{ strings.export_csv }}">
</p>
</form>
{% else %}
<strong>{{ strings.empty_log }}</strong>
{% endif %}
</div>