Link to destroy action of the file object
This commit is contained in:
@ -7,7 +7,8 @@ li.panel.panel-default
|
||||
span = f.object.name
|
||||
.panel-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{id}" role="tabpanel"
|
||||
.panel-body
|
||||
.clearfix = link_to(t('shared.destroy'), '#', class:'btn btn-warning btn-sm discard-file pull-right')
|
||||
- if policy(f.object).destroy?
|
||||
.clearfix = link_to(t('shared.destroy'), f.object, class: 'btn btn-warning btn-sm pull-right', data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||
.form-group
|
||||
= f.label(:name, t('activerecord.attributes.file.name'))
|
||||
= f.text_field(:name, class: 'form-control')
|
||||
|
Reference in New Issue
Block a user