From 82a0fe0eca23da40b5e77ff835e10afd8149fd1f Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Tue, 25 Oct 2016 13:56:28 -0700 Subject: [PATCH] actions popover: Change "Topic Edit" to "View Source / Topic Edit". Also edit the icon to show "View Source" as the primary feature. --- static/js/popovers.js | 10 ++++++---- static/templates/actions_popover_content.handlebars | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/static/js/popovers.js b/static/js/popovers.js index cc771fb5dd..0a45b912fe 100644 --- a/static/js/popovers.js +++ b/static/js/popovers.js @@ -58,14 +58,16 @@ exports.toggle_actions_popover = function (element, id) { if (elt.data('popover') === undefined) { var message = current_msg_list.get(id); var editability = message_edit.get_editability(message); - var is_editable = (editability === message_edit.editability_types.TOPIC_ONLY || - editability === message_edit.editability_types.FULL); + var use_edit_icon; var editability_menu_item; if (editability === message_edit.editability_types.FULL) { + use_edit_icon = true; editability_menu_item = i18n.t("Edit"); } else if (editability === message_edit.editability_types.TOPIC_ONLY) { - editability_menu_item = i18n.t("Edit Topic"); + use_edit_icon = false; + editability_menu_item = i18n.t("View Source / Edit Topic"); } else { + use_edit_icon = false; editability_menu_item = i18n.t("View Source"); } var can_mute_topic = @@ -79,7 +81,7 @@ exports.toggle_actions_popover = function (element, id) { var args = { message: message, - is_editable: is_editable, + use_edit_icon: use_edit_icon, editability_menu_item: editability_menu_item, can_mute_topic: can_mute_topic, can_unmute_topic: can_unmute_topic, diff --git a/static/templates/actions_popover_content.handlebars b/static/templates/actions_popover_content.handlebars index 175df8a824..e07a23b7d1 100644 --- a/static/templates/actions_popover_content.handlebars +++ b/static/templates/actions_popover_content.handlebars @@ -3,7 +3,7 @@
  • {{! Can consider http://fontawesome.io/icon/file-code-o/ when we upgrade to font awesome 4.}} - {{editability_menu_item}} + {{editability_menu_item}}