2017-01-09 15:46:43 +01:00
|
|
|
%h4= title
|
|
|
|
%table.pure-table
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th Issuer
|
2019-05-31 04:50:55 +02:00
|
|
|
%th Creditor
|
|
|
|
%th Debtor
|
2017-01-09 15:46:43 +01:00
|
|
|
%th Amount
|
|
|
|
%th Message
|
|
|
|
- if actions
|
2019-05-31 04:50:55 +02:00
|
|
|
%th Actions
|
2017-01-09 15:46:43 +01:00
|
|
|
%tbody
|
|
|
|
- (requests || []).each do |r|
|
|
|
|
%tr
|
|
|
|
%td= r.issuer.name
|
2019-05-31 04:50:55 +02:00
|
|
|
%td= r.creditor.name
|
|
|
|
%td= r.debtor.name
|
2017-01-09 16:40:58 +01:00
|
|
|
%td= r.amount_f
|
2017-01-09 15:46:43 +01:00
|
|
|
%td= r.message
|
|
|
|
- if actions
|
|
|
|
%td
|
2019-05-31 04:50:55 +02:00
|
|
|
- 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
|