2017-04-24 11:49:18 +00:00
|
|
|
% layout 'admin';
|
|
|
|
% title 'Organisations';
|
|
|
|
% 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>
|
|
|
|
% }
|
|
|
|
<div class="card mb-3">
|
|
|
|
<h3 class="card-header">
|
|
|
|
%= $valid_org->name
|
|
|
|
</h3>
|
2017-09-04 13:03:58 +00:00
|
|
|
<div class="card-block">
|
|
|
|
<form action="<%= url_for %>" method="post">
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="name" class="col-sm-2 col-form-label">Organisation Name</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input id="name" type="text" class="form-control" placeholder="Organisation Name" name="name" value="<%= $valid_org->name %>">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="name" class="col-sm-2 col-form-label">Street Name</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input id="street_name" type="text" class="form-control" placeholder="Street Name" name="street_name" value="<%= $valid_org->street_name %>">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="name" class="col-sm-2 col-form-label">Town/City</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input id="town" type="text" class="form-control" placeholder="Town" name="town" value="<%= $valid_org->town %>">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="name" class="col-sm-2 col-form-label">Sector</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<select class="form-control" name="sector">
|
|
|
|
%= include 'partials/sector_options', selected_sector => $valid_org->sector || '';
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="name" class="col-sm-2 col-form-label">Postcode</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input id="postcode" type="text" class="form-control" placeholder="Postcode" name="postcode" value="<%= $valid_org->postcode %>">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="name" class="col-sm-2 col-form-label">Validated</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input id="pending" type="checkbox" name="pending" value="0"<%= $valid_org->pending ? '' : ' checked' %>>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<div class="ml-auto col-sm-10">
|
|
|
|
<button class="btn btn-success" type="submit">Save Changes To Organisation</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-18 11:56:14 +00:00
|
|
|
</form>
|
2017-09-04 13:03:58 +00:00
|
|
|
</div>
|
2017-04-24 11:49:18 +00:00
|
|
|
</div>
|
|
|
|
<div class="card mb-3">
|
|
|
|
<h3 class="card-header">
|
|
|
|
Transactions
|
|
|
|
</h3>
|
|
|
|
<ul class="list-group list-group-flush">
|
2017-07-25 14:44:16 +00:00
|
|
|
% for my $transaction ( $transactions->all ) {
|
2017-04-24 11:49:18 +00:00
|
|
|
<li class="list-group-item">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row text-center">
|
|
|
|
<div class="col">From: <%= $transaction->buyer->name %></div>
|
|
|
|
<div class="col">To: <%= $transaction->seller->name %></div>
|
|
|
|
<div class="col">Value: <%= $transaction->value %></div>
|
2017-08-31 10:51:22 +00:00
|
|
|
<div class="col">Submitted At: <%= $transaction->submitted_at %></div>
|
|
|
|
<div class="col">Purchase Time: <%= $transaction->purchase_time %></div>
|
2017-04-24 11:49:18 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
% }
|
2017-07-25 14:44:16 +00:00
|
|
|
<li class="list-group-item">
|
|
|
|
<div class="container">
|
|
|
|
%= bootstrap_pagination( $c->param('page') || 1, $transactions->pager->last_page, { class => 'justify-content-center' } );
|
|
|
|
</div>
|
|
|
|
</li>
|
2017-04-24 11:49:18 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|