{block name="rtheader"}
<TR class="lms-ui-header-panel" {tip text="Click on column name to change sorting order"}>
    <TD>
        {icon name="status" tip="Unread"}
    </TD>
    <TD>
        {trans("<!rt>State")}
        <br><a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=priority{if $filter.direction == "asc" && $filter.order == "priority"},desc{/if}">{trans("Priority")}</a> {if $filter.order == "priority"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
    </TD>
    <TD class="nobr">
        <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=ticketid{if $filter.direction == "asc" && $filter.order == "ticketid"},desc{/if}">{trans("ID")}</a>{if $filter.order == "ticketid"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
        {if empty($filter.ids) || count($filter.ids)!=1}
            <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=queue{if $filter.direction == "asc" && $filter.order == "queue"},desc{/if}">/ {trans("Queue")}</a>{if $filter.order == "queue"}<i class="lms-ui-icon-{if $filter.direction == "desc"}descending{else}ascending{/if}"></i>{/if}
        {/if}
        {if !ConfigHelper::checkConfig('rt.hide_ticket_row_create_time')}
            <br><a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=createtime{if $filter.direction == "asc" && $filter.order == "createtime"},desc{/if}"> {trans("Create time")}</a>{if $filter.order == "createtime"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
        {/if}
    </TD>
    <TD class="nobr">
        {icon name="service" label="Service type"}<br>
        {icon name="type" label="<!rtheader>Ticket type"}
    </TD>
    <TD class="nobr">
        {icon name="helpdesk"} <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=subject{if $filter.direction == "asc" && $filter.order == "subject"},desc{/if}">{trans("Subject")}</a> {if $filter.order == "subject"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}<br>
        {icon name="customer"} <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=requestor{if $filter.direction == "asc" && $filter.order == "requestor"},desc{/if}">{trans("Requestor")}</a> {if $filter.order == "requestor"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
    </TD>
    <TD class="ticket-location">
        {icon name="location"} <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=location{if $filter.direction == "asc" && $filter.order == "location"},desc{/if}">{trans("Location")}</a>{if $filter.order == "location"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
    </TD>
    <TD class="nobr text-center ticket-deadline">
        {icon name="deadline"} <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=deadline{if $filter.direction == "asc" && $filter.order == "deadline"},desc{/if}">{trans("<!rtheader>Deadline")}</a>{if $filter.order == "deadline"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
    </TD>
    <TD class="nobr">
        {icon name="user"} <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=owner{if $filter.direction == "asc" && $filter.order == "owner"},desc{/if}">{trans("Owner")}</a>{if $filter.order == "owner"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}<br>
        {icon name="modify"} <a href="?m={$layout.module}{if isset($filter.custid)}&id={$filter.custid}{/if}{if !empty($filter.ids)}&id[]={implode('&id[]=', $filter.ids)}{/if}{if $filter.state == -1}&s=-1{elseif !empty($filter.state) && is_array($filter.state)}&s[]={implode('&s[]=', $filter.state)}{/if}&o=lastmodified{if $filter.direction == "asc" && $filter.order == "lastmodified"},desc{/if}">{trans("Modified")}</a> {if $filter.order == "lastmodified"}<i class="lms-ui-icon-{if $filter.direction == 'desc'}descending{else}ascending{/if}"></i>{/if}
    </TD>
    <TD class="nobr ticket-events">
        {icon name="timetable" label="Events"}
    </TD>
    <TD></TD>
</TR>
{/block}
