fixed new routing issue with post listing
This commit is contained in:
parent
c2290a2e26
commit
2f5d121284
4 changed files with 11 additions and 11 deletions
|
@ -11,7 +11,7 @@ const dateUtils = new DateUtils();
|
||||||
//--------------------------
|
//--------------------------
|
||||||
// POSTS
|
// POSTS
|
||||||
//--------------------------
|
//--------------------------
|
||||||
router.get('/:filter?/:page?', function(req, res) {
|
router.get('/list/:filter?/:page?', function(req, res) {
|
||||||
var pageNum = req.params.page;
|
var pageNum = req.params.page;
|
||||||
var filter = req.params.filter;
|
var filter = req.params.filter;
|
||||||
if (pageNum == '' || pageNum == null) pageNum = 1;
|
if (pageNum == '' || pageNum == null) pageNum = 1;
|
||||||
|
|
2
themes/dash/assets/js/dash.min.js
vendored
2
themes/dash/assets/js/dash.min.js
vendored
|
@ -9020,7 +9020,7 @@ var parent = module.bundle.parent;
|
||||||
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
||||||
var hostname = "" || location.hostname;
|
var hostname = "" || location.hostname;
|
||||||
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||||
var ws = new WebSocket(protocol + '://' + hostname + ':' + "55655" + '/');
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "56361" + '/');
|
||||||
|
|
||||||
ws.onmessage = function (event) {
|
ws.onmessage = function (event) {
|
||||||
var data = JSON.parse(event.data);
|
var data = JSON.parse(event.data);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
.recent-header
|
.recent-header
|
||||||
h3 Recent
|
h3 Recent
|
||||||
.index-menu
|
.index-menu
|
||||||
a(href='/@/dashboard/posts') View Posts
|
a(href='/@/dashboard/posts/list') View Posts
|
||||||
| .
|
| .
|
||||||
a(href='/@/dashboard/posts/add/new') Create Post
|
a(href='/@/dashboard/posts/add/new') Create Post
|
||||||
br
|
br
|
||||||
|
|
|
@ -4,19 +4,19 @@ block main-content
|
||||||
#post-index-wrapper
|
#post-index-wrapper
|
||||||
#post-index-menu
|
#post-index-menu
|
||||||
- if(postFilter=='all')
|
- if(postFilter=='all')
|
||||||
a.current-filter(href="/@/dashboard/posts/all")= "All Posts ("+page_info.all+")"
|
a.current-filter(href="/@/dashboard/posts/list/all")= "All Posts ("+page_info.all+")"
|
||||||
- else
|
- else
|
||||||
a(href="/@/dashboard/posts/all")= "All Posts ("+page_info.all+")"
|
a(href="/@/dashboard/posts/list/all")= "All Posts ("+page_info.all+")"
|
||||||
| .
|
| .
|
||||||
- if(postFilter=='published')
|
- if(postFilter=='published')
|
||||||
a.current-filter(href="/@/dashboard/posts/published")= "Published ("+page_info.published+")"
|
a.current-filter(href="/@/dashboard/posts/list/published")= "Published ("+page_info.published+")"
|
||||||
- else
|
- else
|
||||||
a(href="/@/dashboard/posts/published")= "Published ("+page_info.published+")"
|
a(href="/@/dashboard/posts/list/published")= "Published ("+page_info.published+")"
|
||||||
| .
|
| .
|
||||||
- if(postFilter=='deleted')
|
- if(postFilter=='deleted')
|
||||||
a.current-filter(href="/@/dashboard/posts/deleted")= "Deleted ("+page_info.deleted+")"
|
a.current-filter(href="/@/dashboard/posts/list/deleted")= "Deleted ("+page_info.deleted+")"
|
||||||
- else
|
- else
|
||||||
a(href="/@/dashboard/posts/deleted")= "Deleted ("+page_info.deleted+")"
|
a(href="/@/dashboard/posts/list/deleted")= "Deleted ("+page_info.deleted+")"
|
||||||
|
|
||||||
a.add-new-post(href="/@/dashboard/posts/add/new") + Create New Post
|
a.add-new-post(href="/@/dashboard/posts/add/new") + Create New Post
|
||||||
#posts-list
|
#posts-list
|
||||||
|
@ -34,13 +34,13 @@ block main-content
|
||||||
- if(prev <= 0) prev = page_count
|
- if(prev <= 0) prev = page_count
|
||||||
|
|
||||||
br
|
br
|
||||||
a.page-btns(href="/@/dashboard/posts/"+postFilter+"/"+prev)
|
a.page-btns(href="/@/dashboard/posts/list/"+postFilter+"/"+prev)
|
||||||
svg(viewBox="0 0 20 20" class="icons")
|
svg(viewBox="0 0 20 20" class="icons")
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-left')
|
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-left')
|
||||||
|
|
||||||
span.paginate= "PAGE "+page_index+" OF "+page_count
|
span.paginate= "PAGE "+page_index+" OF "+page_count
|
||||||
|
|
||||||
a.page-btns(href="/@/dashboard/posts/"+postFilter+"/"+next)
|
a.page-btns(href="/@/dashboard/posts/list/"+postFilter+"/"+next)
|
||||||
svg(viewBox="0 0 20 20" class="icons")
|
svg(viewBox="0 0 20 20" class="icons")
|
||||||
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-right')
|
use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-right')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue