# --
# AdminCustomerUserService.dtl - provides HTML form for AdminInterface
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminCustomerUserService.dtl,v 1.43 2012-01-09 11:16:46 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">
    <div class="Header">
        <h1>$Text{"Manage Customer-Services Relations"}</h1>
    </div>

    <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"};CustomerUserSearch=$LQData{"CustomerUserSearch"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->

<!-- dtl:block:Search -->
                    <li>
                        <form class="SearchBox" action="$Env{"CGIHandle"}" method="post">
                            <input type="hidden" name="Action" value="$Env{"Action"}" />
                            <input type="text" name="CustomerUserSearch" id="CustomerUserSearch" value="$QData{"CustomerUserSearch"}" title="$Text{"Search"}" />
<!-- dtl:block:SearchAllocateService -->
                            <input type="hidden" name="Subaction" value="$QData{"Subaction"}" />
                            <input type="hidden" name="ServiceID" value="$QData{"ServiceID"}" />
<!-- dtl:block:SearchAllocateService -->
                            <button class="Primary" type="submit" value="$Text{"Search"}"><span>$Text{"Search"}</span></button>
                            <p class="FieldExplanation">
                                <label for="CustomerUserSearch">
                                    $Text{"Search for customers."} $Text{"Wildcards like '*' are allowed."}
                                </label>
                            </p>
                        </form>
                    </li>
<!-- dtl:block:Search -->
<!-- dtl:block:Default -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=AllocateCustomerUser" class="CallForAction">
                            <span>$Text{"Edit default services"}</span>
                        </a>
                    </li>
<!-- dtl:block:Default -->
                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->
<!-- dtl:block:Filter -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterServices">$Text{"Filter for Services"}</label></h2>
            </div>
            <div class="Content">
                <ul>
                    <li>
                        <form action="">
                            <fieldset>
                                <input type="text" id="FilterServices" class="W50pc" name="FilterServices" value="" title="$Text{"Filter for Services"}" />
                            </fieldset>
                        </form>
                    </li>
                </ul>
            </div>
        </div>
<!-- dtl:block:Filter -->
    </div>
    <div class="ContentColumn">
        <div class="WidgetSimple">
<!-- dtl:block:Result -->
            <div class="Header">
                <h2>$Text{"Search Result:"}</h2>
            </div>
            <div class="Content LayoutGrid ColumnsWithSpacing">
                <div class="Size1of2">
                    <ul class="Tablelike" id="Customers">
                        <li class="Header">$Text{"Customers"}
<!-- dtl:block:ResultCustomerUserCount -->
                            ($QData{"CustomerUserCount"})
<!-- dtl:block:ResultCustomerUserCount -->
<!-- dtl:block:ResultCustomerUserCountLimit -->
                            (<span class='Error'>$QData{"CustomerUserCount"}</span>)
<!-- dtl:block:ResultCustomerUserCountLimit -->
                        </li>
<!-- dtl:block:ResultUserRow -->
                        <li><a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=AllocateCustomerUser;CustomerUserLogin=$LQData{"ID"};CustomerUserSearch=$LQData{"CustomerUserSearch"};ServiceSearch=$LQData{"ServiceSearch"}" class="AsBlock">$QData{"Name"}</a></li>
<!-- dtl:block:ResultUserRow -->
<!-- dtl:block:NoDataFoundMsgList -->
                        <li>$Text{"No data found."}</li>
<!-- dtl:block:NoDataFoundMsgList -->
                    </ul>
                </div>
                <div class="Size1of2">
                    <ul class="Tablelike" id="Service">
                        <li class="Header">$Text{"Services"}
                        </li>
<!-- dtl:block:ResultServiceRow -->
                        <li><a title="$QData{"Name"}" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=AllocateService;ServiceID=$LQData{"ID"};CustomerUserSearch=$LQData{"CustomerUserSearch"}" class="AsBlock">$QData{"Name","40"}</a></li>
<!-- dtl:block:ResultServiceRow -->
                        <li class="FilterMessage Hidden">$Text{"No matches found."}</li>
                    </ul>
                </div>
            </div>
<!-- dtl:block:Result -->

<!-- dtl:block:AllocateItem -->
            <div class="Header">
                <h2>
<!-- dtl:block:AllocateItemHeaderService -->
                    $Text{"Allocate Services to Customer"}
<!-- dtl:block:AllocateItemHeaderService -->
<!-- dtl:block:AllocateItemHeaderCustomer -->
                    $Text{"Allocate Customers to Service"}
<!-- dtl:block:AllocateItemHeaderCustomer -->
                    <a href="$Env{"Baselink"}Action=$LQData{"ActionHome"};Subaction=$LQData{"SubactionHeader"};$LQData{"IDHeaderStrg"}=$LQData{"ID"}">$QData{"Name"}</a>
                </h2>
            </div>
            <div class="Content LayoutGrid ColumnsWithSpacing">
                <form action="$Env{"CGIHandle"}" method="post" name="matrix">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="Allocate$QData{"Type"}Save"/>
                    <input type="hidden" name="CustomerUserSearch" value="$QData{"CustomerUserSearch"}"/>
                    <input type="hidden" name="ID" value="$QData{"ID"}"/>
                    <table class="DataTable VariableWidth" id="$QData{"NeType"}">
                        <thead>
                            <tr>
                                <th>$Text{"$Data{"VisibleNeType"}"}
<!-- dtl:block:AllocateItemCount -->
                                    ($QData{"ItemCount"})
<!-- dtl:block:AllocateItemCount -->
<!-- dtl:block:AllocateItemCountLimit -->
                                    (<span class="Error">$QData{"ItemCount"}</span>)
<!-- dtl:block:AllocateItemCountLimit -->
                                </th>
                                <th>
                                    <input type="checkbox" id="SelectAllItemsSelected" name="ItemsSelected" title="$Text{"Toggle active state for all"}" value="" />
                                    $Text{"Active"}
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
Core.Form.InitSelectAllCheckboxes($('table td input:checkbox[name=ItemsSelected]'), $('#SelectAllItemsSelected'));
$('input:checkbox[name=ItemsSelected]').bind('click', function () {
    Core.Form.SelectAllCheckboxes($(this), $('#SelectAllItemsSelected'));
});
//]]></script>
<!--dtl:js_on_document_complete-->
                                </th>
                            </tr>
                        </thead>
                        <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                            <tr>
                                <td colspan="$QData{"ColSpan"}">
                                    $Text{"No data found."}
                                </td>
                            </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:AllocateItemRow -->
                            <tr>
                                <td><a href="$Env{"Baselink"}Action=$LQData{"ActionNeHome"};Subaction=$LQData{"SubactionRow"};$LQData{"IDRowStrg"}=$LQData{"ID"}">$QData{"Name"}</a></td>
                                <td>
                                    <input type="checkbox" name="ItemsSelected" title="$Text{"Toggle active state for %s", "$Data{"Name"}"}" value="$QData{"ID"}" $QData{"Checked"}/>
                                    <input type="hidden" name="ItemsAll" value="$QData{"ID"}"/>
                                </td>
                            </tr>
<!-- dtl:block:AllocateItemRow -->
                            <tr class="FilterMessage Hidden">
                                <td colspan="3">$Text{"No matches found."}</td>
                            </tr>
                        </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>
                </form>
            </div>
<!-- dtl:block:AllocateItem -->
        </div>
    </div>
    <div class="Clear"></div>
</div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterServices'), $('#Service'));
//]]></script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:Overview -->
