crocodic-studio /
crudbooster
| 1 | @push('bottom') |
||
| 2 | <script type="text/javascript"> |
||
| 3 | $(document).ready(function () { |
||
| 4 | var $window = $(window); |
||
| 5 | |||
| 6 | function checkWidth() { |
||
| 7 | var windowsize = $window.width(); |
||
| 8 | if (windowsize > 500) { |
||
| 9 | console.log(windowsize); |
||
| 10 | $('#box-body-table').removeClass('table-responsive'); |
||
| 11 | } else { |
||
| 12 | console.log(windowsize); |
||
| 13 | $('#box-body-table').addClass('table-responsive'); |
||
| 14 | } |
||
| 15 | } |
||
| 16 | |||
| 17 | checkWidth(); |
||
| 18 | $(window).resize(checkWidth); |
||
| 19 | |||
| 20 | $('.selected-action ul li a').click(function () { |
||
| 21 | var name = $(this).data('name'); |
||
| 22 | $('#form-table input[name="button_name"]').val(name); |
||
| 23 | var title = $(this).attr('title'); |
||
| 24 | |||
| 25 | swal({ |
||
| 26 | title: "{{trans("crudbooster.confirmation_title")}}", |
||
| 27 | text: "{{trans("crudbooster.alert_bulk_action_button")}} " + title + " ?", |
||
| 28 | type: "warning", |
||
| 29 | showCancelButton: true, |
||
| 30 | confirmButtonColor: "#008D4C", |
||
| 31 | confirmButtonText: "{{trans('crudbooster.confirmation_yes')}}", |
||
| 32 | closeOnConfirm: false, |
||
| 33 | showLoaderOnConfirm: true |
||
| 34 | }, |
||
| 35 | function () { |
||
| 36 | $('#form-table').submit(); |
||
| 37 | }); |
||
| 38 | |||
| 39 | }) |
||
| 40 | |||
| 41 | $('table tbody tr .button_action a').click(function (e) { |
||
| 42 | e.stopPropagation(); |
||
| 43 | }) |
||
| 44 | }); |
||
| 45 | </script> |
||
| 46 | @endpush |
||
| 47 | |||
| 48 | <form id='form-table' method='post' action='{{CRUDBooster::mainpath("action-selected")}}'> |
||
| 49 | <input type='hidden' name='button_name' value=''/> |
||
| 50 | <input type='hidden' name='_token' value='{{csrf_token()}}'/> |
||
| 51 | <table id='table_dashboard' class="table table-hover table-striped table-bordered"> |
||
| 52 | <thead> |
||
| 53 | <tr class="active"> |
||
| 54 | <?php if($button_bulk_action):?> |
||
| 55 | <th width='3%'><input type='checkbox' id='checkall'/></th> |
||
| 56 | <?php endif;?> |
||
| 57 | <?php if($show_numbering):?> |
||
| 58 | <th width="1%">{{ trans('crudbooster.no') }}</th> |
||
| 59 | <?php endif;?> |
||
| 60 | <?php |
||
| 61 | foreach ($columns as $col) { |
||
| 62 | if ($col['visible'] === FALSE) continue; |
||
| 63 | |||
| 64 | $sort_column = Request::get('filter_column'); |
||
| 65 | $colname = $col['label']; |
||
| 66 | $name = $col['name']; |
||
| 67 | $field = $col['field_with']; |
||
| 68 | $width = ($col['width']) ?: "auto"; |
||
| 69 | $style = ($col['style']) ?: ""; |
||
| 70 | $mainpath = trim(CRUDBooster::mainpath(), '/').$build_query; |
||
|
0 ignored issues
–
show
|
|||
| 71 | echo "<th width='$width' $style>"; |
||
| 72 | if (isset($sort_column[$field])) { |
||
| 73 | switch ($sort_column[$field]['sorting']) { |
||
| 74 | case 'asc': |
||
| 75 | $url = CRUDBooster::urlFilterColumn($field, 'sorting', 'desc'); |
||
| 76 | echo "<a href='$url' title='Click to sort descending'>$colname <i class='fa fa-sort-desc'></i></a>"; |
||
| 77 | break; |
||
| 78 | case 'desc': |
||
| 79 | $url = CRUDBooster::urlFilterColumn($field, 'sorting', 'asc'); |
||
| 80 | echo "<a href='$url' title='Click to sort ascending'>$colname <i class='fa fa-sort-asc'></i></a>"; |
||
| 81 | break; |
||
| 82 | default: |
||
| 83 | $url = CRUDBooster::urlFilterColumn($field, 'sorting', 'asc'); |
||
| 84 | echo "<a href='$url' title='Click to sort ascending'>$colname <i class='fa fa-sort'></i></a>"; |
||
| 85 | break; |
||
| 86 | } |
||
| 87 | } else { |
||
| 88 | $url = CRUDBooster::urlFilterColumn($field, 'sorting', 'asc'); |
||
| 89 | echo "<a href='$url' title='Click to sort ascending'>$colname <i class='fa fa-sort'></i></a>"; |
||
| 90 | } |
||
| 91 | |||
| 92 | echo "</th>"; |
||
| 93 | } |
||
| 94 | ?> |
||
| 95 | |||
| 96 | @if($button_table_action) |
||
| 97 | @if(CRUDBooster::isUpdate() || CRUDBooster::isDelete() || CRUDBooster::isRead()) |
||
| 98 | <th width='{{$button_action_width?:"auto"}}' style="text-align:right">{{trans("crudbooster.action_label")}}</th> |
||
| 99 | @endif |
||
| 100 | @endif |
||
| 101 | </tr> |
||
| 102 | </thead> |
||
| 103 | <tbody> |
||
| 104 | @if(count($result)==0) |
||
| 105 | <tr class='warning'> |
||
| 106 | <?php if($button_bulk_action && $show_numbering):?> |
||
| 107 | <td colspan='{{count($columns)+3}}' align="center"> |
||
| 108 | <?php elseif( ($button_bulk_action && ! $show_numbering) || (! $button_bulk_action && $show_numbering) ):?> |
||
| 109 | <td colspan='{{count($columns)+2}}' align="center"> |
||
| 110 | <?php else:?> |
||
| 111 | <td colspan='{{count($columns)+1}}' align="center"> |
||
| 112 | <?php endif;?> |
||
| 113 | |||
| 114 | <i class='fa fa-search'></i> {{trans("crudbooster.table_data_not_found")}} |
||
| 115 | </td> |
||
| 116 | </tr> |
||
| 117 | @endif |
||
| 118 | |||
| 119 | @foreach($html_contents['html'] as $i=>$hc) |
||
| 120 | |||
| 121 | @if($table_row_color) |
||
| 122 | <?php $tr_color = NULL;?> |
||
| 123 | @foreach($table_row_color as $trc) |
||
| 124 | <?php |
||
| 125 | $query = $trc['condition']; |
||
| 126 | $color = $trc['color']; |
||
| 127 | $row = $html_contents['data'][$i]; |
||
| 128 | foreach ($row as $key => $val) { |
||
| 129 | $query = str_replace("[".$key."]", '"'.$val.'"', $query); |
||
| 130 | } |
||
| 131 | |||
| 132 | @eval("if($query) { |
||
|
0 ignored issues
–
show
|
|||
| 133 | \$tr_color = \$color; |
||
| 134 | }"); |
||
| 135 | ?> |
||
| 136 | @endforeach |
||
| 137 | <?php echo "<tr class='$tr_color'>";?> |
||
| 138 | @else |
||
| 139 | <tr> |
||
| 140 | @endif |
||
| 141 | |||
| 142 | @foreach($hc as $j=>$h) |
||
| 143 | <td {{ $columns[$j]['style'] or ''}}>{!! $h !!}</td> |
||
| 144 | @endforeach |
||
| 145 | </tr> |
||
| 146 | @endforeach |
||
| 147 | </tbody> |
||
| 148 | |||
| 149 | |||
| 150 | <tfoot> |
||
| 151 | <tr> |
||
| 152 | <?php if($button_bulk_action):?> |
||
| 153 | <th> </th> |
||
| 154 | <?php endif;?> |
||
| 155 | |||
| 156 | <?php if($show_numbering):?> |
||
| 157 | <th> </th> |
||
| 158 | <?php endif;?> |
||
| 159 | |||
| 160 | <?php |
||
| 161 | foreach ($columns as $col) { |
||
| 162 | if ($col['visible'] === FALSE) continue; |
||
| 163 | $colname = $col['label']; |
||
| 164 | $width = ($col['width']) ?: "auto"; |
||
| 165 | $style = ($col['style']) ?: ""; |
||
| 166 | echo "<th width='$width' $style>$colname</th>"; |
||
| 167 | } |
||
| 168 | ?> |
||
| 169 | |||
| 170 | @if($button_table_action) |
||
| 171 | @if(CRUDBooster::isUpdate() || CRUDBooster::isDelete() || CRUDBooster::isRead()) |
||
| 172 | <th> -</th> |
||
| 173 | @endif |
||
| 174 | @endif |
||
| 175 | </tr> |
||
| 176 | </tfoot> |
||
| 177 | </table> |
||
| 178 | |||
| 179 | </form><!--END FORM TABLE--> |
||
| 180 | |||
| 181 | <div class="col-md-8">{!! urldecode(str_replace("/?","?",$result->appends(Request::all())->render())) !!}</div> |
||
| 182 | <?php |
||
| 183 | $from = $result->count() ? ($result->perPage() * $result->currentPage() - $result->perPage() + 1) : 0; |
||
| 184 | $to = $result->perPage() * $result->currentPage() - $result->perPage() + $result->count(); |
||
| 185 | $total = $result->total(); |
||
| 186 | ?> |
||
| 187 | <div class="col-md-4" style="margin:30px 0;"><span class="pull-right">{{ trans("crudbooster.filter_rows_total") }} |
||
| 188 | : {{ $from }} {{ trans("crudbooster.filter_rows_to") }} {{ $to }} {{ trans("crudbooster.filter_rows_of") }} {{ $total }}</span></div> |
||
| 189 | |||
| 190 | @if($columns) |
||
| 191 | @push('bottom') |
||
| 192 | <script> |
||
| 193 | $(function () { |
||
| 194 | $('.btn-filter-data').click(function () { |
||
| 195 | $('#filter-data').modal('show'); |
||
| 196 | }) |
||
| 197 | |||
| 198 | $('.btn-export-data').click(function () { |
||
| 199 | $('#export-data').modal('show'); |
||
| 200 | }) |
||
| 201 | |||
| 202 | var toggle_advanced_report_boolean = 1; |
||
| 203 | $(".toggle_advanced_report").click(function () { |
||
| 204 | |||
| 205 | if (toggle_advanced_report_boolean == 1) { |
||
| 206 | $("#advanced_export").slideDown(); |
||
| 207 | $(this).html("<i class='fa fa-minus-square-o'></i> {{trans('crudbooster.export_dialog_show_advanced')}}"); |
||
| 208 | toggle_advanced_report_boolean = 0; |
||
| 209 | } else { |
||
| 210 | $("#advanced_export").slideUp(); |
||
| 211 | $(this).html("<i class='fa fa-plus-square-o'></i> {{trans('crudbooster.export_dialog_show_advanced')}}"); |
||
| 212 | toggle_advanced_report_boolean = 1; |
||
| 213 | } |
||
| 214 | |||
| 215 | }) |
||
| 216 | |||
| 217 | |||
| 218 | $("#table_dashboard .checkbox").click(function () { |
||
| 219 | var is_any_checked = $("#table_dashboard .checkbox:checked").length; |
||
| 220 | if (is_any_checked) { |
||
| 221 | $(".btn-delete-selected").removeClass("disabled"); |
||
| 222 | } else { |
||
| 223 | $(".btn-delete-selected").addClass("disabled"); |
||
| 224 | } |
||
| 225 | }) |
||
| 226 | |||
| 227 | $("#table_dashboard #checkall").click(function () { |
||
| 228 | var is_checked = $(this).is(":checked"); |
||
| 229 | $("#table_dashboard .checkbox").prop("checked", !is_checked).trigger("click"); |
||
| 230 | }) |
||
| 231 | |||
| 232 | $('#btn_advanced_filter').click(function () { |
||
| 233 | $('#advanced_filter_modal').modal('show'); |
||
| 234 | }) |
||
| 235 | |||
| 236 | $(".filter-combo").change(function () { |
||
| 237 | var n = $(this).val(); |
||
| 238 | var p = $(this).parents('.row-filter-combo'); |
||
| 239 | var type_data = $(this).attr('data-type'); |
||
| 240 | var filter_value = p.find('.filter-value'); |
||
| 241 | |||
| 242 | p.find('.between-group').hide(); |
||
| 243 | p.find('.between-group').find('input').prop('disabled', true); |
||
| 244 | filter_value.val('').show().focus(); |
||
| 245 | switch (n) { |
||
| 246 | default: |
||
| 247 | filter_value.removeAttr('placeholder').val('').prop('disabled', true); |
||
| 248 | p.find('.between-group').find('input').prop('disabled', true); |
||
| 249 | break; |
||
| 250 | case 'like': |
||
| 251 | case 'not like': |
||
| 252 | filter_value.attr('placeholder', '{{trans("crudbooster.filter_eg")}} : {{trans("crudbooster.filter_lorem_ipsum")}}').prop('disabled', false); |
||
| 253 | break; |
||
| 254 | case 'asc': |
||
| 255 | filter_value.prop('disabled', true).attr('placeholder', '{{trans("crudbooster.filter_sort_ascending")}}'); |
||
| 256 | break; |
||
| 257 | case 'desc': |
||
| 258 | filter_value.prop('disabled', true).attr('placeholder', '{{trans("crudbooster.filter_sort_descending")}}'); |
||
| 259 | break; |
||
| 260 | case '=': |
||
| 261 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : {{trans("crudbooster.filter_lorem_ipsum")}}'); |
||
| 262 | break; |
||
| 263 | case '>=': |
||
| 264 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : 1000'); |
||
| 265 | break; |
||
| 266 | case '<=': |
||
| 267 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : 1000'); |
||
| 268 | break; |
||
| 269 | case '>': |
||
| 270 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : 1000'); |
||
| 271 | break; |
||
| 272 | case '<': |
||
| 273 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : 1000'); |
||
| 274 | break; |
||
| 275 | case '!=': |
||
| 276 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : {{trans("crudbooster.filter_lorem_ipsum")}}'); |
||
| 277 | break; |
||
| 278 | case 'in': |
||
| 279 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : {{trans("crudbooster.filter_lorem_ipsum_dolor_sit")}}'); |
||
| 280 | break; |
||
| 281 | case 'not in': |
||
| 282 | filter_value.prop('disabled', false).attr('placeholder', '{{trans("crudbooster.filter_eg")}} : {{trans("crudbooster.filter_lorem_ipsum_dolor_sit")}}'); |
||
| 283 | break; |
||
| 284 | case 'between': |
||
| 285 | filter_value.val('').hide(); |
||
| 286 | p.find('.between-group input').prop('disabled', false); |
||
| 287 | p.find('.between-group').show().focus(); |
||
| 288 | p.find('.filter-value-between').prop('disabled', false); |
||
| 289 | break; |
||
| 290 | } |
||
| 291 | }) |
||
| 292 | |||
| 293 | /* Remove disabled when reload page and input value is filled */ |
||
| 294 | $(".filter-value").each(function () { |
||
| 295 | var v = $(this).val(); |
||
| 296 | if (v != '') $(this).prop('disabled', false); |
||
| 297 | }) |
||
| 298 | |||
| 299 | }) |
||
| 300 | </script> |
||
| 301 | |||
| 302 | <!-- MODAL FOR SORTING DATA--> |
||
| 303 | <div class="modal fade" tabindex="-1" role="dialog" id='advanced_filter_modal'> |
||
| 304 | <div class="modal-dialog modal-lg"> |
||
| 305 | <div class="modal-content"> |
||
| 306 | <div class="modal-header"> |
||
| 307 | <button class="close" aria-label="Close" type="button" data-dismiss="modal"> |
||
| 308 | <span aria-hidden="true">×</span></button> |
||
| 309 | <h4 class="modal-title"><i class='fa fa-filter'></i> {{trans("crudbooster.filter_dialog_title")}}</h4> |
||
| 310 | </div> |
||
| 311 | <form method='get' action=''> |
||
| 312 | <div class="modal-body"> |
||
| 313 | <?php foreach($columns as $key => $col):?> |
||
| 314 | <?php if (isset($col['image']) || isset($col['download']) || $col['visible'] === FALSE) continue;?> |
||
| 315 | |||
| 316 | <div class='form-group'> |
||
| 317 | |||
| 318 | <div class='row-filter-combo row'> |
||
| 319 | |||
| 320 | <div class="col-sm-2"> |
||
| 321 | <strong>{{$col['label']}}</strong> |
||
| 322 | </div> |
||
| 323 | |||
| 324 | <div class='col-sm-3'> |
||
| 325 | <select name='filter_column[{{$col["field_with"]}}][type]' data-type='{{$col["type_data"]}}' |
||
| 326 | class="filter-combo form-control"> |
||
| 327 | <option value=''>** {{trans("crudbooster.filter_select_operator_type")}}</option> |
||
| 328 | @if(in_array($col['type_data'],['string','varchar','text','char'])) |
||
| 329 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'like')?"selected":"" }} value='like'>{{trans("crudbooster.filter_like")}}</option> @endif |
||
| 330 | @if(in_array($col['type_data'],['string','varchar','text','char'])) |
||
| 331 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'not like')?"selected":"" }} value='not like'>{{trans("crudbooster.filter_not_like")}}</option>@endif |
||
| 332 | |||
| 333 | <option typeallow='all' |
||
| 334 | {{ (CRUDBooster::getTypeFilter($col["field_with"]) == '=')?"selected":"" }} value='='>{{trans("crudbooster.filter_equal_to")}}</option> |
||
| 335 | @if(in_array($col['type_data'],['int','integer','smallint','tinyint','mediumint','bigint','double','float','decimal','time'])) |
||
| 336 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == '>=')?"selected":"" }} value='>='>{{trans("crudbooster.filter_greater_than_or_equal")}}</option>@endif |
||
| 337 | @if(in_array($col['type_data'],['int','integer','smallint','tinyint','mediumint','bigint','double','float','decimal','time'])) |
||
| 338 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == '<=')?"selected":"" }} value='<='>{{trans("crudbooster.filter_less_than_or_equal")}}</option>@endif |
||
| 339 | @if(in_array($col['type_data'],['int','integer','smallint','tinyint','mediumint','bigint','double','float','decimal','time'])) |
||
| 340 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == '<')?"selected":"" }} value='<'>{{trans("crudbooster.filter_less_than")}}</option>@endif |
||
| 341 | @if(in_array($col['type_data'],['int','integer','smallint','tinyint','mediumint','bigint','double','float','decimal','time'])) |
||
| 342 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == '>')?"selected":"" }} value='>'>{{trans("crudbooster.filter_greater_than")}}</option>@endif |
||
| 343 | <option typeallow='all' |
||
| 344 | {{ (CRUDBooster::getTypeFilter($col["field_with"]) == '!=')?"selected":"" }} value='!='>{{trans("crudbooster.filter_not_equal_to")}}</option> |
||
| 345 | <option typeallow='all' |
||
| 346 | {{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'in')?"selected":"" }} value='in'>{{trans("crudbooster.filter_in")}}</option> |
||
| 347 | <option typeallow='all' |
||
| 348 | {{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'not in')?"selected":"" }} value='not in'>{{trans("crudbooster.filter_not_in")}}</option> |
||
| 349 | @if(in_array($col['type_data'],['date','time','datetime','int','integer','smallint','tinyint','mediumint','bigint','double','float','decimal','timestamp'])) |
||
| 350 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'between')?"selected":"" }} value='between'>{{trans("crudbooster.filter_between")}}</option>@endif |
||
| 351 | <option {{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'empty')?"selected":"" }} value='empty'>Empty ( or |
||
| 352 | Null) |
||
| 353 | </option> |
||
| 354 | </select> |
||
| 355 | </div><!--END COL_SM_4--> |
||
| 356 | |||
| 357 | |||
| 358 | <div class='col-sm-5'> |
||
| 359 | <input type='text' class='filter-value form-control' |
||
| 360 | style="{{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'between')?"display:none":"display:block"}}" |
||
| 361 | disabled name='filter_column[{{$col["field_with"]}}][value]' |
||
| 362 | value='{{ (!is_array(CRUDBooster::getValueFilter($col["field_with"])))?CRUDBooster::getValueFilter($col["field_with"]):"" }}'> |
||
| 363 | |||
| 364 | <div class='row between-group' |
||
| 365 | style="{{ (CRUDBooster::getTypeFilter($col["field_with"]) == 'between')?"display:block":"display:none" }}"> |
||
| 366 | <div class='col-sm-6'> |
||
| 367 | <div class='input-group {{ ($col["type_data"] == "time")?"bootstrap-timepicker":"" }}'> |
||
| 368 | <span class="input-group-addon">{{trans("crudbooster.filter_from")}}:</span> |
||
| 369 | <input |
||
| 370 | {{ (CRUDBooster::getTypeFilter($col["field_with"]) != 'between')?"disabled":"" }} |
||
| 371 | type='text' |
||
| 372 | class='filter-value-between form-control {{ (in_array($col["type_data"],["date","datetime","timestamp"]))?"datepicker":(in_array($col["type_data"],["time"]))?"timepicker":"" }}' |
||
| 373 | {{ (in_array($col["type_data"],["date","datetime","timestamp","time"]))?"readonly":"" }} placeholder='{{$col["label"]}} {{trans("crudbooster.filter_from")}}' |
||
| 374 | name='filter_column[{{$col["field_with"]}}][value][]' value='<?php |
||
| 375 | $value = CRUDBooster::getValueFilter($col["field_with"]); |
||
| 376 | echo (CRUDBooster::getTypeFilter($col["field_with"]) == 'between') ? $value[0] : ""; |
||
| 377 | ?>'> |
||
| 378 | </div> |
||
| 379 | </div> |
||
| 380 | <div class='col-sm-6'> |
||
| 381 | <div class='input-group {{ ($col["type_data"] == "time")?"bootstrap-timepicker":"" }}'> |
||
| 382 | <span class="input-group-addon">{{trans("crudbooster.filter_to")}}:</span> |
||
| 383 | <input |
||
| 384 | {{ (CRUDBooster::getTypeFilter($col["field_with"]) != 'between')?"disabled":"" }} |
||
| 385 | type='text' |
||
| 386 | class='filter-value-between form-control {{ (in_array($col["type_data"],["date","datetime","timestamp"]))?"datepicker":(in_array($col["type_data"],["time"]))?"timepicker":"" }}' |
||
| 387 | {{ (in_array($col["type_data"],["date","datetime","timestamp","time"]))?"readonly":"" }} placeholder='{{$col["label"]}} {{trans("crudbooster.filter_to")}}' |
||
| 388 | name='filter_column[{{$col["field_with"]}}][value][]' value='<?php |
||
| 389 | $value = CRUDBooster::getValueFilter($col["field_with"]); |
||
| 390 | echo (CRUDBooster::getTypeFilter($col["field_with"]) == 'between') ? $value[1] : ""; |
||
| 391 | ?>'> |
||
| 392 | </div> |
||
| 393 | </div> |
||
| 394 | </div> |
||
| 395 | </div><!--END COL_SM_6--> |
||
| 396 | |||
| 397 | |||
| 398 | <div class='col-sm-2'> |
||
| 399 | <select class='form-control' name='filter_column[{{$col["field_with"]}}][sorting]'> |
||
| 400 | <option value=''>** Sorting</option> |
||
| 401 | <option {{ (CRUDBooster::getSortingFilter($col["field_with"]) == 'asc')?"selected":"" }} value='asc'>{{trans("crudbooster.filter_ascending")}}</option> |
||
| 402 | <option {{ (CRUDBooster::getSortingFilter($col["field_with"]) == 'desc')?"selected":"" }} value='desc'>{{trans("crudbooster.filter_descending")}}</option> |
||
| 403 | </select> |
||
| 404 | </div><!--END_COL_SM_2--> |
||
| 405 | |||
| 406 | </div> |
||
| 407 | |||
| 408 | </div> |
||
| 409 | <?php endforeach;?> |
||
| 410 | |||
| 411 | </div> |
||
| 412 | <div class="modal-footer" align="right"> |
||
| 413 | <button class="btn btn-default" type="button" data-dismiss="modal">{{trans("crudbooster.button_close")}}</button> |
||
| 414 | <button class="btn btn-default btn-reset" type="reset" |
||
| 415 | onclick='location.href="{{Request::get("lasturl")}}"'>{{trans("crudbooster.button_reset")}}</button> |
||
| 416 | <button class="btn btn-primary btn-submit" type="submit">{{trans("crudbooster.button_submit")}}</button> |
||
| 417 | </div> |
||
| 418 | {!! CRUDBooster::getUrlParameters(['filter_column','lasturl']) !!} |
||
| 419 | <input type="hidden" name="lasturl" value="{{Request::get('lasturl')?:Request::fullUrl()}}"> |
||
| 420 | </form> |
||
| 421 | </div> |
||
| 422 | <!-- /.modal-content --> |
||
| 423 | </div> |
||
| 424 | </div> |
||
| 425 | |||
| 426 | |||
| 427 | <script> |
||
| 428 | $(function () { |
||
| 429 | $('.btn-filter-data').click(function () { |
||
| 430 | $('#filter-data').modal('show'); |
||
| 431 | }) |
||
| 432 | |||
| 433 | $('.btn-export-data').click(function () { |
||
| 434 | $('#export-data').modal('show'); |
||
| 435 | }) |
||
| 436 | |||
| 437 | var toggle_advanced_report_boolean = 1; |
||
| 438 | $(".toggle_advanced_report").click(function () { |
||
| 439 | |||
| 440 | if (toggle_advanced_report_boolean == 1) { |
||
| 441 | $("#advanced_export").slideDown(); |
||
| 442 | $(this).html("<i class='fa fa-minus-square-o'></i> {{trans('crudbooster.export_dialog_show_advanced')}}"); |
||
| 443 | toggle_advanced_report_boolean = 0; |
||
| 444 | } else { |
||
| 445 | $("#advanced_export").slideUp(); |
||
| 446 | $(this).html("<i class='fa fa-plus-square-o'></i> {{trans('crudbooster.export_dialog_show_advanced')}}"); |
||
| 447 | toggle_advanced_report_boolean = 1; |
||
| 448 | } |
||
| 449 | |||
| 450 | }) |
||
| 451 | }) |
||
| 452 | </script> |
||
| 453 | |||
| 454 | <!-- MODAL FOR EXPORT DATA--> |
||
| 455 | <div class="modal fade" tabindex="-1" role="dialog" id='export-data'> |
||
| 456 | <div class="modal-dialog"> |
||
| 457 | <div class="modal-content"> |
||
| 458 | <div class="modal-header"> |
||
| 459 | <button class="close" aria-label="Close" type="button" data-dismiss="modal"> |
||
| 460 | <span aria-hidden="true">×</span></button> |
||
| 461 | <h4 class="modal-title"><i class='fa fa-download'></i> {{trans("crudbooster.export_dialog_title")}}</h4> |
||
| 462 | </div> |
||
| 463 | |||
| 464 | <form method='post' target="_blank" action='{{ CRUDBooster::mainpath("export-data?t=".time()) }}'> |
||
| 465 | <input type="hidden" name="_token" value="{{ csrf_token() }}"> |
||
| 466 | {!! CRUDBooster::getUrlParameters() !!} |
||
| 467 | <div class="modal-body"> |
||
| 468 | <div class="form-group"> |
||
| 469 | <label>{{trans("crudbooster.export_dialog_filename")}}</label> |
||
| 470 | <input type='text' name='filename' class='form-control' required value='Report {{ $module_name }} - {{date("d M Y")}}'/> |
||
| 471 | <div class='help-block'> |
||
| 472 | {{trans("crudbooster.export_dialog_help_filename")}} |
||
| 473 | </div> |
||
| 474 | </div> |
||
| 475 | |||
| 476 | <div class="form-group"> |
||
| 477 | <label>{{trans("crudbooster.export_dialog_maxdata")}}</label> |
||
| 478 | <input type='number' name='limit' class='form-control' required value='100' max="100000" min="1"/> |
||
| 479 | <div class='help-block'>{{trans("crudbooster.export_dialog_help_maxdata")}}</div> |
||
| 480 | </div> |
||
| 481 | |||
| 482 | <div class='form-group'> |
||
| 483 | <label>{{trans("crudbooster.export_dialog_columns")}}</label><br/> |
||
| 484 | @foreach($columns as $col) |
||
| 485 | <div class='checkbox inline'><label><input type='checkbox' checked name='columns[]' |
||
| 486 | value='{{$col["name"]}}'>{{$col["label"]}}</label></div> |
||
| 487 | @endforeach |
||
| 488 | </div> |
||
| 489 | |||
| 490 | <div class="form-group"> |
||
| 491 | <label>{{trans("crudbooster.export_dialog_format_export")}}</label> |
||
| 492 | <select name='fileformat' class='form-control'> |
||
| 493 | <option value='pdf'>PDF</option> |
||
| 494 | <option value='xls'>Microsoft Excel (xls)</option> |
||
| 495 | <option value='csv'>CSV</option> |
||
| 496 | </select> |
||
| 497 | </div> |
||
| 498 | |||
| 499 | <p><a href='javascript:void(0)' class='toggle_advanced_report'><i |
||
| 500 | class='fa fa-plus-square-o'></i> {{trans("crudbooster.export_dialog_show_advanced")}}</a></p> |
||
| 501 | |||
| 502 | <div id='advanced_export' style='display: none'> |
||
| 503 | |||
| 504 | |||
| 505 | <div class="form-group"> |
||
| 506 | <label>{{trans("crudbooster.export_dialog_page_size")}}</label> |
||
| 507 | <select class='form-control' name='page_size'> |
||
| 508 | <option <?=($setting->default_paper_size == 'Letter') ? "selected" : ""?> value='Letter'>Letter</option> |
||
| 509 | <option <?=($setting->default_paper_size == 'Legal') ? "selected" : ""?> value='Legal'>Legal</option> |
||
| 510 | <option <?=($setting->default_paper_size == 'Ledger') ? "selected" : ""?> value='Ledger'>Ledger</option> |
||
| 511 | <?php for($i = 0;$i <= 8;$i++): |
||
| 512 | $select = ($setting->default_paper_size == 'A'.$i) ? "selected" : ""; |
||
| 513 | ?> |
||
| 514 | <option <?=$select?> value='A{{$i}}'>A{{$i}}</option> |
||
| 515 | <?php endfor;?> |
||
| 516 | |||
| 517 | <?php for($i = 0;$i <= 10;$i++): |
||
| 518 | $select = ($setting->default_paper_size == 'B'.$i) ? "selected" : ""; |
||
| 519 | ?> |
||
| 520 | <option <?=$select?> value='B{{$i}}'>B{{$i}}</option> |
||
| 521 | <?php endfor;?> |
||
| 522 | </select> |
||
| 523 | <div class='help-block'><input type='checkbox' name='default_paper_size' |
||
| 524 | value='1'/> {{trans("crudbooster.export_dialog_set_default")}}</div> |
||
| 525 | </div> |
||
| 526 | |||
| 527 | <div class="form-group"> |
||
| 528 | <label>{{trans("crudbooster.export_dialog_page_orientation")}}</label> |
||
| 529 | <select class='form-control' name='page_orientation'> |
||
| 530 | <option value='potrait'>Potrait</option> |
||
| 531 | <option value='landscape'>Landscape</option> |
||
| 532 | </select> |
||
| 533 | </div> |
||
| 534 | </div> |
||
| 535 | |||
| 536 | </div> |
||
| 537 | <div class="modal-footer" align="right"> |
||
| 538 | <button class="btn btn-default" type="button" data-dismiss="modal">{{trans("crudbooster.button_close")}}</button> |
||
| 539 | <button class="btn btn-primary btn-submit" type="submit">{{trans('crudbooster.button_submit')}}</button> |
||
| 540 | </div> |
||
| 541 | </form> |
||
| 542 | </div> |
||
| 543 | <!-- /.modal-content --> |
||
| 544 | </div> |
||
| 545 | </div> |
||
| 546 | @endpush |
||
| 547 | @endif |
||
| 548 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths