parent
afcd9939f9
commit
87359931f0
5 changed files with 93 additions and 1 deletions
@ -0,0 +1,54 @@ |
||||
% layout 'standard', title => 'Dashboard', sb_active => 'dashboard'; |
||||
|
||||
%= include 'dashboard/_blog_nav', page => 'posts' |
||||
|
||||
% 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 ( $history ) { |
||||
<table style="border: 1px solid #ccc" class="table mt-5"> |
||||
<tbody> |
||||
<tr> |
||||
<th class="text-nowrap">When?</th> |
||||
<th class="text-nowrap">What?</th> |
||||
<th class="text-nowrap">Restore?</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
% for my $change ( @{$history} ) { |
||||
<tr> |
||||
<td><%= $change->{dateref} %></a></td> |
||||
<td><%= $change->{message} %></a></td> |
||||
<td> |
||||
<form style="margin-top: 1.5em" method="POST" action="<%= $c->url_for( 'do_dashboard_blog_history' ) %>"> |
||||
<input type="hidden" name="commit_id" value="<%= $change->{commit} %>"> |
||||
<button type="submit" class="btn btn-sm btn-primary float-end">Restore</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
% } |
||||
</tbody> |
||||
</table> |
||||
% } |
||||
|
||||
Loading…
Reference in new issue