TrackManagement.blade.php 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. @extends('admin.master')
  2. @section('content')
  3. <div class="row">
  4. <div class="col-lg-12">
  5. <div class="contentpanel">
  6. <!--<form id="listForm" method="post">-->
  7. <form id='searchForm' action="{{ route('signup.export') }}" method="POST">
  8. @csrf
  9. <!-- 功能按鈕(新增/批量處理等等) -->
  10. <div class="row" style="margin-bottom: 5px;">
  11. <div class="col-lg-12">
  12. <ol class="headermenu">
  13. <li>
  14. <button class="btn btn-darkblue btn-xs" id="create"><strong>新增</strong></button>
  15. </li>
  16. <!--<li>
  17. <button class="btn btn-darkblue btn-xs" id="export"><strong>匯出</strong></button>
  18. </li>-->
  19. </ol>
  20. </div>
  21. </div>
  22. <!-- 搜尋段 -->
  23. <div class="panel panel-default">
  24. <div class="panel-heading _panel-heading" data-bs-toggle="collapse" data-bs-target="#search_content">
  25. <h3 class="panel-title m-0">場次查詢</h3>
  26. </div>
  27. <div id="search_content" class="collapse show">
  28. <div class="panel-body row">
  29. <!-- 關鍵字 -->
  30. <div class="form-group _form-group col-sm-12 col-md-6 col-xl-3">
  31. <label for="keyword">關鍵字(可搜尋欄位:track no, track title)</label>
  32. <input type="text" class="form-control input-sm" id="keyword" name="keyword" maxlength="50">
  33. </div>
  34. <!-- Search -->
  35. <div class="form-group _form-group col-sm-12 col-md-12 col-xl-12">
  36. <a class="btn btn-success btn-sm _fz-12" onclick="javascript: custom_search();">
  37. <div class="_glyphicon _glyphicon-search"></div>
  38. </a>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <hr class="search-hr"/>
  44. <!-- 列表段 -->
  45. <div class="row">
  46. <div class="col-lg-12">
  47. <table id="GridView1" class="table table-striped table-bordered" cellspacing="0"
  48. width="100%">
  49. <thead>
  50. <tr>
  51. <th>序號</th>
  52. <th>場次 no</th>
  53. <th>場次備註(track title)</th>
  54. <th>場次人數上限(track limit)</th>
  55. <th>建立時間</th>
  56. <th>操作</th>
  57. </tr>
  58. </thead>
  59. </table>
  60. </div>
  61. </div>
  62. </form>
  63. <!-- row -->
  64. </div>
  65. </div>
  66. </div>
  67. @endsection
  68. @section('extjs')
  69. <script>
  70. $(document).ready(function () {
  71. var table = $('#GridView1').dataTable({
  72. "scrollX": true,
  73. "processing": true,
  74. "serverSide": true,
  75. "ajax": "track/grid",
  76. "paging": true,
  77. "ordering": true,
  78. "info": true,
  79. "order": [[0, "desc"]],
  80. "stateSave": true,
  81. "pagingType": "full",
  82. "bFilter": true,
  83. "aoColumnDefs": [{
  84. 'bSortable': false,
  85. // 'aTargets': [0] //不想參加排序的欄位,可指定多個,逗號分隔
  86. }]
  87. });
  88. // 從網址參觸發搜尋
  89. // custom_search()
  90. $('#GridView1_filter').hide();
  91. });
  92. //客製化搜尋欄位
  93. function custom_search() {
  94. $('#GridView1').DataTable()
  95. .column(1).search($('#keyword').val())
  96. ;
  97. $('#GridView1').dataTable().fnDraw(true);
  98. }
  99. </script>
  100. @endsection