Module: adminController

adminController

admin controller

Author:
  • Yaw Joseph Etse
License:
  • MIT
Source:

Requires

  • module:async
  • module:path
  • module:superagent
  • module:moment
  • module:semver
  • module:periodicjs.core.utilities
  • module:periodicjs.core.controller
  • module:periodicjs.core.mailer

Methods

<inner> asset_show(req, res) → {object}

show asset page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> assets_index(req, res) → {object}

list assets page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> categories_index(req, res) → {object}

list categories page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> category_parent(req, res) → {object}

get get category parent page page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> category_show(req, res) → {object}

show category information

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> collection_edit(req, res) → {object}

edit collection page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> collection_new(req, res) → {object}

new collection page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> collections_index(req, res) → {object}

list collections page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> contenttype_show(req, res) → {object}

show content type page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> contenttypes_index(req, res) → {object}

list content types page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> extension_show(req, res) → {object}

show selected extension page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> extensions_index(req, res) → {object}

list installed extensions

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> getDefaultContentTypes(contenttypesetting, callbackk)

get the default content type from stored db defaults

Parameters:
Name Type Description
contenttypesetting object

name of default setting

callbackk function

async callback

Source:

<inner> index(req, res) → {object}

admin ext home page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> item_edit(req, res) → {object}

edit item page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> item_new(req, res) → {object}

new item page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> items_index(req, res) → {object}

list items page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> loadDefaultContentTypes(contenttypes, callbackk)

load contenttype data

Parameters:
Name Type Description
contenttypes object

load default contentypes

callbackk function

async callback

Source:

<inner> loadExtension(req, res) → {object}

get extension data from selected extension package json

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> loadExtensions(req, res) → {object}

load extensions that are enabled and installed

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> loadTheme(req, res) → {object}

select theme name from req parameter

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> loadThemes(req, res, next) → {object}

loads list of installed themes by reading content/themes directory

Parameters:
Name Type Description
req object
res object
next object

async callback

Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> mail_index(req, res) → {object}

send test mail page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> settings_faq(req, res) → {object}

settings faq page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> settings_index(req, res) → {object}

application settings and theme settings page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> tag_parent(req, res) → {object}

get tag parent page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> tag_show(req, res) → {object}

show selected tag page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> tags_index(req, res) → {object}

list tags page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> theme_show(req, res) → {object}

get theme page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> themes_index(req, res) → {object}

list installed themes and install new themes page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> users_edit(req, res) → {function}

make sure a user is authenticated, if not logged in, send them to login page and return them to original resource after login

Parameters:
Name Type Description
req object
res object
Source:
Returns:

next() callback

Type
function

<inner> users_index(req, res) → {object}

shows list of users page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> users_new(req, res) → {object}

create a new user page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> users_show(req, res) → {object}

shows user profile page

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object