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/tokens/index.html.ep

32 lines
1 KiB
Text
Raw Permalink Normal View History

% layout 'admin';
% title 'Tokens';
2017-04-08 01:32:13 +00:00
% 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>
% }
<form action="<%= url_for %>" method="post">
<div class="form-group">
<div class="input-group">
2017-04-21 21:48:47 +00:00
<input type="text" class="form-control" placeholder="Token Text" name="token">
<span class="input-group-btn">
<button class="btn btn-primary" type="submit">Add</button>
</span>
2017-04-08 01:32:13 +00:00
</div>
</div>
</form>
<div class="list-group">
% for my $token (@$tokens) {
<a href="<%= url_for . '/' . $token->{id} %>" class="list-group-item list-group-item-action d-flex justify-content-between <%= $token->{used} ? 'disabled' : 'list-group-item-success' %>">
<span><%= $token->{name} %></span>
<span><%= $token->{used} == 1 ? 'Used' : 'Available' %></span>
</a>
% }
2017-04-08 01:32:13 +00:00
</div>