mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	feat: quick access dropdown on groups page to access privileges page
This commit is contained in:
		| @@ -88,6 +88,13 @@ define('admin/manage/group', [ | ||||
| 			}); | ||||
| 		}); | ||||
|  | ||||
| 		$('[component="category/list"] [data-cid]').on('click', function () { | ||||
| 			var cid = $(this).attr('data-cid'); | ||||
| 			if (cid) { | ||||
| 				ajaxify.go('admin/manage/privileges/' + cid); | ||||
| 			} | ||||
| 		}); | ||||
|  | ||||
| 		colorpicker.enable(changeGroupLabelColor, function (hsb, hex) { | ||||
| 			groupLabelPreview.css('background-color', '#' + hex); | ||||
| 		}); | ||||
|   | ||||
| @@ -5,6 +5,7 @@ const validator = require('validator'); | ||||
|  | ||||
| const db = require('../../database'); | ||||
| const user = require('../../user'); | ||||
| const categories = require('../../categories'); | ||||
| const groups = require('../../groups'); | ||||
| const meta = require('../../meta'); | ||||
| const pagination = require('../../pagination'); | ||||
| @@ -50,12 +51,15 @@ groupsController.get = async function (req, res, next) { | ||||
| 		}; | ||||
| 	}); | ||||
|  | ||||
| 	const allCategories = await categories.buildForSelectAll(); | ||||
|  | ||||
| 	res.render('admin/manage/group', { | ||||
| 		group: group, | ||||
| 		groupNames: groupNameData, | ||||
| 		allowPrivateGroups: meta.config.allowPrivateGroups, | ||||
| 		maximumGroupNameLength: meta.config.maximumGroupNameLength, | ||||
| 		maximumGroupTitleLength: meta.config.maximumGroupTitleLength, | ||||
| 		categories: allCategories, | ||||
| 	}); | ||||
| }; | ||||
|  | ||||
|   | ||||
| @@ -113,6 +113,11 @@ | ||||
| 				<option value="{groupNames.encodedName}" <!-- IF groupNames.selected -->selected<!-- ENDIF groupNames.selected -->>{groupNames.displayName}</option> | ||||
| 				<!-- END groupNames --> | ||||
| 			</select> | ||||
| 			<br /> | ||||
| 			<div class="well"> | ||||
| 				<strong class="pull-left">[[admin/manage/privileges:edit-privileges]]</strong><br /> | ||||
| 				<!-- IMPORT partials/category-selector.tpl --> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</form> | ||||
| </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user