mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Show disabled delete button if thing can’t be deleted
This commit is contained in:
parent
b379656d55
commit
287b150b7f
|
@ -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> ';
|
||||
} else {
|
||||
actions += '<a class="btn btn-danger btn-sm delete-asset disabled" onClick="return false;"><i class="fa fa-trash"></i></a> ';
|
||||
}
|
||||
|
||||
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> ';
|
||||
}
|
||||
|
||||
actions +='</nobr>';
|
||||
return actions;
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue