A web application allowing people to create an account, configure a profile, and share a list of URLs on that profile.
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.9 KiB

extends ../layouts/main
block content
.uk-margin
div(uk-grid)
.uk-width-expand
h1.uk-text-truncate Posts
.uk-width-auto
a(href="/admin/post/compose").uk-button.dtp-button-primary
+renderButtonIcon('fa-plus', 'New Post')
.uk-margin
if (Array.isArray(posts) && (posts.length > 0))
ul.uk-list
each post in posts
li(data-post-id= post._id)
div(uk-grid).uk-grid-small.uk-flex-middle
.uk-width-expand
a(href=`/post/${post.slug}`).uk-display-block.uk-text-large.uk-text-truncate #{post.title}
.uk-text-small
div(uk-grid).uk-grid-small
.uk-width-auto
span published: #{moment(post.created).format('MMM DD, YYYY [at] hh:mm:ss a')}
if post.updated
.uk-width-auto
span last update: #{moment(post.updated).format('MMM DD, YYYY [at] hh:mm:ss a')}
.uk-width-auto
div(uk-grid).uk-grid-small.uk-flex-middle
.uk-width-auto(class={
'uk-text-info': (post.status === 'draft'),
'uk-text-success': (post.status === 'published'),
'uk-text-danger': (post.status === 'archived'),
})= post.status
.uk-width-auto
a(href=`/admin/post/${post._id}`).uk-button.dtp-button-primary
+renderButtonIcon('fa-pen', 'Edit')
.uk-width-auto
button(
type="button",
data-post-id= post._id,
data-post-title= post.title,
onclick="return dtp.adminApp.deletePost(event);",
).uk-button.dtp-button-danger
+renderButtonIcon('fa-trash', 'Delete')
else
div There are no posts at this time.