supportticketslist.tpl 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {*
  2. **********************************************************
  3. * Developed by: Team Theme Metro
  4. * Website: http://www.thememetro.com
  5. **********************************************************
  6. *}
  7. {if $tickets}
  8. {include file="$template/includes/tablelist.tpl" tableName="TicketsList" filterColumn="2"}
  9. <script>
  10. jQuery(document).ready( function () {
  11. var table = jQuery('#tableTicketsList').show().DataTable();
  12. {if $orderby == 'did' || $orderby == 'dept'}
  13. table.order(0, '{$sort}');
  14. {elseif $orderby == 'subject' || $orderby == 'title'}
  15. table.order(1, '{$sort}');
  16. {elseif $orderby == 'status'}
  17. table.order(2, '{$sort}');
  18. {elseif $orderby == 'lastreply'}
  19. table.order(3, '{$sort}');
  20. {/if}
  21. table.draw();
  22. jQuery('#tableLoading').hide();
  23. });
  24. </script>
  25. <div class="table-container clearfix">
  26. <div class="table-header">
  27. <label>{lang key='view'}</label>
  28. <div class="dropdown view-filter-btns">
  29. <button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  30. <span>{lang key='domainRenewal.showAll'}</span>
  31. </button>
  32. <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuButton">
  33. <li><a href="#" class="dropdown-item"><span data-value="all">{lang key='domainRenewal.showAll'}</span></a></li>
  34. {foreach key=status item=count from=$tickets|@array_column:'status'|@array_count_values}
  35. <li><a href="#" class="dropdown-item"><span data-value="{$status|strip_tags|substr:1:-1}">{$status|strip_tags|substr:1:-1}</span></a></li>
  36. {/foreach}
  37. </ul>
  38. </div>
  39. </div>
  40. <table id="tableTicketsList" class="datatable table table-hover w-hidden">
  41. <thead>
  42. <tr>
  43. <th data-hide="phone,tablet">{$LANG.supportticketsdepartment}</th>
  44. <th data-class="expand">{$LANG.supportticketssubject}</th>
  45. <th>{$LANG.supportticketsstatus}</th>
  46. <th data-hide="phone,tablet">{$LANG.supportticketsticketlastupdated}</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. {foreach from=$tickets item=ticket}
  51. <tr onclick="window.location='viewticket.php?tid={$ticket.tid}&amp;c={$ticket.c}'">
  52. <td>{$ticket.department}</td>
  53. <td><a href="viewticket.php?tid={$ticket.tid}&amp;c={$ticket.c}">{if $ticket.unread}<strong>{/if}#{$ticket.tid} - {$ticket.subject}{if $ticket.unread}</strong>{/if}</a></td>
  54. <td><span class="label status {if is_null($ticket.statusColor)}status-{$ticket.statusClass}"{else}status-custom" style="border-color: {$ticket.statusColor}; color: {$ticket.statusColor}"{/if}>{$ticket.status|strip_tags|substr:1:-1}</span></td>
  55. <td><span class="w-hidden">{$ticket.normalisedLastReply}</span>{$ticket.lastreply}</td>
  56. </tr>
  57. {/foreach}
  58. </tbody>
  59. </table>
  60. <div class="text-center" id="tableLoading">
  61. <p><i class="fas fa-spinner fa-spin"></i> {$LANG.loading}</p>
  62. </div>
  63. </div>
  64. {else}
  65. <div class="alert-lg no-data">
  66. <div class="icon">
  67. <i class="fas fa-exclamation-triangle"></i>
  68. </div>
  69. <div class="text">
  70. {$LANG.supportticketsnoneopen}
  71. </div>
  72. <a class="btn btn-primary" href="{$WEB_ROOT}/submitticket.php">
  73. {$LANG.supportticketssubmitticket}
  74. </a>
  75. </div>
  76. {/if}