File: AgentTicketOverviewMedium.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 (350 lines) | stat: -rw-r--r-- 17,829 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# --
# 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.
# --
[% RenderBlockStart("DocumentActionRow") %]
<ul class="Actions">
[% RenderBlockStart("DocumentActionRowBulk") %]
    <li class="AlwaysPresent">
        <span>
            <input type="checkbox" title="[% Translate("Select all") | html %]" id="SelectAllTickets" autocomplete="off" />
            <label class="InvisibleText" for="SelectAllTickets">[% Translate("Select all") | html %]</label>
        </span>
    </li>
    <li id="BulkAction" class="AlwaysPresent Inactive [% Data.CSS | html %]">
        <a href="#">[% Translate(Data.Name) | html %]</a>
    </li>
[% RenderBlockEnd("DocumentActionRowBulk") %]
[% RenderBlockStart("DocumentActionRowItem") %]
    <li><a class="[% Data.Class | html %]" href="[% Data.Link | html %]" title="[% Data.Description | html %]">[% Data.Name | html %]</a></li>
[% RenderBlockEnd("DocumentActionRowItem") %]
[% RenderBlockStart("DocumentActionRowHTML") %]
    [% Data.HTML %]
[% RenderBlockEnd("DocumentActionRowHTML") %]
</ul>
[% RenderBlockEnd("DocumentActionRow") %]

[% RenderBlockStart("DocumentHeader") %]
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    Core.UI.ActionRow.Init();

    $('a.AsPopup').bind('click', function (Event) {
        var Matches,
            PopupType = 'TicketAction';

        Matches = $(this).attr('class').match(/PopupType_(\w+)/);
        if (Matches) {
            PopupType = Matches[1];
        }

        Core.UI.Popup.OpenPopup($(this).attr('href'), PopupType);
        return false;
    });
//]]></script>
[% END %]

<ul id="TicketOverviewMedium" class="Overview OverviewMedium">
[% RenderBlockEnd("DocumentHeader") %]

[% RenderBlockStart("NoTicketFound") %]
    <li id="EmptyMessageMedium">
        [% Translate("No ticket data found.") | html %]
    </li>
[% RenderBlockEnd("NoTicketFound") %]

[% RenderBlockStart("DocumentContent") %]
    <li id="TicketID_[% Data.TicketID | html %]" class="MasterAction">
        <div class="Content">
[% RenderBlockStart("InlineActionRow") %]
            <ul class="Actions InlineActions">
                <li class="ResponsiveActionMenu"><a href="#" id="ResponsiveActionMenu[% Data.TicketID | html %]" title="[% Translate("Open / Close ticket action menu") | html %]"><i class="fa fa-bars"></i></a></li>
[% RenderBlockStart("InlineActionRowItem") %]
                <li><a id="[% Data.ID | html %][% Data.TicketID | html %]" class="[% Data.Class | html %]" href="[% Data.Link | Interpolate | html %]" title="[% Translate(Data.Description) | html %]">[% Translate(Data.Name) | html %]</a></li>
[% RenderBlockEnd("InlineActionRowItem") %]
[% RenderBlockStart("InlineActionRowItemHTML") %]
                [% Data.HTML %]
[% RenderBlockEnd("InlineActionRowItemHTML") %]
            </ul>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    // Stop propagation on click on a part of the InlienActionRow without a link
    // Otherwise that would trigger the li-wide link to the ticketzoom
    $('ul.InlineActions').click(function (Event) {
        Event.cancelBubble = true;
        if (Event.stopPropagation) {
            Event.stopPropagation();
        }
    });
//]]></script>
[% END %]
[% RenderBlockEnd("InlineActionRow") %]
[% RenderBlockStart("Bulk") %]
            <div class="Checkbox">
                <input class="Checkbox" type="checkbox" name="TicketID" title="[% Translate("Select this ticket") | html %]" value="[% Data.TicketID | html %]" autocomplete="off" />
            </div>
[% RenderBlockEnd("Bulk") %]
[% RenderBlockStart("Meta") %]
[% RenderBlockStart("MetaIcon") %]
            <div class="[% Data.Class | html %]" title="[% Translate(Data.Title) | html %]">
                <span class="[% Data.ClassSpan | html %]">
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <em>[% Translate(Data.Title) | html %]</em>
                </span>
            </div>
