File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 11<script type =" text/javascript" >
22function DatagridBuilder () {};
33
4- DatagridBuilder .commands = function (value , row , index ) {
4+ DatagridBuilder .actions = function (value , row , index ) {
55 return ' <div class="btn-toolbar">\
6- <a href="/view/' + row .id + ' " class="btn btn-xs btn-default"><span class="fa fa-eye"></span></a>\
7- <a href="/edit/' + row .id + ' " class="btn btn-xs btn-warning"><span class="fa fa-pencil"></span></a>\
8- <a href="/delete/' + row .id + ' " class="btn btn-xs btn-danger"><span class="fa fa-trash-o"></span></a>\
9- </div>' ;
6+ @if (isset ($data [' formatters.actions.view' ]) )
7+ <a href="{!! $data [' formatters.actions.view' ] ! !} " class="btn btn-xs btn-default"><span class="fa fa-eye"></span></a>\
8+ @endif
9+ @if (isset ($data [' formatters.actions.edit' ]) )
10+ <a href="{!! $data [' formatters.actions.edit' ] ! !} " class="btn btn-xs btn-warning"><span class="fa fa-pencil"></span></a>\
11+ @endif
12+ @if (isset ($data [' formatters.actions.delete' ]) )
13+ <a href="{!! $data [' formatters.actions.delete' ] ! !} " class="btn btn-xs btn-danger"><span class="fa fa-trash-o"></span></a>\
14+ @endif
15+ </div>' ;
1016}
1117
1218DatagridBuilder .replaceSpecialChars = function (value ) {
@@ -31,4 +37,4 @@ function pad(number) {
3137 ' :' + pad (d .getSeconds ());
3238}
3339
34- </script >
40+ </script >
You can’t perform that action at this time.
0 commit comments