# --
# AdminRoleGroup.dtl - provides HTML form for AdminInterface
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AdminRoleGroup.dtl,v 1.13 2010/02/05 13:58:23 mn Exp $
# --
# 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.
# --

<!-- dtl:block:Overview -->
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"Manage Role-Group Relations"}</h1>

    <div class="SidebarColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterRoles">$Text{"Filter for Roles"}</label></h2>
            </div>
            <div class="Content">
                <input type="text" id="FilterRoles" class="W50pc" name="FilterUser" value="" title="$Text{"Filter for Roles"}"/>
            </div>
        </div>
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterGroups">$Text{"Filter for Groups"}</label></h2>
            </div>
            <div class="Content">
                <input type="text" id="FilterGroups" class="W50pc" name="FilterGroups" value="" title="$Text{"Filter for Groups"}" />
            </div>
        </div>
    </div>
    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Overview"}</h2>
            </div>
            <div class="Content LayoutGrid ColumnsWithSpacing">
                <div class="Size1of2">
                    <ul class="Tablelike" id="Roles">
                        <li class="Header">$Text{"Roles"}</li>
                        <li class="FilterMessage Hidden">$Text{"No matches found."}</li>
<!-- dtl:block:NoDataFoundMsg -->
                        <li>$Text{"No data found."}</li>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:List1n-->
                        <li><a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$LQData{"Subaction"};ID=$LQData{"ID"}" class="AsBlock">$QData{"Name"}</a></li>
<!-- dtl:block:List1n-->
                    </ul>
                </div>
                <div class="Size1of2">
                    <ul class="Tablelike" id="Groups">
                        <li class="Header">$Text{"Groups"}</li>
                        <li class="FilterMessage Hidden">$Text{"No matches found."}</li>
<!-- dtl:block:Listn1-->
                        <li><a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$LQData{"Subaction"};ID=$LQData{"ID"}" class="AsBlock">$QData{"Name"}</a></li>
<!-- dtl:block:Listn1-->
                    </ul>
                </div>
                <div class="Clear"></div>
            </div>
        </div>
    </div>
    <div class="Clear"></div>
</div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterRoles'), $('#Roles'));
    Core.UI.Table.InitTableFilter($('#FilterGroups'), $('#Groups'));
//]]></script>
<!-- dtl:js_on_document_complete -->

<!-- dtl:block:Overview -->
<!-- dtl:block:Change -->
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"Manage Role-Group Relations"}</h1>
    <div class="SidebarColumn">

<!-- dtl:block:ActionList -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Actions"}</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
<!-- dtl:block:ActionOverview -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->
                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->

        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="Filter">$Text{"Filter"}</label></h2>
            </div>
            <div class="Content">
                <input type="text" id="Filter" class="W50pc" name="Filter" value="" />
            </div>
        </div>
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
                <p class="FieldExplanation">
                    $Text{"Select the role:group permissions."}
                    $Text{"If nothing is selected, then there are no permissions in this group (tickets will not be available for the role)."}
                </p>
            </div>
        </div>
    </div>

    <div class="ContentColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>
<!-- dtl:block:ChangeHeaderRole -->
                    $Text{"Change Role Relations for Group"}
<!-- dtl:block:ChangeHeaderRole -->
<!-- dtl:block:ChangeHeaderGroup -->
                    $Text{"Change Group Relations for Role"}
<!-- dtl:block:ChangeHeaderGroup -->
                    <a href="$Env{"Baselink"}Action=$LQData{"ActionHome"};Subaction=Change;ID=$LQData{"ID"}">$QData{"Name"}</a>
                </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$QData{"Type"}"/>
                    <input type="hidden" name="ID" value="$QData{"ID"}"/>
                    <table class="DataTable VariableWidth" id="UserGroups">
                        <thead>
                            <tr>
                                <th>$Text{"$Data{"NeType"}"}</th>
<!-- dtl:block:ChangeHeader -->
                                <th class="Center $QData{"Mark"}">
                                    <input type="checkbox" name="$QData{"Type"}" id="SelectAll$QData{"Type"}" title="$Text{"Toggle %s permission for all", "$QData{"Type"}"}" value="" />
                                    $QData{"Type"}
                                </th>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.Form.InitSelectAllCheckboxes($('table td input:checkbox[name=$QData{"Type"}]'), $('#SelectAll$QData{"Type"}'));
    $('input:checkbox[name=$QData{"Type"}]').bind('click', function () {
        Core.Form.SelectAllCheckboxes($(this), $('#SelectAll$QData{"Type"}'));
    });
//]]></script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:ChangeHeader -->
                            </tr>
                        </thead>
                        <tbody>
<!-- dtl:block:ChangeRow -->
                            <tr>
                                <td><a href="$Env{"Baselink"}Action=Admin$LQData{"NeType"};Subaction=Change;ID=$LQData{"ID"}">$QData{"Name"}</a></td>
<!-- dtl:block:ChangeRowItem -->
                                <td class="$QData{"Mark"}">
                                    <input type="checkbox" name="$QData{"Type"}" title="$Text{"Toggle %s permission for %s", "$QData{"Type"}", "$QData{"Name"}"}" value="$QData{"ID"}" $Data{"Selected"}/>
                                </td>
<!-- dtl:block:ChangeRowItem -->
                            </tr>
<!-- dtl:block:ChangeRow -->
                        </tbody>
                    </table>
                    <div class="Field SpacingTop">
                        <button class="Primary" type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
                        $Text{"or"}
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Cancel"}</a>
                    </div>
                    <div class="Clear"></div>
                </form>
            </div>
        </div>
        <div class="WidgetSimple SpacingTop">
            <div class="Header">
                <h2>$Text{"Reference"}</h2>
            </div>
            <div class="Content">

                <dl>
                    <dt>$Text{"ro"}</dt>
                    <dd>
                        $Text{"Read only access to the ticket in this group/queue."}
                    </dd>

                    <dt>$Text{"move_into"}</dt>
                    <dd>
                        $Text{"Permissions to move tickets into this group/queue."}
                    </dd>

                    <dt>$Text{"create"}</dt>
                    <dd>
                        $Text{"Permissions to create tickets in this group/queue."}
                    </dd>

                    <dt>$Text{"priority"}</dt>
                    <dd>
                        $Text{"Permissions to change the ticket priority in this group/queue."}
                    </dd>

                    <dt>$Text{"rw"}</dt>
                    <dd>
                        $Text{"Full read and write access to the tickets in this group/queue."}
                    </dd>
                </dl>

            </div>
        </div>

    </div>
    <div class="Clear"></div>
</div>

<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#Filter'), $('#UserGroups'));
//]]></script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:Change -->
