org settings: Add framework for User groups page.

This commit is contained in:
Cynthia Lin 2017-11-12 20:20:42 -08:00 committed by showell
parent 5bbc46762f
commit 7790e2b23c
8 changed files with 40 additions and 0 deletions

View File

@ -56,6 +56,7 @@
"settings_streams": false, "settings_streams": false,
"settings_filters": false, "settings_filters": false,
"settings_invites": false, "settings_invites": false,
"settings_user_groups": false,
"settings": false, "settings": false,
"resize": false, "resize": false,
"loading": false, "loading": false,

View File

@ -32,6 +32,9 @@ exports.load_admin_section = function (name) {
case 'invites-list-admin': case 'invites-list-admin':
section = 'invites'; section = 'invites';
break; break;
case 'user-groups-admin':
section = 'user-groups';
break;
default: default:
blueslip.error('Unknown admin id ' + name); blueslip.error('Unknown admin id ' + name);
return; return;
@ -62,6 +65,9 @@ exports.load_admin_section = function (name) {
case 'invites': case 'invites':
settings_invites.set_up(); settings_invites.set_up();
break; break;
case 'user-groups':
settings_user_groups.set_up();
break;
default: default:
blueslip.error('programming error for section ' + section); blueslip.error('programming error for section ' + section);
return; return;
@ -78,6 +84,7 @@ exports.reset_sections = function () {
settings_streams.reset(); settings_streams.reset();
settings_filters.reset(); settings_filters.reset();
settings_invites.reset(); settings_invites.reset();
settings_user_groups.reset();
}; };
return exports; return exports;

View File

@ -84,6 +84,7 @@ function _setup_page() {
"default-streams-list": i18n.t("Default streams"), "default-streams-list": i18n.t("Default streams"),
"filter-settings": i18n.t("Filter settings"), "filter-settings": i18n.t("Filter settings"),
"invites-list-admin": i18n.t("Invitations"), "invites-list-admin": i18n.t("Invitations"),
"user-groups-admin": i18n.t("User groups"),
}; };
} }

View File

@ -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;
}

View File

@ -27,3 +27,5 @@
{{ partial "realm-filter-settings-admin" }} {{ partial "realm-filter-settings-admin" }}
{{ partial "invites-list-admin" }} {{ partial "invites-list-admin" }}
{{ partial "user-groups-admin" }}

View File

@ -0,0 +1,2 @@
<div id="user-groups-admin" class="settings-section" data-name="user-groups-admin">
</div>

View File

@ -60,6 +60,10 @@
<i class="icon icon-vector-smile"></i> <i class="icon icon-vector-smile"></i>
<div class="text">{{ _('Custom emoji') }}</div> <div class="text">{{ _('Custom emoji') }}</div>
</li> </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"> <li class="admin" tabindex="0" data-section="auth-methods">
<i class="icon icon-vector-lock"></i> <i class="icon icon-vector-lock"></i>
<div class="text">{{ _('Authentication methods') }}</div> <div class="text">{{ _('Authentication methods') }}</div>

View File

@ -1079,6 +1079,7 @@ JS_SPECS = {
'js/settings_streams.js', 'js/settings_streams.js',
'js/settings_filters.js', 'js/settings_filters.js',
'js/settings_invites.js', 'js/settings_invites.js',
'js/settings_user_groups.js',
'js/settings.js', 'js/settings.js',
'js/admin_sections.js', 'js/admin_sections.js',
'js/admin.js', 'js/admin.js',