smooted out settings update after new post, activated page listing and sorting
parent
532748f688
commit
477533ceb5
@ -0,0 +1,48 @@
|
|||||||
|
extends frame
|
||||||
|
block main-content
|
||||||
|
#post-index
|
||||||
|
#post-index-wrapper
|
||||||
|
#post-index-menu
|
||||||
|
- if(postFilter=='all')
|
||||||
|
a.current-filter(href="/@/dashboard/page/list/all")= "All Pages ("+page_info.all+")"
|
||||||
|
- else
|
||||||
|
a(href="/@/dashboard/page/list/all")= "All Pages ("+page_info.all+")"
|
||||||
|
| .
|
||||||
|
- if(postFilter=='published')
|
||||||
|
a.current-filter(href="/@/dashboard/page/list/published")= "Published ("+page_info.published+")"
|
||||||
|
- else
|
||||||
|
a(href="/@/dashboard/page/list/published")= "Published ("+page_info.published+")"
|
||||||
|
| .
|
||||||
|
- if(postFilter=='deleted')
|
||||||
|
a.current-filter(href="/@/dashboard/page/list/deleted")= "Deleted ("+page_info.deleted+")"
|
||||||
|
- else
|
||||||
|
a(href="/@/dashboard/page/list/deleted")= "Deleted ("+page_info.deleted+")"
|
||||||
|
|
||||||
|
a.add-new-post(href="/@/dashboard/page/add/new") +
|
||||||
|
label Create New Post
|
||||||
|
#posts-list
|
||||||
|
- var index = 0;
|
||||||
|
- for ( index; index < items.length; index++)
|
||||||
|
a.post-link(href="/@/dashboard/page/edit/"+items[index].uuid id=items[index].uuid)
|
||||||
|
|
||||||
|
div.post-bg(style="background: #fc6399 url("+items[index].feature+") no-repeat center center / cover")
|
||||||
|
label= items[index].title
|
||||||
|
span= items[index].created
|
||||||
|
//p= items[index].plaintext.substr(0, 200)+"..."
|
||||||
|
|
||||||
|
- var next = parseInt(page_index, 10) + 1
|
||||||
|
- var prev = parseInt(page_index, 10) - 1
|
||||||
|
- if(next > page_count) next = 1
|
||||||
|
- if(prev <= 0) prev = page_count
|
||||||
|
|
||||||
|
br
|
||||||
|
a.page-btns(href="/@/dashboard/page/list/"+postFilter+"/"+prev)
|
||||||
|
svg(viewBox="0 0 20 20" class="icons")
|
||||||
|
use(xlink:href='/assets/images/global/sprite.svg#entypo-chevron-left')
|
||||||
|
|
||||||
|
span.paginate= "PAGE "+page_index+" OF "+page_count
|
||||||
|
|
||||||
|
a.page-btns(href="/@/dashboard/page/list/"+postFilter+"/"+next)
|
||||||
|
svg(viewBox="0 0 20 20" class="icons")
|
||||||
|
use(xlink:href='/assets/images/global/sprite.svg#entypo-chevron-right')
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
extends frame
|
|
||||||
block main-content
|
|
||||||
#post-index
|
|
||||||
#post-index-wrapper
|
|
||||||
#post-index-menu
|
|
||||||
- if(postFilter=='all')
|
|
||||||
a.current-filter(href="/@/dashboard/posts/list/all")= "All Posts ("+page_info.all+")"
|
|
||||||
- else
|
|
||||||
a(href="/@/dashboard/posts/list/all")= "All Posts ("+page_info.all+")"
|
|
||||||
| .
|
|
||||||
- if(postFilter=='published')
|
|
||||||
a.current-filter(href="/@/dashboard/posts/list/published")= "Published ("+page_info.published+")"
|
|
||||||
- else
|
|
||||||
a(href="/@/dashboard/posts/list/published")= "Published ("+page_info.published+")"
|
|
||||||
| .
|
|
||||||
- if(postFilter=='deleted')
|
|
||||||
a.current-filter(href="/@/dashboard/posts/list/deleted")= "Deleted ("+page_info.deleted+")"
|
|
||||||
- else
|
|
||||||
a(href="/@/dashboard/posts/list/deleted")= "Deleted ("+page_info.deleted+")"
|
|
||||||
|
|
||||||
a.add-new-post(href="/@/dashboard/posts/add/new") +
|
|
||||||
label Create New Post
|
|
||||||
#posts-list
|
|
||||||
- var index = 0;
|
|
||||||
- for ( index; index < items.length; index++)
|
|
||||||
a.post-link(href="/@/dashboard/posts/edit/"+items[index].post.uuid id=items[index].post.uuid)
|
|
||||||
|
|
||||||
div.post-bg(style="background: #fc6399 url("+items[index].post.feature.substr(8)+") no-repeat center center / cover")
|
|
||||||
label= items[index].post.title
|
|
||||||
span= items[index].post.created
|
|
||||||
p= items[index].post.plaintext.substr(0, 200)+"..."
|
|
||||||
|
|
||||||
- var next = parseInt(page_index, 10) + 1
|
|
||||||
- var prev = parseInt(page_index, 10) - 1
|
|
||||||
- if(next > page_count) next = 1
|
|
||||||
- if(prev <= 0) prev = page_count
|
|
||||||
|
|
||||||
br
|
|
||||||
a.page-btns(href="/@/dashboard/posts/list/"+postFilter+"/"+prev)
|
|
||||||
svg(viewBox="0 0 20 20" class="icons")
|
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-left')
|
|
||||||
|
|
||||||
span.paginate= "PAGE "+page_index+" OF "+page_count
|
|
||||||
|
|
||||||
a.page-btns(href="/@/dashboard/posts/list/"+postFilter+"/"+next)
|
|
||||||
svg(viewBox="0 0 20 20" class="icons")
|
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-right')
|
|
||||||
|
|
Loading…
Reference in New Issue