Remove destroy button from closed disputes

This commit is contained in:
Karl Erik Õunapuu 2020-05-07 16:22:48 +03:00
parent fabcdf9b7e
commit bd8ffb7e1d
2 changed files with 2 additions and 9 deletions

View file

@ -44,8 +44,8 @@ module Admin
# DELETE /admin/disputes/1 # DELETE /admin/disputes/1
def delete def delete
@dispute.destroy @dispute.update(closed: true)
redirect_to admin_disputes_url, notice: 'Dispute was successfully destroyed.' redirect_to admin_disputes_url, notice: 'Dispute was successfully closed.'
end end
private private

View file

@ -136,9 +136,6 @@
<th class="col-xs-2"> <th class="col-xs-2">
<%= sort_link(@q, 'comment') %> <%= sort_link(@q, 'comment') %>
</th> </th>
<th class="col-xs-2">
<%= t(:actions) %>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -159,10 +156,6 @@
<td> <td>
<%= x.comment %> <%= x.comment %>
</td> </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> </tr>
<% end %> <% end %>
</tbody> </tbody>