mirror of
https://github.com/internetee/registry.git
synced 2025-06-09 22:24:47 +02:00
Remove destroy button from closed disputes
This commit is contained in:
parent
fabcdf9b7e
commit
bd8ffb7e1d
2 changed files with 2 additions and 9 deletions
|
@ -44,8 +44,8 @@ module Admin
|
|||
|
||||
# DELETE /admin/disputes/1
|
||||
def delete
|
||||
@dispute.destroy
|
||||
redirect_to admin_disputes_url, notice: 'Dispute was successfully destroyed.'
|
||||
@dispute.update(closed: true)
|
||||
redirect_to admin_disputes_url, notice: 'Dispute was successfully closed.'
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -136,9 +136,6 @@
|
|||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'comment') %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= t(:actions) %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -159,10 +156,6 @@
|
|||
<td>
|
||||
<%= x.comment %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t(:delete), delete_admin_dispute_path(id: x.id),
|
||||
data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue