<tr class="headings">
    [% if $smarty.const.EDITINTICKETLIST %]
        <th width="16" class="hidden-print" style="padding: 1px 10px;">

        </th>
    [% /if %]
    <th width="16" class="hidden-print text-center" style="padding: 1px 10px; [% if $ColWidth.CheckboxCol %] min-width:[% $ColWidth.CheckboxCol %]px; [% else %] min-width:40px; [% /if %]" id="CheckboxCol"  >
        <input type="checkbox" id="TicketSelection" title="[% $user->gettext('Tickets auswählen') %]" />
    </th>
    [% if $hmcompany == 'VR BANK OBERFRANKEN MITTE EG' %]
        <th id="PriorityCol" class="" style="text-align:center;">
            <div class='col-sm-10'   onclick="
                    [% if $sort == "TicketPrioID" %]
                    document.getElementById('sortorder').value = '[% if $sortorder == "DESC" %]ASC[% else %]DESC[% /if %]'
                    [% else %]
                            document.getElementById('sort').value = 'TicketPrioID'
                    [% /if %];
                            sessionStorage.setItem('update', '1');
                            $('#miniSearchForm').submit();">
                <span>[% $user->gettext('Priorität') %]  [% if $sort == "TicketPrioID" %]
                    <span class="fa fa-chevron-[% if $sortorder == "DESC" %]up[% else %]down[% /if %]"></span>
                [% /if %]</span>

        </div>

    </th>
    [% /if %]
        [% if $smarty.const.SHOW_ICON == 1 %]
            <th id="IconCol" [% if $ColWidth.IconCol %]style="min-width:[% $ColWidth.IconCol %]px;"[% /if %]></th>
            [% /if %]

        [% if $smarty.const.SHOWSUBSTATUS && $user->isInternUser() %]
            <th id="SubStatusCol" [% if $ColWidth.SubStatusCol %]style="min-width:[% $ColWidth.SubStatusCol %]px;"[% /if %]></th>
            [% /if %]
            [% if $user->isInternUser() %]
            <th id="RequestToProfessionalSupporterCol" [% if RequestToProfessionalSupporterCol %]style="min-width:[% $ColWidth.RequestToProfessionalSupporterCol %]px;"[% /if %]></th>
            [% /if %]
        <th [% if $ColWidth.StatusCol %]style="min-width:[% $ColWidth.StatusCol %]px;"[% /if %] class="hidden-print" id="StatusCol" colspan="1" >
            <div class='row'>
                <div class='col-sm-10'   onclick="
                        [% if $sort == "Status" %]
                        document.getElementById('sortorder').value = '[% if $sortorder == "DESC" %]ASC[% else %]DESC[% /if %]'
                        [% else %]
                                document.getElementById('sort').value = 'Status'
                        [% /if %];
                                sessionStorage.setItem('update', '1');
                                $('#miniSearchForm').submit();">
                    <span>[% $user->gettext('Status') %] [% if $sort == "Status" %]
                        <span class="fa fa-chevron-[% if $sortorder == "DESC" %]down[% else %]up[% /if %]"></span>
                        [% /if %]</span>

                    </div>
                    <div class='col-sm-2'>
                    </div>
                </div>

            </th>

            <th [% if $ColWidth.MasterCol %]style="min-width:[% $ColWidth.MasterCol %]px;"[% else %]width="55"[% /if %] id="MasterCol" class="hidden-print">
                <div class='row'>
                    <div class='col-sm-10'   onclick="
                            [% if $sort == "Master" %]
                            document.getElementById('sortorder').value = '[% if $sortorder == "DESC" %]ASC[% else %]DESC[% /if %]'
                            [% else %]
                                    document.getElementById('sort').value = 'Master'
                            [% /if %];
                                    sessionStorage.setItem('update', '1');
                                    $('#miniSearchForm').submit();">
                        <span>[% $user->gettext('Master') %]
                            [% if $sort == "Master" %]
                                <span class="fa fa-chevron-[% if $sortorder == "DESC" %]down[% else %]up[% /if %]"></span>
                            [% /if %]
                        </span>

                    </div>
                    <div class='col-sm-2'>
                    </div>
                </div>

            </th>

