A hosting service for Jekyll Blogs
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.
 
 
 
 
 
 

50 lines
1.7 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>
% }
<a href="<%= $c->url_for( 'show_dashboard_blog_page' ) %>">Create New Page</a>
% 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>
% }