[% RenderBlockEnd("MetaIcon") %]
[% RenderBlockEnd("Meta") %]
            <h2>
                <a href="[% Env("Baselink") %]Action=AgentTicketZoom;TicketID=[% Data.TicketID | uri %]" class="MasterActionLink">[% Config("Ticket::Hook") %][% Config("Ticket::HookDivider") %][% Data.TicketNumber %] &ndash; [% Data.Title | html %]</a>
            </h2>
[% RenderBlockStart("MenuItem") %]
            <a href="[% Env("Baselink") %][% Data.Link %]" [% Data.LinkParam %] title="[% Translate(Data.Description) | html %]">[% Translate(Data.Name) | html %]</a>
[% RenderBlockEnd("MenuItem") %]
            <table class="Infos">
                <tbody>
                    <tr>
                        <td>
                            <label>[% Translate("From") | html %]</label><div title="[% Data.From | html %]">[% Data.FromRealname | html %]</div>
                        </td>
                        <td>
                            <label>[% Translate("Age") | html %]</label>[% Data.Age | html %]
                        </td>
                        <td>
                            <label>[% Translate("Queue") | html %]</label><div title="[% Data.Queue | html %]">[% Data.Queue | html %]</div>
                        </td>
                        <td>
[% RenderBlockStart("CustomerIDRW") %]
                            <label>[% Translate("CustomerID") | html %]</label>[% IF Data.CustomerID %]<a href="[% Config("CustomerDBLink") | Interpolate %]" class="AsPopup PopupType_TicketAction" [% Config("CustomerDBLinkTarget") %]>[% Data.CustomerID | html %]</a>[% END %]
[% RenderBlockEnd("CustomerIDRW") %]
[% RenderBlockStart("CustomerIDRO") %]
                            <label>[% Translate("CustomerID") | html %]</label>[% Data.CustomerID | html %]
[% RenderBlockEnd("CustomerIDRO") %]
                            <br /><div title="[% Data.CustomerName | html %]">[% Data.CustomerName | html %]</div>
                        </td>
# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 is the name of the field and had to be replaced with the actual
# field name
#[% RenderBlockStart("DynamicField_Field1") %]
#                        <td>
#                            <label>[% Translate(Data.Label) | html %]</label>
#[% RenderBlockStart("DynamicField_Field1Link") %]
#                            <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
#[% RenderBlockEnd("DynamicField_Field1Link") %]
#[% RenderBlockStart("DynamicField_Field1Plain") %]
#                            <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
#[% RenderBlockEnd("DynamicField_Field1Plain") %]
#                        </td>
#[% RenderBlockEnd("DynamicField_Field1") %]
                        <td>
                            <label>[% Translate("First Response Time") | html %]</label>
[% RenderBlockStart("FirstResponseTime") %]
                            <div title="[% Translate("Service Time") | html %]: [% Data.FirstResponseTimeWorkingTime | html %]" class="[% Data.FirstResponseTimeClass | html %]">[% Data.FirstResponseTimeHuman | html %] / [% Data.FirstResponseTimeDestinationDate | Localize("TimeShort") %]</div>
[% RenderBlockEnd("FirstResponseTime") %]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>[% Translate("To") | html %]</label><div title="[% Data.To | html %]">[% Data.ToRealname | html %]</div>
                        </td>
                        <td>
                            <label>[% Translate("Created") | html %]</label>[% Data.Created | Localize("TimeLong") %]
                        </td>
                        <td>
                            <label>[% Translate("State") | html %]</label><div title="[% Translate(Data.State) | html %]">[% Translate(Data.State) | html %]</div>
                        </td>
                        <td>
[% RenderBlockStart("Type") %]
                            <label>[% Translate("Type") | html %]</label><div title="[% Data.Type | html %]">[% Data.Type | html %]</div>
[% RenderBlockEnd("Type") %]
                        </td>
# example of how to use fixed dynamic field blocks for customizations
# Note: Field2 is the name of the field and had to be replaced with the actual
# field name
#[% RenderBlockStart("DynamicField_Field2") %]
#                        <td>
#                            <label>[% Translate(Data.Label) | html %]</label>
#[% RenderBlockStart("DynamicField_Field2Link") %]
#                            <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
#[% RenderBlockEnd("DynamicField_Field2Link") %]
#[% RenderBlockStart("DynamicField_Field2Plain") %]
#                            <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
#[% RenderBlockEnd("DynamicField_Field2Plain") %]
#                        </td>
#[% RenderBlockEnd("DynamicField_Field2") %]
                        <td>
                            <label>[% Translate("Update Time") | html %]</label>
