File: AgentTicketOverviewNavBar.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 (202 lines) | stat: -rw-r--r-- 10,766 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
# --
# 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("OverviewNavBar") %]
<div class="OverviewBox ARIARoleMain [% Data.View | html %]">
    <h1>[% Translate(Data.TitleName) | html %]: [% Translate(Data.TitleValue) | html %]</h1>

    [% Data.DataInTheMiddle %]

    <div class="OverviewControl" id="OverviewControl">
        <div>
            <div class="ControlRow">
[% RenderBlockStart("OverviewNavBarFilter") %]
                <ul class="Tabs">
[% RenderBlockStart("OverviewNavBarFilterItem") %]
[% RenderBlockStart("OverviewNavBarFilterItemSelected") %]
                    <li class="Active [% Data.CSS | html %]">
                        <a name="OverviewControl" href="[% Env("Baselink") %]Action=[% Env("Action") %];[% Data.FilterLink %]Filter=[% Data.Filter | uri %]">[% Translate(Data.Name) | html %]<span>[% Data.Count | html %]</span></a>
                    </li>
[% RenderBlockEnd("OverviewNavBarFilterItemSelected") %]
[% RenderBlockStart("OverviewNavBarFilterItemSelectedNot") %]
                    <li class="[% Data.CSS | html %]">
                        <a name="OverviewControl" href="[% Env("Baselink") %]Action=[% Env("Action") %];[% Data.FilterLink %]Filter=[% Data.Filter | uri %]">[% Translate(Data.Name) | html %]<span>[% Data.Count | html %]</span></a>
                    </li>
[% RenderBlockEnd("OverviewNavBarFilterItemSelectedNot") %]
[% RenderBlockStart("OverviewNavBarFilterItemSplit") %]
                    -
[% RenderBlockEnd("OverviewNavBarFilterItemSplit") %]
[% RenderBlockEnd("OverviewNavBarFilterItem") %]
                </ul>
[% RenderBlockEnd("OverviewNavBarFilter") %]
[% RenderBlockStart("OverviewNavBarPageBack") %]
                <ul class="Tabs">
                    <li>
                        <a name="OverviewControl" id="TicketSearch" href="[% Env("Baselink") %]Action=[% Env("Action") %];[% Data.LinkBack %]">[% Translate("Change search options") | html %]</a>
                    </li>
                </ul>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    $('#TicketSearch').bind('click', function (Event) {
        Core.Agent.Search.OpenSearchDialog( 'AgentTicketSearch', "[% Data.Profile | html %]" );
        return false;
    });
//]]></script>
[% END %]
[% RenderBlockEnd("OverviewNavBarPageBack") %]

[% RenderBlockStart("ContextSettings") %]

                <ul class="ContextFunctions">

[% RenderBlockStart("DocumentActionRowRemoveColumnFilters") %]
                    <li class="[% Data.CSS | html %]">
                        <a href="[% Env("Baselink") %]Action=[% Env("Action") %];Filter=[% Data.Filter %];View=[% Data.View %];[% Data.LinkFilter %];DeleteFilters=DeleteFilters" title="[% Translate("Remove active filters for this screen.") | html %]">
                            <i class="fa fa-trash-o"></i>
                        </a>
                    </li>
[% RenderBlockEnd("DocumentActionRowRemoveColumnFilters") %]

                    <li class="ContextSettings">
                        <a href="#" id="ShowContextSettingsDialog" title="[% Translate("Settings") | html %]">
                            <i class="fa fa-cog"></i>
                            <span>[% Translate("Settings") | html %]</span>
                        </a>
                    </li>
                </ul>

                <div id="ContextSettingsDialogContainer" class="Hidden">
                    <form action="[% Env("CGIHandle") %]" method="post" id="ContextSettingsDialogOverview[% Data.View | html %]" class="WidgetSettingsForm">
                        <input type="hidden" name="Action" value="AgentPreferences"/>
                        <input type="hidden" name="Subaction" value="Update"/>
                        <input type="hidden" name="Group" value="[% Data.Group | html %]"/>
                        <input type="hidden" name="RedirectURL" value="[% Data.RequestedURL | html %]"/>
                        <fieldset class="TableLike FixedLabelSmall">
                            <label for="[% Data.PreferencesKey | html %]">[% Translate("Tickets per page") | html %]:</label>
                            <div class="Field">
                                [% Data.PageShownString %]
                            </div>
                            <div class="Clear"></div>

[% RenderBlockStart("FilterColumnSettings") %]
                            <input type="hidden" class="ColumnsEnabledJSON" value="[% Data.ColumnsEnabled | html %]" />
                            <input type="hidden" class="ColumnsAvailableJSON" value="[% Data.ColumnsAvailable | html %]" />
                            <input type="hidden" name="Group" value="[% Data.GroupName | html %]"/>
                            <input type="hidden" name="FilterAction" value="[% Data.Name | html %]"/>
                            <label class="DontPrint" for="[% Data.NamePref | html %]">[% Translate(Data.Desc) | html %]:</label>
                            <div class="Field DontPrint LayoutGrid AllocationListContainer">
                                <div class="Size1of2">
                                    <ul class="Tablelike">
                                        <li class="Header">[% Translate("Available Columns") | html %]</li>
                                    </ul>
                                    <div class="FilterInputContainer">
                                        <input type="text" class="FilterAvailableFields" name="FilterAvailableFields" value="" title="[% Translate("Filter available fields") | html %]" placeholder="[% Translate("Filter available fields") | html %]..." />
                                    </div>
                                    <ul class="AllocationList Tablelike AvailableFields SettingsOverview" id="AvailableField-Dashboard[% Data.Name | html %]"></ul>
                                </div>
                                <div class="Size1of2">
                                    <ul class="Tablelike">
                                        <li class="Header">[% Translate("Visible Columns (order by drag & drop)") | html %]</li>
                                    </ul>
                                    <ul class="AllocationList Tablelike AssignedFields OrderNumbers SettingsOverview" id="AssignedFields-Dashboard[% Data.Name | html %]"></ul>
                                </div>
                            </div>
                            <div class="Clear"></div>

[% RenderBlockEnd("FilterColumnSettings") %]

                        </fieldset>
                    </form>
                </div>

[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
$('#ShowContextSettingsDialog').bind('click', function (Event) {
    Core.UI.Dialog.ShowContentDialog($('#ContextSettingsDialogContainer'), [% Translate("Settings") | JSON %], '15%', 'Center', true,
        [
            {
                Label: [% Translate("Submit") | JSON %],
                Type: 'Submit',
                Class: 'Primary',
                Function: function () {
                    var $ListContainer = $('.AllocationListContainer').find('.AssignedFields'),
                        FieldID;
                    if (isJQueryObject($ListContainer) && $ListContainer.length) {
                        $.each($ListContainer.find('li'), function() {
                            FieldID = 'UserFilterColumnsEnabled-' + $(this).attr('data-fieldname');

                            // only add this field if its not already there. This could happen
                            // if e.g. the save button is clicked multiple times
                            if (!$('#' + FieldID).length) {
                                $('<input name="UserFilterColumnsEnabled" type="hidden" />').attr('id', FieldID).val($(this).attr('data-fieldname')).appendTo($ListContainer.closest('div'));
                            }
                        });
                    }
                    return true;
                }
            }
        ], true);
    Event.preventDefault();
    Event.stopPropagation();
    Core.Agent.TableFilters.SetAllocationList();
    return false;
});

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

            </div>
            <div class="ActionRow">
                <div class="OverviewActions">
                    [% Data.ActionRow %]
                    <ul class="OverviewZoom">
[% RenderBlockStart("OverviewNavBarViewMode") %]
[% RenderBlockStart("OverviewNavBarViewModeSelected") %]
                        <li class="Active">
                            <a class="[% Data.Name | html %]" name="OverviewControl" href="[% Env("Baselink") %]Action=[% Env("Action") %];Filter=[% Data.Filter | uri %];View=[% Data.View | uri %];[% Data.LinkFilter %]" title="[% Translate(Data.Name) | html %]">
                                [% Translate(Data.NameShort) | html %]
                            </a>
                        </li>
[% RenderBlockEnd("OverviewNavBarViewModeSelected") %]
[% RenderBlockStart("OverviewNavBarViewModeNotSelected") %]
                        <li>
                            <a class="[% Data.Name | html %]" name="OverviewControl" href="[% Env("Baselink") %]Action=[% Env("Action") %];Filter=[% Data.Filter | uri %];View=[% Data.View | uri %];[% Data.LinkFilter %]" title="[% Translate(Data.Name) | html %]">
                                [% Translate(Data.NameShort) | html %]
                            </a>
                        </li>
[% RenderBlockEnd("OverviewNavBarViewModeNotSelected") %]
[% RenderBlockEnd("OverviewNavBarViewMode") %]
                    </ul>
                    <span class="Pagination">
[% RenderBlockStart("OverviewNavBarPageNavBar") %]
                        [% Data.ResultLong %]
                        [% Data.SiteNavBarLong %]
[% RenderBlockEnd("OverviewNavBarPageNavBar") %]
                    </span>
                    <div class="ClearLeft"></div>
                </div>
# sort order bar if needed
                [% Data.SortOrderBar %]
            </div>
        </div>
    </div>
</div>

[% RenderBlockEnd("OverviewNavBar") %]

[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    Core.Config.AddConfig({
[% RenderBlockStart("ColumnTranslation") %]
        'Column[% Data.ColumnName | html %]': [% Translate(Data.TranslateString) | JSON %][% RenderBlockStart("ColumnTranslationSeparator") %],[% RenderBlockEnd("ColumnTranslationSeparator") %]
[% RenderBlockEnd("ColumnTranslation") %]

    });
//]]></script>
[% END %]