tab/app/views/requests/_index.html.haml
2019-05-31 14:50:55 +12:00

35 lines
1 KiB
Text

%h4= title
%table.pure-table
%thead
%tr
%th Issuer
%th Creditor
%th Debtor
%th Amount
%th Message
- if actions
%th Actions
%tbody
- (requests || []).each do |r|
%tr
%td= r.issuer.name
%td= r.creditor.name
%td= r.debtor.name
%td= r.amount_f
%td= r.message
- if actions
%td
- if can?(:confirm, r)
= link_to request_confirm_path(r), method: :post, class: "btn btn-success btn-xs" do
%i.glyphicon.glyphicon-ok
Accept
 
- if can?(:decline, r)
= link_to request_decline_path(r), method: :post, class: "btn btn-danger btn-xs" do
%i.glyphicon.glyphicon-remove
Decline
 
- if can?(:cancel, r)
= link_to request_cancel_path(r), method: :post, class: "btn btn-warning btn-xs" do
%i.glyphicon.glyphicon-trash
Cancel