[% RenderBlockStart("UpdateTime") %]
                            <div title="[% Translate("Service Time") | html %]: [% Data.UpdateTimeWorkingTime | html %]" class="[% Data.UpdateTimeClass | html %]">[% Data.UpdateTimeHuman | html %] / [% Data.UpdateTimeDestinationDate | Localize("TimeShort") %]</div>
[% RenderBlockEnd("UpdateTime") %]
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>[% Translate("Subject") | html %]</label><div title="[% Data.Subject | html %]">[% Data.Subject | html %]</div>
                        </td>
                        <td>
                            <label>[% Translate("Owner") | html %]</label><div title="[% Data.UserFirstname | html %] [% Data.UserLastname | html %] ([% Data.Owner | html %])">[% Data.UserFirstname | html %] [% Data.UserLastname | html %]</div>
                        </td>
                        <td>
                            <label>[% Translate("Lock") | html %]</label><div title="[% Translate(Data.Lock) | html %]">[% Translate(Data.Lock) | html %]</div>
                        </td>
                        <td>
[% RenderBlockStart("Service") %]
                            <label>[% Translate("Service") | html %]</label><div title="[% Data.Service | html %]">[% Data.Service | html %]</div>
[% RenderBlockEnd("Service") %]
[% RenderBlockStart("SLA") %]
                            <label>[% Translate("Service Level Agreement") | html %]</label><div title="[% Data.SLA | html %]">[% Data.SLA | html %]</div>
[% RenderBlockEnd("SLA") %]
                        </td>
# example of how to use fixed dynamic field blocks for customizations
# Note: Field3 is the name of the field and had to be replaced with the actual
# field name
#[% RenderBlockStart("DynamicField_Field3") %]
#                        <td>
#                            <label>[% Translate(Data.Label) | html %]</label>
#[% RenderBlockStart("DynamicField_Field3Link") %]
#                            <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
#[% RenderBlockEnd("DynamicField_Field3Link") %]
#[% RenderBlockStart("DynamicField_Field3Plain") %]
#                            <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
#[% RenderBlockEnd("DynamicField_Field3Plain") %]
#                        </td>
#[% RenderBlockEnd("DynamicField_Field3") %]
                        <td>
                            <label>[% Translate("Solution Time") | html %]</label>
[% RenderBlockStart("SolutionTime") %]
                            <div title="[% Translate("Service Time") | html %]: [% Data.SolutionTimeWorkingTime | html %]" class="[% Data.SolutionTimeClass | html %]">[% Data.SolutionTimeHuman | html %] / [% Data.SolutionTimeDestinationDate | Localize("TimeShort") %]</div>
[% RenderBlockEnd("SolutionTime") %]
                        </td>
                    </tr>
                </tbody>
            </table>

[% RenderBlockStart("DynamicFieldTable") %]
            <div class="SpacingTop Center DynamicFieldSeparator"></div>
            <table class="Infos">
                <tbody>
[% RenderBlockStart("DynamicFieldTableRow") %]
                    <tr>
[% RenderBlockStart("DynamicFieldTableRowRecord") %]
                        <td>
                            <label>[% Translate(Data.Label) | html %]</label>
[% RenderBlockStart("DynamicFieldTableRowRecordLink") %]
                            <div title="[% Data.Title | html %]"><a href="[% Data.Link | Interpolate %]" target="_blank" class="DynamicFieldLink">[% Data.Value %]</a></div>
[% RenderBlockEnd("DynamicFieldTableRowRecordLink") %]
[% RenderBlockStart("DynamicFieldTableRowRecordPlain") %]
                            <div title="[% Data.Title | html %]"><span>[% Data.Value %]</span></div>
[% RenderBlockEnd("DynamicFieldTableRowRecordPlain") %]
                        </td>
[% RenderBlockEnd("DynamicFieldTableRowRecord") %]
                    </tr>
[% RenderBlockEnd("DynamicFieldTableRow") %]
                </tbody>
            </table>
[% RenderBlockEnd("DynamicFieldTable") %]
        </div>
    </li>

[% RenderBlockEnd("DocumentContent") %]

