File: StatsParamsWidget.tt

package info (click to toggle)
otrs2 5.0.16-1%2Bdeb9u6
  • links: PTS
  • area: non-free
  • in suites: stretch
  • size: 141,108 kB
  • sloc: perl: 746,356; xml: 54,469; sql: 10,505; sh: 430; makefile: 64
file content (199 lines) | stat: -rw-r--r-- 7,314 bytes parent folder | download | duplicates (2)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

<fieldset class="TableLike">
    <label>[% Translate("Object") | html %]:</label>
    <div class="Value">[% Translate(Data.ObjectName) | html %]</div>
    <div class="Clear"></div>

    <label>[% Translate("Description") | html %]:</label>
    <div class="Value">[% Data.Description | html %]</div>
    <div class="Clear"></div>

[% RenderBlockStart("Format") %]
    <label for="Format">[% Translate("Format") | html %]:</label>
    <div class="Value">[% Data.SelectFormat %]</div>
    <div class="Clear"></div>
[% RenderBlockEnd("Format") %]
[% RenderBlockStart("FormatFixed") %]
    <input type="hidden" id="Format" name="Format" value="[% Data.FormatKey | html %]"/>
    <label>[% Translate("Format") | html %]:</label>
    <div class="Value">[% Translate(Data.Format) | html %]</div>
    <div class="Clear"></div>
[% RenderBlockEnd("FormatFixed") %]

[% RenderBlockStart("TimeZone") %]
    <label for="TimeZone">[% Translate("Time Zone") | html %]:</label>
    <div class="Value">
        [% Data.SelectTimeZone %]
        <p class="FieldExplanation">
            [% Translate('The selected time periods in the statistic are time zone neutral.') | html %]
        </p>
    </div>
    <div class="Clear"></div>
[% RenderBlockEnd("TimeZone") %]

[% RenderBlockStart("ExchangeAxis") %]
    <label>[% Translate("Exchange Axis") | html %]:</label>
    <div class="Value">[% Data.ExchangeAxis %]</div>
    <div class="Clear"></div>
[% RenderBlockEnd("ExchangeAxis") %]
</fieldset>

[% RenderBlockStart("Static") %]
<h2>
        [% Translate("Configurable params of static stat") | html %]
</h2>
<fieldset class="TableLike">
[% RenderBlockStart("ItemParam") %]
    <label for="[% Data.Name | html %]">[% Translate(Data.Param) | html %]:</label>
    <div class="Value">[% Data.Field %]</div>
    <div class="Clear"></div>
[% RenderBlockEnd("ItemParam") %]
</fieldset>
[% RenderBlockEnd("Static") %]


[% RenderBlockStart("Dynamic") %]
<fieldset class="TableLike">
    <legend><span>[% Translate(Data.Name) | html %]</span></legend>
[% RenderBlockStart("NoElement") %]
    <div class="Value">
        <p class="FieldExplanation">[% Translate("No element selected.") | html %]</p>
    </div>
[% RenderBlockEnd("NoElement") %]
[% RenderBlockStart("Element") %]
    <label>[% Translate(Data.Name) | html %]:</label>
    <div class="Value">
[% RenderBlockStart("TimePeriodFixed") %]
        [% Translate("Between") | html %] [% Data.TimeStart %] [% Translate("and") | html %] [% Data.TimeStop %]<br/>
[% RenderBlockEnd("TimePeriodFixed") %]
[% RenderBlockStart("TimeRelativeFixed") %]
        [% Translate("The past complete %s and the current+upcoming complete %s %s", Data.TimeRelativeCount, Data.TimeRelativeUpcomingCount, Data.TimeRelativeUnit) %]<br/>
[% RenderBlockEnd("TimeRelativeFixed") %]
[% RenderBlockStart("TimeScaleFixed") %]
        [% Translate("Scale") | html %]: [% Data.Count %] [% Translate(Data.Scale) | html %]
