# --
# CustomerTicketOverview.dtl - html for ticket status view (all tickets)
# Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
# --
# $Id: CustomerTicketOverview.dtl,v 1.5 2011/12/02 12:04:42 mb 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.
# --
<div id="MainBox" class="TicketView ARIARoleMain $Config{"Ticket::Frontend::CustomerTicketOverviewSortable"}">
<!-- dtl:block:Filled -->
    <div class="ActionRow">
        <ul class="Filter Tabs">
<!-- dtl:block:FilterHeader -->
            <li class="$QData{"ClassLI"}">
                <a class="$QData{"ClassA"}" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};Filter=$LQData{"Filter"};SortBy=$LQData{"SortBy"};OrderBy=$LQData{"OrderBy"};">
                    $Text{"$Data{"Name"}"} ($QData{"Count"})
                </a>
            </li>
<!-- dtl:block:FilterHeader -->
            <li class="Clear"></li>
        </ul>
        <div class="Tabs Pagination">
            $Data{"SiteNavBar"}
        </div>
        <div class="Clear"></div>
    </div>
    <div class="Content">
        <table class="Overview">
            <thead>
                <tr>
                    <th class="Ticket $LQData{"TicketSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=Ticket;OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">
                            $Config{"Ticket::Hook"}
                        </a>
                    </th>
                    <th class="Title $LQData{"TitleSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=Title;OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">
                            $Text{"Title"}
                        </a>
                    </th>
                    <th class="State $LQData{"StateSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=State;OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">
                            $Text{"State"}
                        </a>
                    </th>
                    <th class="Age $LQData{"AgeSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=Age;OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">
                            $Text{"Age"}
                        </a>
                    </th>
                </tr>
            </thead>
            <tbody>
<!-- dtl:block:Record -->
                <tr title="$QData{"TicketNumber"}" class="MasterAction">
                    <td class="Ticket">
                        <a href="$Env{"Baselink"}Action=CustomerTicketZoom;TicketNumber=$LQData{"TicketNumber"}" class="MasterActionLink">$QData{"TicketNumber"}</a>
                    </td>
                    <td class="Title">
                        <div>
                            <h2>$QData{"Subject","60"}</h2>
                            &nbsp;-&nbsp; $QData{"Body","200"}
                        </div>
                    </td>
                    <td class="Status" title="$Text{"$Data{"State"}"}">$Text{"$Data{"State"}"}</td>
                    <td class="Age" title="$TimeShort{"$Data{"Created"}"}">$QData{"Age","20"}</td>
                </tr>
<!-- dtl:block:Record -->
<!-- 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 -->
            </tbody>
        </table>
    </div>
<!-- dtl:block:FilterFooter -->
    <div id="BottomActionRow" class="ActionRow BigButtons">
        <ul class="Tabs Filter">
<!-- dtl:block:FilterFooterItem -->
            <li class="$QData{"ClassLI"}">
                <a class="$QData{"ClassA"}" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};Filter=$LQData{"Filter"};SortBy=$LQData{"SortBy"};OrderBy=$LQData{"OrderBy"};">
                    $Text{"$Data{"Name"}"} ($QData{"Count"})
                </a>
            </li>
<!-- dtl:block:FilterFooterItem -->
            <li class="Clear"></li>
        </ul>
        <div class="Tabs Pagination">
            $Data{"SiteNavBar"}
        </div>
        <div class="Clear"></div>
    </div>
<!-- dtl:block:FilterFooter -->
<!-- dtl:block:Filled -->

<!-- dtl:block:Empty -->
    <div class="Placeholder">
<!-- dtl:block:EmptyDefault -->
        <h2>$Text{"Welcome!"}</h2>
        <p>
            $Text{"Please click the button below to create your first ticket."}
        </p>
        <a class="Button" href="$Env{"Baselink"}Action=CustomerTicketMessage">$Text{"Create your first ticket"}</a>
<!-- dtl:block:EmptyDefault -->
<!-- dtl:block:EmptyCustom -->
        <h2>$QData{"Title"}</h2>
        <p>
            $QData{"Text"}
        </p>
        <a class="Button" href="$Env{"Baselink"}Action=CustomerTicketMessage">$QData{"Button"}</a>
<!-- dtl:block:EmptyCustom -->
    </div>
<!-- dtl:block:Empty -->
</div>
