Show disabled delete button if thing can’t be deleted

This commit is contained in:
snipe 2017-10-19 11:29:58 -07:00
parent b379656d55
commit 287b150b7f

View file

@ -198,12 +198,16 @@ $('.snipe-table').bootstrapTable({
+ ' data-toggle="modal" '
+ ' data-content="{{ trans('general.sure_to_delete') }} ' + row.name + '?" '
+ ' data-title="{{ trans('general.delete') }}" onClick="return false;">'
+ '<i class="fa fa-trash"></i></a></nobr>';
+ '<i class="fa fa-trash"></i></a>&nbsp;';
} else {
actions += '<a class="btn btn-danger btn-sm delete-asset disabled" onClick="return false;"><i class="fa fa-trash"></i></a>&nbsp;';
}
if ((row.available_actions) && (row.available_actions.restore === true)) {
actions += '<a href="{{ url('/') }}/' + dest + '/' + row.id + '/restore" class="btn btn-sm btn-warning" data-tooltip="true" title="Restore"><i class="fa fa-retweet"></i></a>&nbsp;';
}
actions +='</nobr>';
return actions;
};