# --
# AgentDashboardTicketGeneric.dtl - provides HTML for global dashboard
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AgentDashboardTicketGeneric.dtl,v 1.46 2012/11/29 14:07:31 mg 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:ContentLargeTicketGenericFilter -->
<ul class="Tab Actions">
    <li class="$QData{"Locked::Selected"}"><a href="#" id="Dashboard$QData{"Name"}Locked">$Text{"My locked tickets"} ($QData{"Locked"})</a></li>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    $('#Dashboard$QData{"Name"}Locked').unbind('click').bind('click', function(){
        $('#Dashboard$QData{"Name"}-box').addClass('Loading');
        Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=Locked;CustomerID=$QData{"CustomerID"}', function () {
            Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
            $('#Dashboard$QData{"Name"}-box').removeClass('Loading');
        });
        return false;
    });
//]]></script>
<!-- dtl:js_on_document_complete -->

<!-- dtl:block:ContentLargeTicketGenericFilterWatcher -->
    <li class="$QData{"Watcher::Selected"}"><a href="#" id="Dashboard$QData{"Name"}Watcher">$Text{"My watched tickets"} ($QData{"Watcher"})</a></li>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    $('#Dashboard$QData{"Name"}Watcher').unbind('click').bind('click', function(){
        $('#Dashboard$QData{"Name"}-box').addClass('Loading');
        Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=Watcher;CustomerID=$QData{"CustomerID"}', function () {
            Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
            $('#Dashboard$QData{"Name"}-box').removeClass('Loading');
        });
        return false;
    });
//]]></script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:ContentLargeTicketGenericFilterWatcher -->

<!-- dtl:block:ContentLargeTicketGenericFilterResponsible -->
    <li class="$QData{"Responsible::Selected"}"><a href="#" id="Dashboard$QData{"Name"}Responsible">$Text{"My responsibilities"} ($QData{"Responsible"})</a></li>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    $('#Dashboard$QData{"Name"}Responsible').unbind('click').bind('click', function(){
        $('#Dashboard$QData{"Name"}-box').addClass('Loading');
        Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=Responsible;CustomerID=$QData{"CustomerID"}', function () {
            Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
            $('#Dashboard$QData{"Name"}-box').removeClass('Loading');
        });
        return false;
    });
//]]></script>
<!-- dtl:js_on_document_complete -->

<!-- dtl:block:ContentLargeTicketGenericFilterResponsible -->
<!-- dtl:block:ContentLargeTicketGenericFilterMyQueues -->
    <li class="$QData{"MyQueues::Selected"}"><a href="#" id="Dashboard$QData{"Name"}MyQueues">$Text{"Tickets in My Queues"} ($QData{"MyQueues"})</a></li>
<!-- dtl:block:ContentLargeTicketGenericFilterMyQueues -->
    <li class="$QData{"All::Selected"} Last"><a href="#" id="Dashboard$QData{"Name"}All">$Text{"All tickets"} ($QData{"All"})</a></li>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
    $('#Dashboard$QData{"Name"}MyQueues').unbind('click').bind('click', function(){
        $('#Dashboard$QData{"Name"}-box').addClass('Loading');
        Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=MyQueues;CustomerID=$QData{"CustomerID"}', function () {
            Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
            $('#Dashboard$QData{"Name"}-box').removeClass('Loading');
        });
        return false;
    });
    $('#Dashboard$QData{"Name"}All').unbind('click').bind('click', function(){
        $('#Dashboard$QData{"Name"}-box').addClass('Loading');
        Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=All;CustomerID=$QData{"CustomerID"}', function () {
            Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
            $('#Dashboard$QData{"Name"}-box').removeClass('Loading');
        });
        return false;
    });
//]]></script>
<!-- dtl:js_on_document_complete -->
</ul>

<!-- dtl:block:ContentLargeTicketGenericFilterNavBar -->
<span class="Pagination">
    $Data{"SiteNavBar"}
</span>
<!-- dtl:block:ContentLargeTicketGenericFilterNavBar -->

<!-- dtl:block:ContentLargeTicketGenericFilter -->
<table class="DataTable">
    <tbody>
<!-- dtl:block:ContentLargeTicketGenericRow -->
        <tr class="MasterAction">
<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
            <td class="$QData{"ClassTable"} Flags" title="$Text{"$Data{"Title"}"}">
<!-- dtl:block:ContentLargeTicketGenericRowMetaImage -->
                <div class="$QData{"Class"} Small" title="$Text{"$Data{"Title"}"}">
                    <span class="$QData{"ClassSpan"}">$Text{"$Data{"Title"}"}</span>
                </div>
<!-- dtl:block:ContentLargeTicketGenericRowMetaImage -->
            </td>
<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
            <td class="W10pc">
                <a href="$Env{"Baselink"}Action=AgentTicketZoom;TicketID=$Data{"TicketID"}" title="$QData{"Title"}" class="AsBlock MasterActionLink">$Data{"TicketNumber"}</a>
            </td>
            <td class="W50pc">
                <div title="$QData{"Title"}">$QData{"Title","70"}</div>
            </td>
            <td>$QData{"Time"}</td>
        </tr>
<!-- dtl:block:ContentLargeTicketGenericRow -->
<!-- dtl:block:ContentLargeTicketGenericNone -->
        <tr>
            <td>
                $Text{"none"}
            </td>
        </tr>
<!-- dtl:block:ContentLargeTicketGenericNone -->
    </tbody>
</table>

<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('.MasterAction').bind('click', function (Event) {
    var $MasterActionLink = $(this).find('.MasterActionLink');
    // only act if the link was not clicked directly
    if (Event.target !== $MasterActionLink.get(0)) {
        window.location = $MasterActionLink.attr('href');
        return false;
    }
});
//]]></script>
<!-- dtl:js_on_document_complete -->
