clientareaquotes.tpl 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {*
  2. **********************************************************
  3. * Developed by: Team Theme Metro
  4. * Website: http://www.thememetro.com
  5. **********************************************************
  6. *}
  7. {if $quotes}
  8. {include file="$template/includes/tablelist.tpl" tableName="QuotesList" noSortColumns="5, 6" filterColumn="4"}
  9. <script>
  10. jQuery(document).ready( function () {
  11. var table = jQuery('#tableQuotesList').show().DataTable();
  12. {if $orderby == 'id'}
  13. table.order(0, '{$sort}');
  14. {elseif $orderby == 'date'}
  15. table.order(2, '{$sort}');
  16. {elseif $orderby == 'validuntil'}
  17. table.order(3, '{$sort}');
  18. {elseif $orderby == 'stage'}
  19. table.order(4, '{$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">
  33. <li><a href="#" class="dropdown-item"><span data-value="all">{lang key='domainRenewal.showAll'}</span></a></li>
  34. {foreach key=stage item=count from=$quotes|@array_column:'stage'|@array_count_values}
  35. <li><a href="#" class="dropdown-item"><span data-value="{$stage}">{$stage}</span></a></li>
  36. {/foreach}
  37. </ul>
  38. </div>
  39. </div>
  40. <table id="tableQuotesList" class="datatable table table-hover w-hidden">
  41. <thead>
  42. <tr>
  43. <th data-class="expand">{$LANG.quotesubject}</th>
  44. <th>{$LANG.quotenumber}</th>
  45. <th data-hide="phone,tablet">{$LANG.quotedatecreated}</th>
  46. <th data-hide="phone,tablet">{$LANG.quotevaliduntil}</th>
  47. <th data-hide="phone">{$LANG.quotestage}</th>
  48. <th>&nbsp;</th>
  49. <th class="col-small center"></th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. {foreach $quotes as $quote}
  54. <tr onclick="clickableSafeRedirect(event, 'viewquote.php?id={$quote.id}', false)">
  55. <td>{$quote.subject}</td>
  56. <td>{$quote.id}</td>
  57. <td><span class="w-hidden">{$quote.normalisedDateCreated}</span>{$quote.datecreated}</td>
  58. <td><span class="w-hidden">{$quote.normalisedValidUntil}</span>{$quote.validuntil}</td>
  59. <td><span class="label status status-{$quote.stageClass}">{$quote.stage}</span></td>
  60. <td class="text-center">
  61. <form method="submit" action="dl.php">
  62. <input type="hidden" name="type" value="q" />
  63. <input type="hidden" name="id" value="{$quote.id}" />
  64. <button type="submit" class="btn btn-primary btn-xs">
  65. <span class="d-none d-sm-block"><i class="fas fa-download"></i> {$LANG.quotedownload}</span>
  66. <span class="d-block d-sm-none"><i class="fas fa-download icon-only"></i></span>
  67. </button>
  68. </form>
  69. </td>
  70. <td class="col-small center">
  71. <div class="action-buttons">
  72. <a href="viewquote.php?id={$quote.id}" data-toggle="tooltip" title="{$LANG.quoteview}">
  73. <i class="fal fa-search-plus"></i>
  74. </a>
  75. </div>
  76. </td>
  77. </tr>
  78. {/foreach}
  79. </tbody>
  80. </table>
  81. <div class="text-center" id="tableLoading">
  82. <p><i class="fas fa-spinner fa-spin"></i> {$LANG.loading}</p>
  83. </div>
  84. </div>
  85. {else}
  86. <div class="alert-lg no-data">
  87. <div class="icon">
  88. <i class="fas fa-exclamation-triangle"></i>
  89. </div>
  90. <div class="text">
  91. {$LANG.noquotes}
  92. </div>
  93. <a class="btn btn-primary" href="{$WEB_ROOT}/submitticket.php">
  94. {$LANG.opennewticket}
  95. </a>
  96. </div>
  97. {/if}