# --
# CustomerTicketOverview.dtl - html for ticket status view (all tickets)
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: CustomerTicketOverview.dtl,v 1.11 2012/11/20 15:25:15 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.
# --
<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>
<!-- dtl:block:OverviewNavBarPageOwner -->
                    <th class="Owner">
                        <span>$Text{"Owner"}</span>
                    </th>
<!-- dtl:block:OverviewNavBarPageOwner -->
<!-- dtl:block:OverviewNavBarPageQueue -->
                    <th class="Queue $LQData{"QueueSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=Queue;OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">
                            $Text{"Queue"}
                        </a>
                    </th>
<!-- dtl:block:OverviewNavBarPageQueue -->
<!-- dtl:block:OverviewNavBarPageDynamicField -->
                    <th class="DynamicField Last $QData{"CSS"}">
<!-- dtl:block:OverviewNavBarPageDynamicFieldSortable -->
                        <a name="OverviewControl" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=DynamicField_$LQData{"DynamicFieldName"};OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">$Text{"$Data{"Label"}"}</a>
<!-- dtl:block:OverviewNavBarPageDynamicFieldSortable -->
<!-- dtl:block:OverviewNavBarPageDynamicFieldNotSortable -->
                        <span>$Text{"$Data{"Label"}"}</span>
<!-- dtl:block:OverviewNavBarPageDynamicFieldNotSortable -->
                    </th>
<!-- dtl:block:OverviewNavBarPageDynamicField -->
# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 and Field2 are the names of the fields and had to be replaced with the actual
# field names
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field1 -->
#                    <th class="DynamicField Last $QData{"CSS"}">
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field1_Sortable -->
#                        <a name="OverviewControl" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=$Env{"Subaction"};SortBy=DynamicField_$LQData{"DynamicFieldName"};OrderBy=$LQData{"OrderBy"};Filter=$LQData{"Filter"}">$Text{"$Data{"Label"}"}</a>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field1_Sortable -->
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field1_NotSortable -->
#                        <span>$Text{"$Data{"Label"}"}</span>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field1_NotSortable -->
#                    </th>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field1 -->
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2 -->
#                    <th class="DynamicField Last $QData{"CSS"}">
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_Sortable -->
#                        <a name="OverviewControl" href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=DynamicField_$LQData{"DynamicFieldName"};OrderBy=$LQData{"OrderBy"}">$Text{"$Data{"Label"}"}</a>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_Sortable -->
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_NotSortable -->
#                        <span>$Text{"$Data{"Label"}"}</span>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2_NotSortable -->
#                    </th>
#<!-- dtl:block:OverviewNavBarPageDynamicField_Field2 -->
                    <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 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">$Text{"$Data{"State"}"}</td>
<!-- dtl:block:RecordOwner -->
                    <td class="Owner">$QData{"UserFirstname","15"} $QData{"UserLastname","15"}</td>
<!-- dtl:block:RecordOwner -->
<!-- dtl:block:RecordQueue -->
                    <td class="Queue" title="$Data{"Queue"}">$QData{"Queue","20"}</td>
<!-- dtl:block:RecordQueue -->
<!-- dtl:block:RecordDynamicField -->
                    <td>
                        <div title="$QData{"Title"}">
<!-- dtl:block:RecordDynamicFieldLink -->
                            <a href="$Data{"Link"}" class="DynamicFieldLink">$Data{"Value"}</a>
<!-- dtl:block:RecordDynamicFieldLink -->
<!-- dtl:block:RecordDynamicFieldPlain -->
                            $Data{"Value"}
<!-- dtl:block:RecordDynamicFieldPlain -->
                        </div>
                    </td>
<!-- dtl:block:RecordDynamicField -->
# example of how to use fixed dynamic field blocks for customizations
# Note: Field1 and Field2 are the names of the fields and had to be replaced with the actual
# field names
#<!-- dtl:block:RecordDynamicField_Field1 -->
#                    <td>
#                        <div title="$QData{"Title"}">
#<!-- dtl:block:RecordDynamicField1Link -->
#                            <a href="$Data{"Link"}" class="DynamicFieldLink">$Data{"Value"}</a>
#<!-- dtl:block:RecordDynamicField1Link -->
#<!-- dtl:block:RecordDynamicField1Plain -->
#                            $Data{"Value"}
#<!-- dtl:block:RecordDynamicField1Plain -->
#                        </div>
#                    </td>
#<!-- dtl:block:RecordDynamicField_Field1 -->
#<!-- dtl:block:RecordDynamicField_Field2 -->
#                    <td>
#                        <div title="$QData{"Title"}">
#<!-- dtl:block:RecordDynamicField1Link -->
#                            <a href="$Data{"Link"}" class="DynamicFieldLink">$Data{"Value"}</a>
#<!-- dtl:block:RecordDynamicField1Link -->
#<!-- dtl:block:RecordDynamicField1Plain -->
#                            $Data{"Value"}
#<!-- dtl:block:RecordDynamicField1Plain -->
#                        </div>
#                    </td>
#<!-- dtl:block:RecordDynamicField_Field2 -->
                    <td class="Age" title="$TimeShort{"$Data{"Created"}"}">$QData{"CustomerAge","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>