# --
# AdminResponseAttachment.dtl - provides HTML form for AdminInterface
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminResponseAttachment.dtl,v 1.22 2012/11/20 15:12:56 mh 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 Responses <-> Attachments Relations"}</h1>

    <div class="SidebarColumn">

<!-- dtl:block:Filters -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterResponses">$Text{"Filter for Responses"}</label></h2>
            </div>
            <div class="Content">
                <input type="text" id="FilterResponses" class="W50pc" name="FilterUser" value="" title="$Text{"Filter for Responses"}"/>
            </div>
        </div>
        <div class="WidgetSimple">
            <div class="Header">
                <h2><label for="FilterAttachments">$Text{"Filter for Attachments"}</label></h2>
            </div>
            <div class="Content">
                <input type="text" id="FilterAttachments" class="W50pc" name="FilterGroups" value="" title="$Text{"Filter for Attachments"}" />
            </div>
        </div>

<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterResponses'), $('#Responses'));
    Core.UI.Table.InitTableFilter($('#FilterAttachments'), $('#Attachments'));
//]]></script>
<!-- dtl:js_on_document_complete -->

<!-- dtl:block:Filters -->

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

<!-- dtl:block:OverviewResult-->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Overview"}</h2>
            </div>
            <div class="Content LayoutGrid ColumnsWithSpacing">
                <div class="Size1of2">
                    <ul class="Tablelike" id="Responses">
                        <li class="Header">$Text{"Responses"}</li>
                        <li class="FilterMessage Hidden">$Text{"No matches found."}</li>
<!-- dtl:block:NoResponsesFoundMsg -->
                        <li>$Text{"No data found."}</li>
<!-- dtl:block:NoResponsesFoundMsg -->
<!-- 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="Attachments">
                        <li class="Header">$Text{"Attachments"}</li>
                        <li class="FilterMessage Hidden">$Text{"No matches found."}</li>
<!-- dtl:block:NoAttachmentsFoundMsg -->
                        <li>$Text{"No data found."}</li>
<!-- dtl:block:NoAttachmentsFoundMsg -->
<!-- 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 class="Clear"></div>


<!-- dtl:block:OverviewResult-->
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    Core.UI.Table.InitTableFilter($('#FilterResponses'), $('#Responses'));
    Core.UI.Table.InitTableFilter($('#FilterAttachments'), $('#Attachments'));
//]]></script>
<!-- dtl:js_on_document_complete -->

<!-- dtl:block:Change -->
        <div class="WidgetSimple">
            <div class="Header">
                <h2>
<!-- dtl:block:ChangeHeaderResponse -->
                    $Text{"Change Response Relations for Attachment"}
<!-- dtl:block:ChangeHeaderResponse -->
<!-- dtl:block:ChangeHeaderAttachment -->
                    $Text{"Change Attachment Relations for Response"}
<!-- dtl:block:ChangeHeaderAttachment -->
                    <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="ResponseAttachment">
                        <thead>
                            <tr>
                                <th>$Text{"$Data{"VisibleNeType"}"}</th>
<!-- dtl:block:ChangeHeader -->
                                <th>
                                    <input type="checkbox" name="$QData{"Type"}" id="SelectAll$QData{"Type"}" title="$Text{"Toggle active for all"}" value="" />
                                    $Text{"Active"}
                                </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>
                                <td>
                                    <input type="checkbox" name="$QData{"Type"}" title="$Text{"Link %s to selected %s","$QData{"Name"}","$QData{"Type"}"}" value="$QData{"ID"}" $Data{"Selected"}/>
                                </td>
                            </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>
<!-- dtl:block:Change -->
    </div>
    <div class="Clear"></div>
</div>

<!-- dtl:block:Overview-->