[% RenderBlockEnd("TimeScaleFixed") %]
[% RenderBlockStart("Fixed") %]
        <div title="[% Data.Value | html %]">
                <span class="DataTruncated">[% Data.Value | truncate(120) | html %]</span>
            [% IF Data.Value.length > 120 %]
                <span class="DataFull Hidden">[% Data.Value | html %]</span>
                <a href="#" class="DataShowMore">
                    <span class="More"><i class="fa fa-long-arrow-right"></i> [% Translate("show more") | html %]</span>
                    <span class="Less Hidden"><i class="fa fa-long-arrow-left"></i> [% Translate("show less") | html %]</span>
                </a>
            [% END %]
        </div>
[% RenderBlockEnd("Fixed") %]
[% RenderBlockStart("MultiSelectField") %]
        [% Data.SelectField %]
[% RenderBlockEnd("MultiSelectField") %]
[% RenderBlockStart("SelectField") %]
        [% Data.SelectField %]
[% RenderBlockEnd("SelectField") %]
[% RenderBlockStart("InputField") %]
        <input type="text" name="[% Data.Key | html %]" value="[% Data.Value | html %]" class="W25pc"/>
[% RenderBlockEnd("InputField") %]
    </div>
    <div class="Clear"></div>

[% RenderBlockStart("TimePeriod") %]
    <label><em>[% Translate("Absolute period") | html %]</em>:</label>
    <div class="Value">
        <p>
            [% Translate('Between') | html %] [% Data.TimeStart %] [% Translate("and") | html %] [% Data.TimeStop %]<br/>
        </p>
    </div>
    <div class="Clear"></div>
[% RenderBlockEnd("TimePeriod") %]

[% RenderBlockStart("TimeScale") %]
    <label><em>[% Translate("Scale") | html %]</em>:</label>
    <div class="Value">
    [% IF Data.TimeScaleCount %]
        [% Data.TimeScaleCount %]
    [% END %]
        [% Data.TimeScaleUnit %]
    </div>
    <div class="Clear"></div>
[% IF Data.Use == 'UseAsValueSeries' %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#[% Data.XAxisTimeScaleElementID %]').on('change', function() {
        var TimeScaleYAxis = [% JSON(Data.TimeScaleYAxis) %],
        $TimeScaleElement = $('#[% Data.TimeScaleElementID %]'),
        XAxisTimeScaleValue = $(this).val();

        // reset the current time scale dropdown for the y axis
        $TimeScaleElement.empty();

        if ( XAxisTimeScaleValue in TimeScaleYAxis ) {
            $.each(TimeScaleYAxis[XAxisTimeScaleValue], function (Index, Item) {
                var TimeScaleOption = new Option(Item.Value, Item.Key);

                // Overwrite option text, because of wrong html quoting of text content.
                // (This is needed for IE.)
                TimeScaleOption.innerHTML = Item.Value;
                $TimeScaleElement.append(TimeScaleOption);
            });
        }
    });
//]]></script>
[% END %]
[% END %]
[% RenderBlockEnd("TimeScale") %]

[% RenderBlockStart("TimePeriodRelative") %]
    <label><em>[% Translate("Relative period") | html %]</em>:</label>
    <div class="Value">
        [% Translate("The past complete %s and the current+upcoming complete %s %s", Data.TimeRelativeCount, Data.TimeRelativeUpcomingCount, Data.TimeRelativeUnit) %]
    </div>
    <div class="Clear"></div>
[% RenderBlockEnd("TimePeriodRelative") %]

[% RenderBlockEnd("Element") %]
</fieldset>
[% RenderBlockEnd("Dynamic") %]
[% IF Data.AJAX %]
<script type="text/javascript">//<![CDATA[
Core.UI.InputFields.Activate();
//]]></script>
[% END %]

[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('.DataShowMore').on('click', function() {
    if ($(this).find('.More').is(':visible')) {
        $(this)
            .find('.More')
            .hide()
            .next('.Less')
            .show()
            .parent()
            .prev('.DataFull')
            .show()
            .prev('.DataTruncated')
            .hide()
    }
    else {
        $(this)
            .find('.More')
            .show()
            .next('.Less')
            .hide()
            .parent()
            .prev('.DataFull')
            .hide()
            .prev('.DataTruncated')
            .show()
    }
    return false;
});
//]]></script>
[% END %]