/
logs.grid.html.twig
61 lines (61 loc) · 3.19 KB
/
logs.grid.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
{% if logs|length > 0 %}
<div>
<table class="signals logs results short" style="width: 100%">
<thead>
<tr>
{% for key, column in columns %}
{% if ((not column.admin or isAdmin) and not (key == 'operator' and not isMultiOperator)) %}
<th{% if key and column.order %} id="{{ key }}|{{ column.order }}"{% endif
%}{%
if column.th_class or column.sort
%} class="{{ column.th_class }}{% if column.sort %} sort{% endif %}"{% endif %}{%
if column.tooltip
%} title="{{ column.tooltip }}"{%
endif
%}>{%
if column.th_class == 'txt_vertical'
%}<div>{{ column.label | trans | raw }}</div>{%
else
%}{{ column.label | trans | raw }}{%
endif %}</th>{%
endif
%}
{% endfor %}
</tr>
</thead>
<tbody>
{% for l in logs %}
{% set type = typeRepository.TypeForCode(l.type) %}
<tr class="{% if l.active == '0' %}inactive {% endif %}{% if l.daytime %}daytime {% endif %}type_{{ type.class|lower }}" title="{{ type.title }}{% if l.daytime %} {% trans %}Logged betweeen 10am and 2pm local time{% endtrans %}{% endif %}{% if l.active == '0' %} (inactive){% endif %}">
{% for key, column in columns %}
{% if ((not column.admin or isAdmin) and not (key == 'operator' and not isMultiOperator)) %}
<td{% if column.td_class %} class="{{ column.td_class }}"{% endif %}>
{%
if key == 'call'
%}<a href="{{ url('signal', { 'system' : system, 'id': l.id }) }}" data-popup="1" title="Click to view this signal">{{ attribute(l, column.field)|raw }}</a>{%
elseif key == 'id'
%}{% if isAdmin %}<a href="{{ url('log', { 'system' : system, 'id' : l.log_id }) }}" data-popup="1" title="Click to view this log record">{{ l.log_id }}</a>{% else %}{{ l.log_id }}{% endif %}{%
elseif key == 'receiver'
%}{% if l.operatorId %}<a href="{{ url('listener', { 'system' : system, 'id': l.listenerId }) }}" data-popup="1" title="Click to see profile for this Receiver">{{ l.receiver|raw }}</a>{% endif %}
{% if l.operator and l.website %}
<span {% if l.active == 'Y' %}class="link" title="Click to access receiver"{% else %}class="inactive" title="Inactive receiver"{% endif %}>[<a href="{{ l.website }}" data-popup="www_{{ l.listenerId }}|width=800,height=640,status=1,scrollbars=1,resizable=1">RX Link</a>]</span>
{% endif
%}{%
elseif key == 'operator'
%}{% if l.operatorId %}<a href="{{ url('listener', { 'system' : system, 'id': l.operatorId }) }}" data-popup="1" title="Click to see profile for this Listener">{{ l.operator|raw }}</a>{% endif %}{%
elseif key == 'delete' and isAdmin
%}<a href="{{ url('listener_log_delete', { 'system' : system, 'id' : id, 'log_id' : l.log_id }) }}" class="delete" onclick="return confirm(msg.del_log);">X</a>{%
else
%}{{ attribute(l, column.field)|raw }}{%
endif
%}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p class="no-results">(No log have been reported by this listener)</p>
{% endif %}