You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.9 KiB
55 lines
1.9 KiB
% layout 'standard', title => 'Admin Panel', sb_active => 'admin';
|
|
|
|
%= include 'admin/_nav', page => 'people'
|
|
|
|
% if ( my $confirmation = flash 'confirmation' ) {
|
|
<div style="margin-top: 2em" class="alert alert-success" role="alert">
|
|
<%== $confirmation %>
|
|
</div>
|
|
% }
|
|
|
|
% if ( $c->stash->{success} ) {
|
|
<div style="margin-top: 2em" class="alert alert-success" role="alert">
|
|
<%= $c->stash->{success_message} %>
|
|
</div>
|
|
% }
|
|
|
|
% if ( $c->stash->{errors} ) {
|
|
<div style="margin-top: 2em" class="alert alert-danger" role="alert">
|
|
There were errors with your request that could not be resolved:
|
|
<ul>
|
|
% for my $error ( @{$c->stash->{errors}} ) {
|
|
<li><%= $error %></li>
|
|
% }
|
|
</ul>
|
|
</div>
|
|
% }
|
|
|
|
% if ( $people ) {
|
|
<table style="border: 1px solid #ccc" class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th class="text-nowrap">Name</th>
|
|
<th class="text-nowrap">Email Address</th>
|
|
<th class="text-nowrap">Created</th>
|
|
<th class="text-nowrap">Become User</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
% for my $person ( @{$people} ) {
|
|
<tr>
|
|
<td><a href="<%= $c->url_for( 'show_admin_person', { id => $person->id } ) %>"><%= $person->name %></a></td>
|
|
<td><%= $person->email %></td>
|
|
<td><%= $person->created_at->strftime( "%F" ) %></td>
|
|
<td>
|
|
<form style="margin-top: 1.5em; display: inline;" method="POST" action="<%= $c->url_for( 'do_admin_become' ) %>">
|
|
<input type="hidden" name="uid" value="<%= $person->id %>">
|
|
<button type="submit" class="btn btn-sm btn-outline-danger">Login</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
% }
|
|
</tbody>
|
|
</table>
|
|
% }
|
|
|
|
|