[% if $Tools->FCS_Count($sortedCols) >= 1 %]
    [% foreach from=$sortedCols key=ListItem item=ListItem2 %]
        [% if $ListItem2.type== 'listview' %]
            [% if ($ListItem == 'Category2' && $user->hasRight(51)) || ($ListItem == 'Expense' && !$user->hasRight(524)) || ($ListItem == 'DesireDate' && !$user->hasRight(521)) || ($ListItem == 'Priority' &&  (!$user->hasRight(522) || ($hmcompany == "HOLIDAY AUTOS" ))) %]
            [% else %]
                <th class="TicketlistHeader dragaccept" title="[% $user->gettext('Strl+Klick, um Spalten an zu ordnen') %]"  id="[% $ListItem %]" [% if $ColWidth.$ListItem %]style="min-width:[% $ColWidth.$ListItem %]px;"[% /if %] colspan="2" >
                    <div class='row'>
                        <div class='col-sm-10 HeaderTitle'  >
                            <span class="">[% $user->gettext($ListItem2.name) %][% if $sort == "$ListItem" %]
                                <span class="fa fa-chevron-[% if $sortorder == "DESC" %]down[% else %]up[% /if %]" aria-hidden="true" title="" onclick="sort(1, '[% $ListItem %]', [% if $sortorder == "ASC" %]DESC[% else %]ASC[% /if %]);"></span>
                            [% /if %]
                            [% if $sort2 == "$ListItem" && $sort2 != "$ListItem" %]
                                <span class="fa fa-chevron-[% if $sortorder2 == "DESC" %]down[% else %]up[% /if %]" aria-hidden="true" title="" onclick="sort(2, '[% $ListItem %]', [% if $sortorder == "ASC" %]DESC[% else %]ASC[% /if %]);"></span>
                            [% /if %]</span>


                    </div>
                    <div class='col-sm-2'>
                    </div>
                </div>

            </th>
            [% /if %]
        [% /if %]
        [% if $ListItem2.type== 'typeCol' %]
                [% assign var="SelectesFieldID" value="$ListItem" %]
                <th class="TicketlistHeader dragaccept" id="[% $ListItem %]" title="[% $user->gettext('Spalten von Tickettyp') %]" style="[% if $ColWidth.SelectesFieldID %]min-width:[% $ColWidth.$SelectesFieldID %]px;[% /if %] white-space: normal !important; word-wrap: break-word;">
                    <div class='row'>
                        <div class='col-sm-10 HeaderTitle' >
                            <span class="">[% $ListItem2.name %]
                            [% if $sort == $ListItem %]
                                <span class="fa fa-chevron-[% if $sortorder == "DESC" %]down[% else %]up[% /if %]"></span>
                            [% /if %]
                            </span>
                        </div>
                        <div class='col-sm-2'></div>
                    </div>

                </th>
        [% /if %]

        [% if $ListItem2.type == 'typeDefCol' %]
            [% assign var="SelectesFieldID" value="$ListItem" %]
            <th class= "TicketlistHeader dragaccept" id="[% $ListItem %]" title="[% $user->gettext('Spalten von Tickettyp') %]" style="[% if $ColWidth.SelectesFieldID %]min-width:[% $ColWidth.$SelectesFieldID %]px;[% /if %] white-space: normal !important; word-wrap: break-word;">
                <div class='row'>
                    <div class='col-sm-10 HeaderTitle' >
                        <span class="">[% $ListItem2.name %]
                        [% if $sort == $ListItem %]
                            <span class="fa fa-chevron-[% if $sortorder == "DESC" %]down[% else %]up[% /if %]"></span>
                        [% /if %]
                        </span>
                    </div>
                    <div class='col-sm-2'></div>
                </div>
            </th>
        [% /if %]
    [% /foreach %]
[% /if %]
                                      

</tr>
