mirror of https://github.com/zulip/zulip.git
org settings: Add framework for User groups page.
This commit is contained in:
parent
5bbc46762f
commit
7790e2b23c
|
@ -56,6 +56,7 @@
|
|||
"settings_streams": false,
|
||||
"settings_filters": false,
|
||||
"settings_invites": false,
|
||||
"settings_user_groups": false,
|
||||
"settings": false,
|
||||
"resize": false,
|
||||
"loading": false,
|
||||
|
|
|
@ -32,6 +32,9 @@ exports.load_admin_section = function (name) {
|
|||
case 'invites-list-admin':
|
||||
section = 'invites';
|
||||
break;
|
||||
case 'user-groups-admin':
|
||||
section = 'user-groups';
|
||||
break;
|
||||
default:
|
||||
blueslip.error('Unknown admin id ' + name);
|
||||
return;
|
||||
|
@ -62,6 +65,9 @@ exports.load_admin_section = function (name) {
|
|||
case 'invites':
|
||||
settings_invites.set_up();
|
||||
break;
|
||||
case 'user-groups':
|
||||
settings_user_groups.set_up();
|
||||
break;
|
||||
default:
|
||||
blueslip.error('programming error for section ' + section);
|
||||
return;
|
||||
|
@ -78,6 +84,7 @@ exports.reset_sections = function () {
|
|||
settings_streams.reset();
|
||||
settings_filters.reset();
|
||||
settings_invites.reset();
|
||||
settings_user_groups.reset();
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
|
|
@ -84,6 +84,7 @@ function _setup_page() {
|
|||
"default-streams-list": i18n.t("Default streams"),
|
||||
"filter-settings": i18n.t("Filter settings"),
|
||||
"invites-list-admin": i18n.t("Invitations"),
|
||||
"user-groups-admin": i18n.t("User groups"),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
var settings_user_groups = (function () {
|
||||
|
||||
var exports = {};
|
||||
|
||||
var meta = {
|
||||
loaded: false,
|
||||
};
|
||||
|
||||
exports.reset = function () {
|
||||
meta.loaded = false;
|
||||
};
|
||||
|
||||
exports.set_up = function () {
|
||||
meta.loaded = true;
|
||||
};
|
||||
|
||||
return exports;
|
||||
}());
|
||||
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = settings_user_groups;
|
||||
}
|
|
@ -27,3 +27,5 @@
|
|||
{{ partial "realm-filter-settings-admin" }}
|
||||
|
||||
{{ partial "invites-list-admin" }}
|
||||
|
||||
{{ partial "user-groups-admin" }}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<div id="user-groups-admin" class="settings-section" data-name="user-groups-admin">
|
||||
</div>
|
|
@ -60,6 +60,10 @@
|
|||
<i class="icon icon-vector-smile"></i>
|
||||
<div class="text">{{ _('Custom emoji') }}</div>
|
||||
</li>
|
||||
<li class="admin" tabindex="0" data-section="user-groups-admin">
|
||||
<i class="icon icon-vector-group"></i>
|
||||
<div class="text">{{ _('User groups') }}</div>
|
||||
</li>
|
||||
<li class="admin" tabindex="0" data-section="auth-methods">
|
||||
<i class="icon icon-vector-lock"></i>
|
||||
<div class="text">{{ _('Authentication methods') }}</div>
|
||||
|
|
|
@ -1079,6 +1079,7 @@ JS_SPECS = {
|
|||
'js/settings_streams.js',
|
||||
'js/settings_filters.js',
|
||||
'js/settings_invites.js',
|
||||
'js/settings_user_groups.js',
|
||||
'js/settings.js',
|
||||
'js/admin_sections.js',
|
||||
'js/admin.js',
|
||||
|
|
Loading…
Reference in New Issue