mongoose-manager
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -20,2 +20,3 @@ var express = require('express'), | ||
this.options = _.extend(require('./defaults').defaults, options); | ||
this.extraMenus = []; | ||
routes.init(this); | ||
@@ -89,2 +90,6 @@ } | ||
Admin.prototype.extraMenu = function(name, route){ | ||
this.extraMenus.push({name: name, route: route}); | ||
}; | ||
Admin.prototype._createApp = function() { | ||
@@ -91,0 +96,0 @@ var app = express(); |
@@ -19,3 +19,4 @@ var async = require('async'); | ||
res.render('index', { | ||
models : models | ||
models : models, | ||
extraMenus : admin.extraMenus | ||
}) | ||
@@ -22,0 +23,0 @@ }) |
{ | ||
"name": "mongoose-manager", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "example": "supervisor --force-watch -i public,views example/app.js" |
@@ -8,2 +8,4 @@ # mongoose-manager | ||
### Basic usage | ||
```js | ||
@@ -27,3 +29,10 @@ var Admin = require('mongoose-manager').Admin; | ||
### Adding extra menus | ||
You can add your own entries to the index menu: | ||
```js | ||
admin.extraMenu('The menu text', 'http://google.com'); | ||
``` | ||
### Note | ||
Thanks to @madhums for handing over the module name |
Sorry, the diff of this file is not supported yet
54341
977
36