zulip/static/templates
YashRE42 ca57400771 stream_create: Always insert change-stream-privacy button.
Previously, if an admin created a private stream with shared history
or a private stream with protected history, they would see the general
tab for that stream in the right side of the subscriptions_overlay as
expected, but, they would not see the pencil button to change stream
privacy unless they clicked a different stream and came back.

The reason for this has to do with how we receive events when we
create a sub. We first get an event with type "stream" and op
"create", we then get an event with type "subscription" and op "add"
ie we create the stream and then sub ourselves to it. Now, we render
`stream_settings.hbs` while handling the "stream create" event, at
this time we pass `can_change_stream_permissions` as false since
`(!sub.invite_only || sub.subscribed)` is false because we're not
subscribed yet. This causes us to skip the insertion of the
"change-stream-privacy" block which is a problem because when we're
handling the "subscription add" event, we run
`stream_ui_updates.update_change_stream_privacy_settings(sub)` which
tries to show the element via `.show()` but can't since the element
does not exist and as a result the admin user does not see the pencil
edit button.

This commit fixes the above bug by changing the template such that we
always insert the button, but conditionally apply
`style="display:none"`.

Fixes: #20345.
2021-11-24 10:49:29 -08:00
..
confirm_dialog popovers: Add sidebar menu to delete all drafts. 2021-11-22 17:01:47 -08:00
navbar_alerts navbar_alerts: Add alerts for demo org deadlines. 2021-09-10 16:31:54 -07:00
settings api_key_modal: Migrate modal to Micromodal. 2021-11-23 15:43:38 -08:00
stream_settings stream_create: Always insert change-stream-privacy button. 2021-11-24 10:49:29 -08:00
widgets todo_widget: Fix /todo checkboxes to match style used in menus. 2021-11-16 15:02:53 -08:00
about_zulip.hbs about_zulip: Mark strings for translation. 2021-06-18 18:13:00 -07:00
actions_popover_content.hbs copy_link: Add onSuccess listener to copy clipboard. 2021-07-02 11:33:37 -07:00
all_messages_sidebar_actions.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
announce_stream_docs.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
blueslip_stacktrace.hbs
bookend.hbs message_list: Convert bookend_content messages to FormatJS. 2021-04-13 17:41:10 -07:00
buddy_list_tooltip_content.hbs templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
compose.hbs compose: Refactor bottom part of compose box. 2021-11-22 18:29:45 -08:00
compose_all_everyone.hbs templates: Fix <br> → <br /> to be parseable by FormatJS. 2021-04-20 14:39:53 -07:00
compose_announce.hbs templates: Fix <br> → <br /> to be parseable by FormatJS. 2021-04-20 14:39:53 -07:00
compose_control_buttons.hbs compose: Add dividers. 2021-11-22 18:44:32 -08:00
compose_invite_users.hbs compose: Clarify subscribe-other-user button label. 2021-09-16 11:09:53 -07:00
compose_not_subscribed.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
compose_notification.hbs notification: Fix "narrow to..." link present above composebox. 2021-08-07 09:51:04 -07:00
compose_private_stream_alert.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
copy_code_button.hbs copy_code_button: Attach tooltip to body to avoid overlap with parent. 2021-10-01 10:04:17 -07:00
copy_invite_link.hbs lint: Fix badly quoted strings tagged for translation. 2021-05-09 20:16:28 -07:00
copy_message_button.hbs lint: Fix badly quoted strings tagged for translation. 2021-05-09 20:16:28 -07:00
copy_to_clipboard_svg.hbs
default_language_modal.hbs default_language: Migrate modal to dialog_widget. 2021-11-16 17:02:29 -08:00
dialog_change_password.hbs change_password: Migrate modal to dialog_widget. 2021-11-23 15:41:54 -08:00
dialog_widget.hbs dialog_widget: Add support for rendering a single footer button. 2021-10-26 18:20:17 -07:00
draft.hbs drafts: Add hotkey hint to restore draft. 2021-11-10 12:54:53 -08:00
draft_table_body.hbs drafts: Document that drafts are not shared with other devices. 2021-11-10 12:53:44 -08:00
drafts_sidebar_action.hbs popovers: Add sidebar menu to delete all drafts. 2021-11-22 17:01:47 -08:00
edit_content_button.hbs tooltips: Use TippyJS for all message_control_button tooltips. 2021-05-13 12:56:38 -07:00
edited_notice.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
embedded_bot_config_item.hbs
emoji_popover.hbs
emoji_popover_content.hbs emoji_picker: Update architecture to support status emoji. 2021-07-23 13:03:13 -07:00
emoji_popover_emoji.hbs emoji_picker: Update architecture to support status emoji. 2021-07-23 13:03:13 -07:00
emoji_popover_search_results.hbs emoji_picker: Update architecture to support status emoji. 2021-07-23 13:03:13 -07:00
emoji_showcase.hbs
favicon.svg.hbs
feedback_container.hbs
filter_topics.hbs left-sidebar: Add topic filter input in zoomed topic view. 2021-06-08 15:09:26 -07:00
gear_menu.hbs popovers: Hide most irrelevant options for spectators. 2021-09-21 10:10:54 -07:00
giphy_picker.hbs templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
giphy_picker_mobile.hbs giphy: Use GIPHY web SDK to allow inserting GIFs in compose box. 2021-04-05 15:04:49 -07:00
help_link_widget.hbs
hotspot_icon.hbs
hotspot_overlay.hbs hotspots: Remove useless and malformed alt text. 2021-04-27 11:12:24 -07:00
input_pill.hbs input_pill: Customize pills for deactivated users. 2021-06-25 18:06:42 -07:00
intro_reply_hotspot.hbs templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
invitation_failed_error.hbs invites: Update error message when max limit for the day is reached. 2021-11-01 16:36:26 -07:00
invite_subscription.hbs
invite_user.hbs templates: Prevent dangling end tags. 2021-11-23 15:55:54 -08:00
keyboard_shortcuts.hbs user_settings: Add option to disable escape key navigation to default view. 2021-10-29 18:15:30 -07:00
left_sidebar.hbs popovers: Add sidebar menu to delete all drafts. 2021-11-22 17:01:47 -08:00
left_sidebar_stream_setting_popover.hbs left_sidebar: Replace cog icon with plus icon. 2021-06-08 14:55:48 -07:00
lightbox_overlay.hbs lightbox_overlay: “Pan and Zoom” → “Pan & zoom”. 2021-06-21 16:38:11 -07:00
loader.hbs
login_to_access.hbs login_to_access_modal: Restore current hash after login. 2021-09-06 09:00:16 -07:00
markdown_help.hbs lint: Fix badly quoted strings tagged for translation. 2021-05-09 20:16:28 -07:00
markdown_time_tooltip.hbs markdown: Change timezone to time zone in <time> tooltip. 2021-07-08 10:10:11 -04:00
markdown_timestamp.hbs markdown: Add fa-clock icon before markdown timestamps. 2021-03-14 22:57:01 -07:00
me_message.hbs zulip-icon: Add `zulip-icon` as classPrefix for icon. 2021-04-29 09:02:25 -07:00
message_avatar.hbs message_body: Fix -3px alignment kludge using whitespace control. 2021-06-23 09:10:50 -07:00
message_body.hbs linters: Rewrite check-templates. 2021-11-23 15:55:54 -08:00
message_controls.hbs message view: Show failed message icon tooltips similar to other icons. 2021-07-18 11:33:32 -07:00
message_edit_form.hbs linters: Rewrite check-templates. 2021-11-23 15:55:54 -08:00
message_edit_history.hbs templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
message_group.hbs
message_hidden_dialog.hbs message view: Allow revealing hidden message from muted sender. 2021-05-05 09:15:45 -07:00
message_history_modal.hbs message_edit_history: Migrate modal to dialog_widget. 2021-11-08 17:24:31 -08:00
message_reaction.hbs
message_reactions.hbs message_controls: Hide irrelevant icons for spectators. 2021-06-16 10:19:07 -07:00
message_view_header.hbs message_view_header: Hide subscriber count for spectators. 2021-11-03 16:02:53 -07:00
mobile_message_buttons_popover_content.hbs
more_topics.hbs topic_list_item: Use `unread_counts` class for showing unread count. 2021-04-14 10:57:16 -07:00
more_topics_spinner.hbs
move_topic_to_stream.hbs move_topic_to_stream: Migrate modal to dialog_widget. 2021-11-09 10:02:43 -08:00
muted_topic_ui_row.hbs
muted_user_ui_row.hbs settings: Add UI page for managing muted users. 2021-04-21 10:17:44 -07:00
navbar.hbs linters: Rewrite check-templates. 2021-11-23 15:55:54 -08:00
navbar_icon_and_title.hbs
new_stream_user.hbs streams: Hide fake emails in stream creation form. 2021-11-18 12:49:10 -08:00
new_stream_users.hbs lint: Fix badly quoted strings tagged for translation. 2021-05-09 20:16:28 -07:00
no_arrow_popover.hbs
non_editable_user_group.hbs
playground_links_popover_content.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
pm_list_item.hbs left_sidebar: Replace user_circle_class with fa fa-group icon. 2021-04-30 16:02:29 -07:00
recent_topic_row.hbs tippy: Set default placement of tooltips to top. 2021-07-07 10:23:31 -07:00
recent_topics_filters.hbs recent_topic: Add role and area properties according to MDN docs. 2021-03-16 14:54:22 -07:00
recent_topics_table.hbs templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
recipient_row.hbs templates: Clean up recipient_row.hbs. 2021-11-24 13:56:39 +00:00
remind_me_popover_content.hbs
right_sidebar.hbs templates: Prevent dangling end tags. 2021-11-23 15:55:54 -08:00
search_operators.hbs search_operators: Add info about `is:resolved` keyword. 2021-07-13 23:48:45 -07:00
set_status_overlay.hbs user_status: Simplify user status popover labels. 2021-07-28 10:02:51 -07:00
settings_overlay.hbs edit_bot: Migrate modal to dialog_widget. 2021-11-08 17:34:42 -08:00
settings_tab.hbs settings: Create user_notification_settings.hbs template. 2021-08-20 07:50:51 -07:00
single_message.hbs
starred_messages_sidebar_actions.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
status_emoji_selector.hbs user_status: Add UI changes for status emoji feature. 2021-07-28 10:02:50 -07:00
stream_privacy.hbs
stream_sidebar_actions.hbs popovers: Hide most irrelevant options for spectators. 2021-09-21 10:10:54 -07:00
stream_sidebar_row.hbs left_sidebar: Hide vdots for All messages and stream buttons. 2021-11-02 11:26:19 -07:00
stream_topic_widget.hbs templates: Escape some unescaped > and & characters. 2021-05-20 12:09:47 -07:00
topic_edit_form.hbs topic_edit_form: Restyle topic edit save button with logo colours. 2021-07-08 17:45:42 -07:00
topic_list_item.hbs left-sidebar: Add support for showing resolve-topic-prefix. 2021-07-05 18:02:40 -07:00
topic_muted.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
topic_sidebar_actions.hbs popovers: Hide most irrelevant options for spectators. 2021-09-21 10:10:54 -07:00
typeahead_list_item.hbs linters: Rewrite check-templates. 2021-11-23 15:55:54 -08:00
typing_notification.hbs templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
typing_notifications.hbs typing: Display several people are typing... 2021-04-07 00:17:30 -07:00
user_group_info_popover.hbs
user_group_info_popover_content.hbs zulip-icon: Add `zulip-icon` as classPrefix for icon. 2021-04-29 09:02:25 -07:00
user_group_list_item.hbs popovers: Add tabs for profile, groups and streams in user_info modal. 2021-06-11 07:56:32 -07:00
user_info_popover_content.hbs user_info_popover: Show relevant info for spectators and hide buttons. 2021-11-02 11:26:19 -07:00
user_info_popover_title.hbs
user_presence_row.hbs buddy_list: Show still image for animated emojis. 2021-09-12 16:24:29 -07:00
user_presence_rows.hbs
user_profile_modal.hbs linters: Rewrite check-templates. 2021-11-23 15:55:54 -08:00
user_stream_list_item.hbs profile: Add tooltip to hint unsubscription flow for private stream. 2021-06-30 15:17:27 -07:00
view_code_in_playground.hbs view_code_in_playground: Use tippy for tooltip. 2021-04-07 17:38:40 -07:00