[% RenderBlockStart("DocumentFooter") %]
</ul>

<form name="bulk" action="">
    <input type="hidden" name="TicketID" value=""/>
</form>

<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" name="matrix">
    <input type="hidden" name="Action" value="AgentTicketBulk"/>
[% RenderBlockStart("DocumentFooterBulkItem") %]
    <input type="hidden" name="TicketID" value=""/>
[% RenderBlockEnd("DocumentFooterBulkItem") %]
    <input type="hidden" name="TicketID" value=""/>
</form>
[% RenderBlockEnd("DocumentFooter") %]

[% RenderBlockStart("DocumentMenuItemMoveForm") %]
<li class="[% Data.Class | html %]">
    <form title="[% Translate("Move ticket to a different queue") | html %]" action="[% Env("CGIHandle") %]" method="post">
        <input type="hidden" name="Action" value="AgentTicketMove"/>
        <input type="hidden" name="QueueID" value="[% Data.QueueID | html %]"/>
        <input type="hidden" name="TicketID" value="[% Data.TicketID | html %]"/>
        <label for="DestQueueID" class="InvisibleText">[% Translate("Change queue") | html %]:</label>
        [% Data.MoveQueuesStrg %]
    </form>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('.InlineActions, .OverviewActions').on('change', 'select[name=DestQueueID]', function (Event) {
        $(this).closest('form').submit();
    });
//]]></script>
[% END %]
</li>
[% RenderBlockEnd("DocumentMenuItemMoveForm") %]

[% WRAPPER JSOnDocumentComplete %]
[% RenderBlockStart("DocumentReadyActionRowAdd") %]
[% FOREACH MenuElement IN Data.Data %]
    [% MenuElement.Name = Interpolate(MenuElement.Name) %]
    [% MenuElement.Link = Interpolate(MenuElement.Link) %]
    [% MenuElement.Description = Interpolate(MenuElement.Description) %]
[% END %]
<script type="text/javascript">//<![CDATA[
    Core.UI.ActionRow.AddActions($('#TicketID_[% Data.TicketID | html %]'), [% JSON(Data.Data) %]);
//]]></script>
[% RenderBlockEnd("DocumentReadyActionRowAdd") %]
[% RenderBlockStart("DocumentReadyStart") %]
<script type="text/javascript">//<![CDATA[
    Core.UI.InitCheckboxSelection($('div.Checkbox'));
    $('.MasterAction').bind('click', function (Event) {
        var $MasterActionLink = $(this).find('.MasterActionLink');
        // prevent MasterAction on Dynamic Fields links
        if ($(Event.target).hasClass('DynamicFieldLink')) {
            return true;
        }
        // only act if the link was not clicked directly
        if (Event.target !== $MasterActionLink.get(0)) {
            if (Event.ctrlKey || Event.metaKey) {
                window.open($MasterActionLink.attr('href'));
            }
            else {
                window.location = $MasterActionLink.attr('href');
            }
            return false;
        }
    });

    if ($('body').hasClass('TouchDevice')) {
        $('ul.InlineActions li:not(.ResponsiveActionMenu)').hide();
    }
    $('li.ResponsiveActionMenu').on('click.ToggleResponsiveActionMenu', function () {
        $(this).siblings().toggle();
        $(this).toggleClass('Opened')
        return false;
    });

    $('.OverviewMedium li').on('mouseenter', function() {
        $(this).find('ul.InlineActions').css('top', '0px');
    });
    $('.OverviewMedium li').on('mouseleave', function(Event) {

        // Workaround for bug#12403: The inlineActions would hide if hovering
        // over the queue selection due to a bug in IE. As this is working fine
        // in MS Edge with the former pure css solution, this whole function
        // TargetNS.InitInlineActions could be dropped as soon as IE11 support is
        // ceased for OTRS. Remember to re-add the needed css in this case:
        //      .OverviewLarge > li:hover ul.InlineActions { top: 0px; }    (Core.OverviewLarge.css)
        //      .OverviewPreview > li:hover ul.InlineActions { top: 0px; }  (Core.OverviewMedium.css)
        if (Event.target.tagName.toLowerCase() === 'select') {
            return false;
        }
        $(this).find('ul.InlineActions').css('top', '-30px');
    });

//]]></script>
[% RenderBlockEnd("DocumentReadyStart") %]
[% END %]