# --
# CustomerTicketSearchResultShort.dtl - html for ticket status view (all tickets)
# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id: CustomerTicketSearchResultShort.dtl,v 1.40.2.3 2013-02-13 14:56:02 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.
# --

<div id="MainBox" class="TicketView ARIARoleMain SearchResults $Config{"Ticket::Frontend::CustomerTicketOverviewSortable"} Sortable">
    <div class="ActionRow">
        <ul class="Tabs">
            <li>
                <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=LoadProfile;$Data{"Link"}">
                    &larr; $Text{"Change search options"}
                </a>
            </li>
        </ul>
<!-- dtl:block:Pagination -->
        <div class="Tabs Pagination">
            <strong>$Data{"Result"}</strong> $Text{"of"} <strong>$Data{"TotalHits"}</strong> - $Text{"Page"}: $Data{"SiteNavBar"}
        </div>
<!-- dtl:block:Pagination -->
        <div class="Clear"></div>
        <div class="SearchTerms">
            <h2>$Text{"Search Results for"}:</h2>
<!-- dtl:block:SearchTerms -->
            <span>
                $Text{"$Data{"Attribute"}"}: $QData{"Value"}
# hide remove link, functionality is not yet implemented
#                <a title="$Text{"Remove this Search Term."}" href="$Data{"SearchValue"}">&times;</a>
            </span>
<!-- dtl:block:SearchTerms -->
        </div>
    </div>
    <div class="Content">
        <table class="Overview">
            <thead>
                <tr>
                    <th class="Ticket $Data{"TicketSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Search;SortBy=Ticket;Order=$LQData{"Order"};Filter=$LQData{"Filter"};Limit=$LQData{"Limit"};ShowClosedTickets=$LQData{"ShowClosed"};Type=$LQData{"Type"};Profile=$LQData{"Profile"};TakeLastSearch=1">
                            $Config{"Ticket::Hook"}
                        </a>
                    </th>
                    <th class="Status $Data{"StateSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Search;SortBy=State;Order=$LQData{"Order"};Filter=$LQData{"Filter"};Limit=$LQData{"Limit"};ShowClosedTickets=$LQData{"ShowClosed"};Type=$LQData{"Type"};Profile=$LQData{"Profile"};TakeLastSearch=1">
                            $Text{"State"}
                        </a>
                    </th>
                    <th class="Title">
                        $Text{"Subject"}
                    </th>
                    <th class="Age $Data{"AgeSort"}">
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Search;SortBy=Age;Order=$LQData{"Order"};Filter=$LQData{"Filter"};Limit=$LQData{"Limit"};ShowClosedTickets=$LQData{"ShowClosed"};Type=$LQData{"Type"};Profile=$LQData{"Profile"};TakeLastSearch=1">
                            $Text{"Age"}
                        </a>
                    </th>
<!-- dtl:block:HeaderDynamicField -->
                    <th class="DynamicField $Data{"CSS"}">
<!-- dtl:block:HeaderDynamicFieldSortable -->
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Search;SortBy=DynamicField_$LQData{"DynamicFieldName"};Order=$LQData{"Order"};Filter=$LQData{"Filter"};Limit=$LQData{"Limit"};ShowClosedTickets=$LQData{"ShowClosed"};Type=$LQData{"Type"};Profile=$LQData{"Profile"};TakeLastSearch=1">
                            $Text{"$Data{"Label"}"}
                        </a>
<!-- dtl:block:HeaderDynamicFieldSortable -->
<!-- dtl:block:HeaderDynamicFieldNotSortable -->
                        <span>$Text{"$Data{"Label"}"}</span>
<!-- dtl:block:HeaderDynamicFieldNotSortable -->
                    </th>
<!-- dtl:block:HeaderDynamicField -->
                </tr>
            </thead>
            <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                <tr id="EmptyMessage">
                    <td colspan="4">
                        $Text{"No data found."}
                    </td>
                </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- 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="Status">$Text{"$Data{"State"}"}</td>
                    <td class="Title"><div><h2>$QData{"Subject","60"}</h2>&nbsp;-&nbsp; $QData{"Body","200"}</div></td>
                    <td class="Age" title="$TimeShort{"$Data{"Created"}"}">$QData{"CustomerAge","20"}</td>
<!-- dtl:block:RecordDynamicField -->
                    <td class="DynamicField" title="$QData{"Title"}">$Data{"Value"}</td>
<!-- dtl:block:RecordDynamicField -->
                </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:BottomSubNavigation -->
    <div id="BottomActionRow" class="ActionRow BigButtons">
        <ul class="Tabs">
            <li>
                <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=LoadProfile;$LQData{"Link"}">
                    &larr; $Text{"Change search options"}
                </a>
            </li>
        </ul>
        <div class="Tabs Pagination">
            <strong>$Data{"Result"}</strong> $Text{"of"} <strong>$Data{"TotalHits"}</strong> - $Text{"Page"}: $Data{"SiteNavBar"}
        </div>
        <div class="Clear"></div>
    </div>
<!-- dtl:block:BottomSubNavigation -->
</div>
#<!-- dtl:block:Record -->
#                <dtl if ($Env{"Color"} eq "") { $Env{"Color"} = "searchpassive"; }>
#                <tr valign="top">
#                    <td class="$Env{"Color"}">
#                        <a href="$Env{"Baselink"}Action=CustomerTicketZoom;TicketNumber=$LQData{"TicketNumber"};ArticleID=$LQData{"ArticleID"};QueueID=$LQData{"QueueID"}">
#                            $Data{"TicketNumber"}
#                        </a>
#                    </td>
#                    <td class="$Env{"Color"}">$QData{"Age"}</td>
#                    <td class="$Env{"Color"}">
#                        <div title="$QData{"From"}">$QData{"From","30"}</div>
#                        <div title="$QData{"Subject"}">$QData{"Subject","30"}</div>&nbsp;
#                    </td>
#                    <td class="$Env{"Color"}">
#                        <div title="$Text{"$Data{"State"}"}">$Text{"$Data{"State"}","30"}</div>
#                    </td>
#                    <td class="$Env{"Color"}">
#                        <div title="$QData{"CustomerID"}">$QData{"CustomerID","15"}</div>
#                        <div title="$QData{"CustomerName"}">$QData{"CustomerName","15"}</div>
#                    </td>
#                </tr>
#                <dtl if ($Env{"Color"} eq "searchactive") { $Env{"Color"} = ""; }>
#                <dtl if ($Env{"Color"} eq "searchpassive") { $Env{"Color"} = "searchactive"; }>
#<!-- dtl:block:Record -->
