This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/templates/admin/transactions/index.html.ep

48 lines
1.6 KiB
Text
Raw Permalink Normal View History

% layout 'admin';
% title 'Transactions';
% content_for javascript => begin
% end
% if ( my $error = flash 'error' ) {
<div class="alert alert-danger" role="alert">
<strong>Error!</strong> <%= $error %>
</div>
% } elsif ( my $success = flash 'success' ) {
<div class="alert alert-success" role="alert">
<strong>Success!</strong> <%= $success %>
</div>
% }
2017-10-24 16:55:49 +00:00
<div class="row mb-3">
<div class="col">
<div class="card">
<h3 class="card-header">
Transactions
</h3>
<div class="list-group list-group-flush">
% for my $transaction ( $transactions->all ) {
<a href="<%= url_for . '/' . $transaction->id %>" class="list-group-item list-group-item-action" target="_blank">
2017-10-24 16:55:49 +00:00
<div class="row">
<div class="col-md-4 row">
<div class="col my-auto">
<div class="row">
<div class="col">From: <%= $transaction->buyer->name %></div>
</div>
<div class="row">
<div class="col">To: <%= $transaction->seller->name %></div>
</div>
</div>
</div>
<div class="col-md-4 text-center my-auto"><h3><%= sprintf('£%.2f', $transaction->value / 100000) %></h3></div>
<div class="col-md-4 text-right my-auto"><%= format_human_datetime $transaction->purchase_time %></div>
</div>
</a>
% }
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
%= bootstrap_pagination( $c->param('page') || 1, $transactions->pager->last_page, { class => 'justify-content-center' } );
</div>
</div>