use group name, hidden groups are not in groupslug:groupname

v1.18.x
Barış Soner Uşaklı 10 years ago
parent 6fc073d33e
commit 981a7558f7

@ -27,7 +27,7 @@ groupsController.list = function(req, res, next) {
}; };
groupsController.get = function(req, res, next) { groupsController.get = function(req, res, next) {
var groupName = res.locals.groupName; var groupName = req.params.name;
async.waterfall([ async.waterfall([
function(next){ function(next){
groups.exists(groupName, next); groups.exists(groupName, next);

@ -60,7 +60,7 @@ function addRoutes(router, middleware, controllers) {
router.get('/manage/users/banned', controllers.admin.users.banned); router.get('/manage/users/banned', controllers.admin.users.banned);
router.get('/manage/groups', controllers.admin.groups.list); router.get('/manage/groups', controllers.admin.groups.list);
router.get('/manage/groups/:slug', middleware.exposeGroupName, controllers.admin.groups.get); router.get('/manage/groups/:name', controllers.admin.groups.get);
router.get('/settings/:term?', controllers.admin.settings.get); router.get('/settings/:term?', controllers.admin.settings.get);

@ -18,7 +18,7 @@
</td> </td>
<td> <td>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<a href="{config.relative_path}/admin/manage/groups/{groups.slug}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a> <a href="{config.relative_path}/admin/manage/groups/{groups.name}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
<!-- IF !groups.system --> <!-- IF !groups.system -->
<button class="btn btn-danger btn-xs" data-action="delete"><i class="fa fa-times"></i></button> <button class="btn btn-danger btn-xs" data-action="delete"><i class="fa fa-times"></i></button>
<!-- ENDIF !groups.system --> <!-- ENDIF !groups.system -->

Loading…
Cancel
Save