File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
app/Library/CrudPanel/Traits Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,8 @@ public function enableExportButtons()
354354 }
355355
356356 $ this ->setOperationSetting ('exportButtons ' , true );
357+ $ this ->setOperationSetting ('showTableColumnPicker ' , true );
358+ $ this ->setOperationSetting ('showExportButton ' , true );
357359 }
358360
359361 /**
Original file line number Diff line number Diff line change 99 <script src =" //cdn.datatables.net/buttons/1.5.6/js/buttons.colVis.min.js" type =" text/javascript" ></script >
1010 <script >
1111 window .crud .dataTableConfiguration .buttons = [
12+ @if ($crud -> get (' list.showExportButton' ) )
1213 {
1314 extend: ' collection' ,
1415 text: ' <i class="la la-download"></i> {{ trans (' backpack::crud.export.export' ) } }' ,
9192 }
9293 }
9394 ]
94- },
95- {
95+ }
96+ @endif
97+ @if ($crud -> get (' list.showTableColumnPicker' ) )
98+ ,{
9699 extend: ' colvis' ,
97100 text: ' <i class="la la-eye-slash"></i> {{ trans (' backpack::crud.export.column_visibility' ) } }' ,
98101 columns : function ( idx , data , node ) {
99102 return $ (node).attr (' data-visible-in-table' ) == ' false' && $ (node).attr (' data-can-be-visible-in-table' ) == ' true' ;
100103 },
101104 dropup: true
102105 }
106+ @endif
103107 ];
104108
105109 // move the datatable buttons in the top-right corner and make them smaller
You can’t perform that action at this time.
0 commit comments