QueueServiceChange.tt 5.4 KB
# --
# Kernel/Output/HTML/Standard/QueueServiceChange.tt - edit
# Copyright (C) (2014) SeTIC - UFSC - http://setic.ufsc.br/
# Version 06/01/2015 - Adjusts for OTRS 4
#
# 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.
# --
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>[% Translate("Services and queues") | html %]</h1>
    
    [% BreadcrumbPath = [
            {
                Name => Translate('Services per queue'),
                Link => Env("Action"),
            },
        ]
    %]
    
    [% IF Data.Type == "Service" %]    	
    	[% USE EditTitle = String(Translate("Customizing services for queue")) %]
    	[% BreadcrumbPath.push({ Name => EditTitle.append( ' ', Data.Name ) }) %]
	[% END %]
    [% IF Data.Type == "Queue" %]
    	[% USE EditTitle = String(Translate("Customizing queues for service")) %]
    	[% BreadcrumbPath.push({ Name => EditTitle.append( ' ', Data.Name ) }) %]
	[% END %]
	
    [% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]
    
    <div class="SidebarColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>[% Translate("Actions") | html %]</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
                    <li>
                        <a href="[% Env("Baselink") %]Action=[% Env("Action") %]" class="CallForAction"><span>[% Translate("Go to overview") | html %]</span></a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="WidgetSimple">
            <div class="Header">
                <h2>
                    <label for="Filter">[% Translate("Filter") | html %]</label>
                </h2>
            </div>
            <div class="Content">
                <input type="text" id="Filter" class="W50pc" name="Filter" value="" title="[% Translate("Filter") | html %]" />
            </div>
        </div>
    </div>

    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>
[% RenderBlockStart("ChangeHeaderService") %]
                    [% Translate("Select queues for the service") | html %]
[% RenderBlockEnd("ChangeHeaderService") %]
[% RenderBlockStart("ChangeHeaderQueue") %]
                    [% Translate("Select services for the queue") | html %]
[% RenderBlockEnd("ChangeHeaderQueue") %]
                    [% Data.Name | html %]
                </h2>
            </div>
            <div class="Content ">
                <form action="[% Env("CGIHandle") %]" method="post" name="matrix">
                    <input type="hidden" name="Action" value="[% Env("Action") %]"/>
                    <input type="hidden" name="Subaction" value="Change[% Data.VisibleNeType | html %]"/>
                    <input type="hidden" name="ID" value="[% Data.ID | html %]"/>
                    <table class="DataTable VariableWidth" id="ServicesQueues">
                        <thead>
                            <tr>
                                <th>[% Translate(Data.VisibleNeType) | html %]</th>
[% RenderBlockStart("ChangeHeader") %]
                                <th class="Center [% Data.Mark | html %]">
                                    <input type="checkbox" name="[% Data.Type | html %]" id="SelectAll[% Data.Type | html %]" title="[% Translate("Toggle active state for all") | html %]" value="" />
                                    [% Translate("Active") | html %]
                                </th>
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    Core.Form.InitSelectAllCheckboxes($('table td input:checkbox[name=[% Data.Type | html %]]'), $('#SelectAll[% Data.Type | html %]'));
    $('input:checkbox[name=[% Data.Type | html %]]').bind('click', function () {
        Core.Form.SelectAllCheckboxes($(this), $('#SelectAll[% Data.Type | html %]'));
    });
//]]></script>
[% END %]
[% RenderBlockEnd("ChangeHeader") %]
                            </tr>
                        </thead>
                        <tbody>
[% RenderBlockStart("ChangeRow") %]
                            <tr>
                                <td>[% Data.Name | html %]</td>
                                <td class="[% Data.Mark | html %]">
                                    <input type="checkbox" name="[% Data.Type | html %]" title="[% Translate("Toggle active state for %s", Data.Name) | html %]" value="[% Data.ID | html %]" [% Data.Selected %]/>
                                </td>
                            </tr>
[% RenderBlockEnd("ChangeRow") %]
                        </tbody>
                    </table>
                    <div class="Field SpacingTop">
                        <button class="Primary" type="submit" value="[% Translate("Submit") | html %]">[% Translate("Submit") | html %]</button>
                        [% Translate("or") | html %]
                        <a href="[% Env("Baselink") %]Action=[% Env("Action") %]">[% Translate("Cancel") | html %]</a>
                    </div>
                    <div class="Clear"></div>
                </form>
            </div>
        </div>
    </div>
    <div class="Clear"></div>
</div>

[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#Filter'), $('#ServicesQueues'));
//]]></script>
[% END %]