mirror of https://github.com/zulip/zulip.git
gear menu: Drop special naming for organization settings menu item.
Removes the special naming of the organization settings gear menu item for admins so that it lines up with how we refer to the "Organization settings" UI itself in the help center documentation.
This commit is contained in:
parent
cb8c7f2a17
commit
b79daa9fa3
|
@ -20,9 +20,6 @@ mock_esm("../../static/js/activity", {
|
||||||
mock_esm("../../static/js/compose", {
|
mock_esm("../../static/js/compose", {
|
||||||
update_email() {},
|
update_email() {},
|
||||||
});
|
});
|
||||||
mock_esm("../../static/js/gear_menu", {
|
|
||||||
update_org_settings_menu_item() {},
|
|
||||||
});
|
|
||||||
mock_esm("../../static/js/narrow_state", {
|
mock_esm("../../static/js/narrow_state", {
|
||||||
update_email() {},
|
update_email() {},
|
||||||
});
|
});
|
||||||
|
|
|
@ -516,7 +516,7 @@ export async function manage_organization(page: Page): Promise<void> {
|
||||||
await page.waitForSelector("#settings_overlay_container.show", {visible: true});
|
await page.waitForSelector("#settings_overlay_container.show", {visible: true});
|
||||||
|
|
||||||
const url = await page_url_with_fragment(page);
|
const url = await page_url_with_fragment(page);
|
||||||
assert.match(url, /^http:\/\/[^/]+\/#organization/, "Unexpected manage organization URL");
|
assert.match(url, /^http:\/\/[^/]+\/#organization/, "Unexpected organization settings URL");
|
||||||
|
|
||||||
const organization_settings_data_section = "li[data-section='organization-settings']";
|
const organization_settings_data_section = "li[data-section='organization-settings']";
|
||||||
await page.click(organization_settings_data_section);
|
await page.click(organization_settings_data_section);
|
||||||
|
|
|
@ -79,15 +79,6 @@ The click handler uses "[data-overlay-trigger]" as
|
||||||
the selector and then calls browser_history.go_to_location.
|
the selector and then calls browser_history.go_to_location.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function update_org_settings_menu_item() {
|
|
||||||
const $item = $(".admin-menu-item").expectOne();
|
|
||||||
if (page_params.is_admin) {
|
|
||||||
$item.find("span").text($t({defaultMessage: "Manage organization"}));
|
|
||||||
} else {
|
|
||||||
$item.find("span").text($t({defaultMessage: "Organization settings"}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function version_display_string() {
|
export function version_display_string() {
|
||||||
const version = page_params.zulip_version;
|
const version = page_params.zulip_version;
|
||||||
const is_fork = page_params.zulip_merge_base && page_params.zulip_merge_base !== version;
|
const is_fork = page_params.zulip_merge_base && page_params.zulip_merge_base !== version;
|
||||||
|
@ -145,7 +136,6 @@ export function initialize() {
|
||||||
show_webathena: page_params.show_webathena,
|
show_webathena: page_params.show_webathena,
|
||||||
});
|
});
|
||||||
$("#navbar-buttons").html(rendered_gear_menu);
|
$("#navbar-buttons").html(rendered_gear_menu);
|
||||||
update_org_settings_menu_item();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function open() {
|
export function open() {
|
||||||
|
|
|
@ -7,7 +7,6 @@ import $ from "jquery";
|
||||||
import * as activity from "./activity";
|
import * as activity from "./activity";
|
||||||
import * as blueslip from "./blueslip";
|
import * as blueslip from "./blueslip";
|
||||||
import * as compose from "./compose";
|
import * as compose from "./compose";
|
||||||
import * as gear_menu from "./gear_menu";
|
|
||||||
import * as message_live_update from "./message_live_update";
|
import * as message_live_update from "./message_live_update";
|
||||||
import * as narrow_state from "./narrow_state";
|
import * as narrow_state from "./narrow_state";
|
||||||
import {page_params} from "./page_params";
|
import {page_params} from "./page_params";
|
||||||
|
@ -83,7 +82,6 @@ export const update_person = function update(person) {
|
||||||
|
|
||||||
if (people.is_my_user_id(person.user_id) && page_params.is_admin !== person_obj.is_admin) {
|
if (people.is_my_user_id(person.user_id) && page_params.is_admin !== person_obj.is_admin) {
|
||||||
page_params.is_admin = person_obj.is_admin;
|
page_params.is_admin = person_obj.is_admin;
|
||||||
gear_menu.update_org_settings_menu_item();
|
|
||||||
settings_linkifiers.maybe_disable_widgets();
|
settings_linkifiers.maybe_disable_widgets();
|
||||||
settings_org.maybe_disable_widgets();
|
settings_org.maybe_disable_widgets();
|
||||||
settings_profile_fields.maybe_disable_widgets();
|
settings_profile_fields.maybe_disable_widgets();
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<li class="admin-menu-item hidden-for-spectators" role="presentation">
|
<li class="admin-menu-item hidden-for-spectators" role="presentation">
|
||||||
<a href="#organization" role="menuitem">
|
<a href="#organization" role="menuitem">
|
||||||
<i class="fa fa-bolt" aria-hidden="true"></i>
|
<i class="fa fa-bolt" aria-hidden="true"></i>
|
||||||
<span>{{t 'Manage organization' }}</span>
|
<span>{{t 'Organization settings' }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{#unless is_guest}}
|
{{#unless is_guest}}
|
||||||
|
|
Loading…
Reference in New Issue