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.
59 lines
2.1 KiB
59 lines
2.1 KiB
% layout 'standard', title => 'Dashboard', sb_active => 'dashboard';
|
|
|
|
%= include 'dashboard/_blog_nav', page => 'pages'
|
|
|
|
% 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>
|
|
% }
|
|
|
|
<div class="mt-3 row">
|
|
<div class="col">
|
|
<div class="float-end" style="margin-right: 1em">
|
|
<a style="text-decoration: none;" href="<%= $c->url_for( 'show_dashboard_blog_page' ) %>">
|
|
<span style="color: green; width: 32px; height: 32px;" data-feather="plus-circle"></span>
|
|
<cpan style="color: black; vertical-align: 30%; font-size: 16px">New Blog Page</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
% if ( $blog_pages ) {
|
|
<table style="border: 1px solid #ccc" class="table mt-5">
|
|
<tbody>
|
|
<tr>
|
|
<th class="text-nowrap">Path</th>
|
|
<th class="text-nowrap">Type</th>
|
|
<th class="text-nowrap">Edit</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
% for my $page ( @{$blog_pages} ) {
|
|
<tr>
|
|
<td><a href="<%= $c->url_for( 'show_dashboard_blog', { id => $blog->id } ) %>"><%= $page->filename %></a></td>
|
|
<td><a href="<%= $c->url_for( 'show_dashboard_blog', { id => $blog->id } ) %>"><%= $page->headers->{layout} %></a></td>
|
|
<td><a href="<%= $c->url_for( 'show_dashboard_blog_page_edit', { id => $blog->id } )->query( file => $page->rel_path ) %>">Edit Post</a></td>
|
|
</tr>
|
|
% }
|
|
</tbody>
|
|
</table>
|
|
% }
|
|
|
|
|