mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
Make the Administration menu item be show/hide-driven.
Always render the Administration menu item from the back end, but make it be hidden by default until the page is loaded. Then, the client can un-hide it as needed. (imported from commit 66e607eec430d7179b4d5ac3f5416f5be8ac26c9)
This commit is contained in:
@@ -2,6 +2,15 @@ var admin = (function () {
|
||||
|
||||
var exports = {};
|
||||
|
||||
exports.show_or_hide_menu_item = function () {
|
||||
var item = $('.admin-menu-item').expectOne();
|
||||
if (page_params.is_admin) {
|
||||
item.show();
|
||||
} else {
|
||||
item.hide();
|
||||
}
|
||||
};
|
||||
|
||||
function failed_listing_users(xhr, error) {
|
||||
util.destroy_loading_indicator($('#subs_page_loading_indicator'));
|
||||
ui.report_error("Error listing users or bots", xhr, $("#administration-status"));
|
||||
|
||||
Reference in New Issue
Block a user