CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Routes #127

Closed adam-clarey closed 8 years ago

adam-clarey commented 8 years ago

This is quite a biggy, I went through all core and extra modules and replaced the old iris.app.get with iris.route.get's

I also added the various route details for each, eg:

/**
 * Define callback routes.
 */
var routes = {
  create: {
    title: "Create trigger",
    description: "Create system trigger routine.",
    permissions: ["can access admin pages"],
    menu: [{
      menuName: "admin_toolbar",
      parent: '/admin/config/triggers',
      title: "Create trigger"
    }]
  }
}

I also added comments to all page callbacks and moved the position of code elements to follow a common convention. eg

global variable (eg, var fs = require('fs');)

permissions (static and callbacks)

routes (eg, see above)

page callbacks (eg, iris.route.get("/admin/config/triggers/create", routes.create, function (req, res) )

hooks

adam-clarey commented 8 years ago

Waiting on #124 to be merged before i can do entityUI and schemaUI as it will cause a conflict

pau1m commented 8 years ago

Epic indeed. +1