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

42 lines
1.2 KiB
Text
Raw Permalink Normal View History

2017-04-18 09:44:07 +00:00
% layout 'admin';
% title 'Users';
% 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="list-group">
2017-11-20 13:26:52 +00:00
% for my $user ($user_rs->all) {
<a href="<%= url_for . '/' . $user->id %>" class="list-group-item list-group-item-action" target="_blank">
2017-11-20 13:26:52 +00:00
<div class="row">
<div class="col-4">
%= $user->name
</div>
<div class="col-4 text-center">
%= $user->email
</div>
<div class="col-4 text-right">
% if ( $user->type eq 'customer' ) {
<span class="badge badge-success">Customer</span>
% } elsif ( $user->type eq 'organisation' ) {
<span class="badge badge-info">Organisation</span>
% } else {
<span class="badge badge-danger">Unknown</span>
% }
</div>
2017-04-18 09:44:07 +00:00
</div>
</a>
% }
</div>
2017-11-20 13:26:52 +00:00
<div class="row">
<div class="col">
%= bootstrap_pagination( $c->param('page') || 1, $user_rs->pager->last_page, { class => 'justify-content-center' } );
</div>
</div>