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
73
74
75
76
77
78
79
80
81
82
83
84
85
|
{% set fontStyle = "color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;"%}
{% set styleTableHeader = "border-bottom:1px solid rgb(231,231,231);font-size: 15px;text-align: left;font-weight:normal;padding:13px 0 13px 10px;" ~ fontStyle %}
{% set styleTableCell = "border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;" ~ fontStyle %}
<h2 id="{{ reportId }}" style=" {{fontStyle}} font-size: {{ reportTitleTextSize }}pt; font-weight:normal; margin:45px 0 30px 0;">
{{ reportName }}
</h2>
{% if reportRows is empty %}
{{ 'CoreHome_ThereIsNoDataForThisReport'|translate }}
{% else %}
{% if displayGraph %}
<img alt=""
{% if renderImageInline %}
src="data:image/png;base64,{{ generatedImageGraph }}"
{% else %}
src="cid:{{ reportId }}"
{% endif %}
height="{{ graphHeight }}"
width="{{ graphWidth }}"
margin="0 auto"/>
{% endif %}
{% if displayGraph and displayTable %}
<br/>
<br/>
{% endif %}
{% if displayTable %}
<table style="border-collapse:collapse; border:1px solid rgb(231,231,231); padding:5px;">
<thead style="background-color: rgb({{tableBgColor}});">
{% for columnId, columnName in reportColumns %}
<th style="{{ styleTableHeader }}{% if columnId == 'label' %}{% else %} text-align:right;{% endif %}">
{{ columnName }}
</th>
{% endfor %}
</thead>
<tbody>
{% set cycleValues=['background-color: rgb('~tableBgColor~')',''] %}
{% set cycleIndex=1 %}
{% for rowId,row in reportRows %}
{% set rowMetrics=row.columns %}
{% if reportRowsMetadata[rowId] is defined %}
{% set rowMetadata=reportRowsMetadata[rowId].columns %}
{% else %}
{% set rowMetadata=null %}
{% endif %}
<tr style="{{ cycle(cycleValues, cycleIndex) }};">
{% set cycleIndex=cycleIndex+1 %}
{% for columnId, columnName in reportColumns %}
<td style="padding:17px 15px;{% if columnId == 'label' %}{% else %} text-align:right;{% endif %};{{styleTableCell}}">
{% if columnId == 'label' %}
{% if rowMetrics[columnId] is defined %}
{% if rowMetadata.logo is defined %}
<img width="16px" height="16px" src='{{ currentPath }}{{ rowMetadata.logo }}'>
{% endif %}
{% if rowMetadata.url is defined %}
<a style="color: rgb({{ reportTextColor }});" href='{% if rowMetadata.url|slice(0,4) not in ['http','ftp:'] %}http://{% endif %}{{ rowMetadata.url }}'>
{% endif %}
{{ rowMetrics[columnId] | raw }}{# labels are escaped by SafeDecodeLabel filter in core/API/Response.php #}
{% if rowMetadata.url is defined %}
</a>
{% endif %}
{% endif %}
{% else %}
{% if rowMetrics[columnId] is empty %}
0
{% else %}
{{ rowMetrics[columnId]|number(2) }}
{% endif %}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<p style="width: 100%; text-align:center;">
<a style="text-decoration:none; font-size: 9pt;" href="#reportTop">
{{ 'ScheduledReports_TopOfReport'|translate }} ↑
</a></p>
{% endif %}
|