gear-menu: Re-add the organization settings link.

This re-adds the organization settings link and toggles the text
dependent on whether the user is an administrator or not.

Fixes: #4201.
This commit is contained in:
Brock Whittaker 2017-04-10 14:17:31 -07:00 committed by Tim Abbott
parent 1f8d9a46f0
commit d74f72f08f
3 changed files with 4 additions and 7 deletions

View File

@ -9,9 +9,9 @@ var all_streams = [];
exports.show_or_hide_menu_item = function () {
var item = $('.admin-menu-item').expectOne();
if (page_params.is_admin) {
item.show();
item.find("span").text(i18n.t("Manage organization"));
} else {
item.hide();
item.find("span").text(i18n.t("Organization settings"));
$(".organization-box [data-name='organization-settings']")
.find("input, button, select").attr("disabled", true);
}

View File

@ -2495,10 +2495,6 @@ button.topic_edit_cancel {
text-decoration: line-through;
}
.admin-menu-item {
display: none;
}
/* embed */
.message_content .message_embed {
display: block;

View File

@ -61,7 +61,8 @@
</li>
<li title="{{ _('Manage organization') }}" class="admin-menu-item">
<a href="#organization" role="button">
<i class="icon-vector-bolt"></i> {{ _('Manage organization') }}
<i class="icon-vector-bolt"></i>
<span>{{ _('Manage organization') }}</span>
</a>
</li>
<li class="divider"></li>