diff --git a/.eslintrc.json b/.eslintrc.json index 182309f2fa..31a3542bf7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -56,6 +56,7 @@ "settings_streams": false, "settings_filters": false, "settings_invites": false, + "settings_user_groups": false, "settings": false, "resize": false, "loading": false, diff --git a/static/js/admin_sections.js b/static/js/admin_sections.js index 856e627a58..240e332682 100644 --- a/static/js/admin_sections.js +++ b/static/js/admin_sections.js @@ -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; diff --git a/static/js/settings.js b/static/js/settings.js index a42143d216..02dd8c46d7 100644 --- a/static/js/settings.js +++ b/static/js/settings.js @@ -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"), }; } diff --git a/static/js/settings_user_groups.js b/static/js/settings_user_groups.js new file mode 100644 index 0000000000..ddef9d3e67 --- /dev/null +++ b/static/js/settings_user_groups.js @@ -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; +} diff --git a/static/templates/admin_tab.handlebars b/static/templates/admin_tab.handlebars index ae2ce2a4b9..8d3274f4cf 100644 --- a/static/templates/admin_tab.handlebars +++ b/static/templates/admin_tab.handlebars @@ -27,3 +27,5 @@ {{ partial "realm-filter-settings-admin" }} {{ partial "invites-list-admin" }} + +{{ partial "user-groups-admin" }} diff --git a/static/templates/user-groups-admin.handlebars b/static/templates/user-groups-admin.handlebars new file mode 100644 index 0000000000..616b714c7f --- /dev/null +++ b/static/templates/user-groups-admin.handlebars @@ -0,0 +1,2 @@ +