All Pages - columns system UI

This commit is contained in:
NGPixel
2017-04-09 11:48:37 -04:00
parent 485bfc39c3
commit 5a010f224f
8 changed files with 242 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ router.get('/create/*', (req, res, next) => {
return res.render('error-forbidden')
}
if (_.some(['create', 'edit', 'account', 'source', 'history', 'mk'], (e) => { return _.startsWith(req.path, '/create/' + e) })) {
if (_.some(['create', 'edit', 'account', 'source', 'history', 'mk', 'all'], (e) => { return _.startsWith(req.path, '/create/' + e) })) {
return res.render('error', {
message: 'You cannot create a document with this name as it is reserved by the system.',
error: {}
@@ -130,6 +130,25 @@ router.put('/create/*', (req, res, next) => {
})
})
// ==========================================
// LIST ALL PAGES
// ==========================================
/**
* View list view of all pages
*/
router.get('/all', (req, res, next) => {
entries.getFromTree('/').then((pageData) => {
res.render('pages/all', { pageData })
return true
}).catch((err) => {
res.render('error', {
message: err.message,
error: {}
})
})
})
// ==========================================
// VIEW MODE
// ==========================================