From 3c3471b720cc56651eb7b9eb8b781d951c947f83 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 11 Jul 2019 15:52:56 -0700 Subject: [PATCH] =?UTF-8?q?templates:=20Rename=20*.handlebars=20=E2=86=A6?= =?UTF-8?q?=20*.hbs=20and=20-=20=E2=86=A6=20=5F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tweaked by tabbott to avoid accidentally disabling the linter for handlebars templates. Signed-off-by: Anders Kaseorg --- docs/contributing/code-style.md | 2 +- docs/subsystems/html-templates.md | 2 +- docs/tutorials/new-feature-tutorial.md | 4 +- frontend_tests/node_tests/compose.js | 2 +- frontend_tests/node_tests/settings_org.js | 2 +- frontend_tests/node_tests/templates.js | 38 +++++++++---------- frontend_tests/node_tests/voting_widget.js | 24 ++++++------ frontend_tests/zjsunit/render.js | 6 +-- static/js/attachments_ui.js | 2 +- static/js/compose.js | 2 +- static/js/poll_widget.js | 4 +- static/js/settings_account.js | 2 +- static/js/settings_bots.js | 4 +- static/js/settings_emoji.js | 2 +- static/js/settings_invites.js | 2 +- static/js/settings_org.js | 8 ++-- static/js/settings_profile_fields.js | 4 +- static/js/settings_users.js | 2 +- static/js/stream_edit.js | 2 +- static/js/stream_popover.js | 2 +- static/js/templates.js | 4 +- static/js/tictactoe_widget.js | 2 +- static/js/todo_widget.js | 4 +- static/js/zform.js | 2 +- ...handlebars => actions_popover_content.hbs} | 0 .../admin-settings-modals.handlebars | 9 ----- ...dlebars => admin_default_streams_list.hbs} | 0 ...i_list.handlebars => admin_emoji_list.hbs} | 0 ..._list.handlebars => admin_filter_list.hbs} | 0 ...list.handlebars => admin_invites_list.hbs} | 0 ...andlebars => admin_profile_field_list.hbs} | 2 +- static/templates/admin_settings_modals.hbs | 9 +++++ static/templates/admin_tab.handlebars | 30 --------------- static/templates/admin_tab.hbs | 30 +++++++++++++++ ...t.handlebars => admin_user_group_list.hbs} | 0 ...er_list.handlebars => admin_user_list.hbs} | 0 ...andlebars => alert_word_settings_item.hbs} | 0 ...ebars => all_messages_sidebar_actions.hbs} | 0 ...cs.handlebars => announce_stream_docs.hbs} | 0 ...p.handlebars => archive_message_group.hbs} | 0 ...w.handlebars => archive_recipient_row.hbs} | 0 ..._modal.handlebars => bankruptcy_modal.hbs} | 0 .../{bookend.handlebars => bookend.hbs} | 0 ...atar_row.handlebars => bot_avatar_row.hbs} | 0 ...select.handlebars => bot_owner_select.hbs} | 0 ...ne.handlebars => compose_all_everyone.hbs} | 0 ...nounce.handlebars => compose_announce.hbs} | 0 ...rs.handlebars => compose_invite_users.hbs} | 0 ....handlebars => compose_not_subscribed.hbs} | 0 ...on.handlebars => compose_notification.hbs} | 0 ...ebars => compose_private_stream_alert.hbs} | 0 ...ser.handlebars => confirm_delete_user.hbs} | 0 ...m_dialog.handlebars => confirm_dialog.hbs} | 0 ....handlebars => default_language_modal.hbs} | 0 ...odal.handlebars => delete_topic_modal.hbs} | 0 .../templates/{draft.handlebars => draft.hbs} | 0 ...e_body.handlebars => draft_table_body.hbs} | 0 .../{edit_bot.handlebars => edit_bot.hbs} | 0 ...ed_notice.handlebars => edited_notice.hbs} | 0 ...hint.handlebars => email_address_hint.hbs} | 0 ...andlebars => embedded_bot_config_item.hbs} | 0 ...i_popover.handlebars => emoji_popover.hbs} | 0 ...t.handlebars => emoji_popover_content.hbs} | 0 ...oji.handlebars => emoji_popover_emoji.hbs} | 0 ...ebars => emoji_popover_search_results.hbs} | 0 ...showcase.handlebars => emoji_showcase.hbs} | 0 ...iner.handlebars => feedback_container.hbs} | 0 .../{group_pms.handlebars => group_pms.hbs} | 0 ...overlay.handlebars => hotspot_overlay.hbs} | 0 .../{input_pill.handlebars => input_pill.hbs} | 0 ...pot.handlebars => intro_reply_hotspot.hbs} | 0 ...handlebars => invitation_failed_error.hbs} | 0 ...ion.handlebars => invite_subscription.hbs} | 0 .../{loader.handlebars => loader.hbs} | 0 .../{me_message.handlebars => me_message.hbs} | 0 ...e_avatar.handlebars => message_avatar.hbs} | 0 ...ssage_body.handlebars => message_body.hbs} | 0 ...ntrols.handlebars => message_controls.hbs} | 0 ..._form.handlebars => message_edit_form.hbs} | 0 ...ry.handlebars => message_edit_history.hbs} | 0 ...age_group.handlebars => message_group.hbs} | 0 ...action.handlebars => message_reaction.hbs} | 0 ...tions.handlebars => message_reactions.hbs} | 0 ...ars => mobile_message_buttons_popover.hbs} | 0 ...obile_message_buttons_popover_content.hbs} | 0 ...more_topics.handlebars => more_topics.hbs} | 0 ..._row.handlebars => muted_topic_ui_row.hbs} | 0 ..._users.handlebars => new_stream_users.hbs} | 0 ...opover.handlebars => no_arrow_popover.hbs} | 0 ...handlebars => non_editable_user_group.hbs} | 0 ...tification.handlebars => notification.hbs} | 0 ...pient_row.handlebars => recipient_row.hbs} | 0 ...ndlebars => remind_me_popover_content.hbs} | 0 ...ttings.handlebars => account_settings.hbs} | 0 ...handlebars => admin_auth_methods_list.hbs} | 0 ...andlebars => admin_realm_domains_list.hbs} | 0 ...s => admin_realm_dropdown_stream_list.hbs} | 0 ...ngs.handlebars => alert_word_settings.hbs} | 0 ...gs.handlebars => attachments_settings.hbs} | 0 ...lebars => auth_methods_settings_admin.hbs} | 2 +- ...st-admin.handlebars => bot_list_admin.hbs} | 0 ...t-settings.handlebars => bot_settings.hbs} | 0 ...ndlebars => custom_user_profile_field.hbs} | 0 ....handlebars => deactivate_realm_modal.hbs} | 0 ...handlebars => deactivated_users_admin.hbs} | 0 ...ndlebars => deactivation_stream_modal.hbs} | 0 ...handlebars => deactivation_user_modal.hbs} | 0 ...dlebars => default_streams_list_admin.hbs} | 0 ...ss.handlebars => dev_env_email_access.hbs} | 0 ...ttings.handlebars => display_settings.hbs} | 0 ...ndlebars => edit_embedded_bot_service.hbs} | 0 ...bars => edit_outgoing_webhook_service.hbs} | 0 ...in.handlebars => emoji_settings_admin.hbs} | 2 +- ...-tip.handlebars => emoji_settings_tip.hbs} | 0 ...dmin.handlebars => invites_list_admin.hbs} | 0 ...andlebars => linkifier_settings_admin.hbs} | 0 ...s.handlebars => muted_topics_settings.hbs} | 0 ...s.handlebars => notification_settings.hbs} | 0 ...ars => organization_permissions_admin.hbs} | 6 +-- ...dlebars => organization_profile_admin.hbs} | 4 +- ...lebars => organization_settings_admin.hbs} | 8 ++-- ...ndlebars => organization_settings_tip.hbs} | 0 ...ce.handlebars => profile_field_choice.hbs} | 0 ...ebars => profile_field_settings_admin.hbs} | 0 ...dal.handlebars => realm_domains_modal.hbs} | 0 ...dal.handlebars => resend_invite_modal.hbs} | 0 ...dal.handlebars => revoke_invite_modal.hbs} | 0 ...ckbox.handlebars => settings_checkbox.hbs} | 0 ...ebars => settings_save_discard_widget.hbs} | 0 ...tats.handlebars => upload_space_stats.hbs} | 0 ...t-admin.handlebars => user_list_admin.hbs} | 0 static/templates/settings_tab.handlebars | 15 -------- static/templates/settings_tab.hbs | 15 ++++++++ ...ebars => sidebar_private_message_list.hbs} | 0 ..._message.handlebars => single_message.hbs} | 0 ...s => starred_messages_sidebar_actions.hbs} | 0 ...rm.handlebars => stream_creation_form.hbs} | 0 ...andlebars => stream_member_list_entry.hbs} | 0 ..._privacy.handlebars => stream_privacy.hbs} | 0 ...andlebars => stream_settings_checkbox.hbs} | 0 ....handlebars => stream_sidebar_actions.hbs} | 0 ..._row.handlebars => stream_sidebar_row.hbs} | 0 ...ream_types.handlebars => stream_types.hbs} | 0 ...bscription.handlebars => subscription.hbs} | 0 ...ount.handlebars => subscription_count.hbs} | 0 ...=> subscription_invites_warning_modal.hbs} | 0 ...rs.handlebars => subscription_members.hbs} | 0 ...ndlebars => subscription_setting_icon.hbs} | 0 ...s.handlebars => subscription_settings.hbs} | 2 +- ... => subscription_stream_privacy_modal.hbs} | 0 ...handlebars => subscription_table_body.hbs} | 0 ..._type.handlebars => subscription_type.hbs} | 0 ...criptions.handlebars => subscriptions.hbs} | 0 .../{tab_bar.handlebars => tab_bar.hbs} | 0 ...it_form.handlebars => topic_edit_form.hbs} | 0 ...st_item.handlebars => topic_list_item.hbs} | 0 ...topic_muted.handlebars => topic_muted.hbs} | 0 ...s.handlebars => topic_sidebar_actions.hbs} | 0 ...tem.handlebars => typeahead_list_item.hbs} | 0 ...ion.handlebars => typing_notification.hbs} | 0 ...ns.handlebars => typing_notifications.hbs} | 0 ...l.handlebars => unstar_messages_modal.hbs} | 0 ...ist.handlebars => uploaded_files_list.hbs} | 0 ...handlebars => user_group_info_popover.hbs} | 0 ...rs => user_group_info_popover_content.hbs} | 0 ...admin.handlebars => user_groups_admin.hbs} | 0 ...al.handlebars => user_info_form_modal.hbs} | 0 ...ndlebars => user_info_popover_content.hbs} | 0 ...handlebars => user_info_popover_title.hbs} | 0 ...e_row.handlebars => user_presence_row.hbs} | 0 ...rows.handlebars => user_presence_rows.hbs} | 0 ...odal.handlebars => user_profile_modal.hbs} | 0 ...poll-widget.handlebars => poll_widget.hbs} | 0 ...lts.handlebars => poll_widget_results.hbs} | 0 ...widget.handlebars => tictactoe_widget.hbs} | 0 ...todo-widget.handlebars => todo_widget.hbs} | 0 ...tasks.handlebars => todo_widget_tasks.hbs} | 0 ...m-choices.handlebars => zform_choices.hbs} | 0 tools/check-templates | 8 ++-- tools/html-grep | 4 +- tools/lint | 4 +- tools/linter_lib/custom_check.py | 22 +++++------ tools/webpack.config.ts | 2 +- zerver/management/commands/makemessages.py | 2 +- 184 files changed, 152 insertions(+), 152 deletions(-) rename static/templates/{actions_popover_content.handlebars => actions_popover_content.hbs} (100%) delete mode 100644 static/templates/admin-settings-modals.handlebars rename static/templates/{admin_default_streams_list.handlebars => admin_default_streams_list.hbs} (100%) rename static/templates/{admin_emoji_list.handlebars => admin_emoji_list.hbs} (100%) rename static/templates/{admin_filter_list.handlebars => admin_filter_list.hbs} (100%) rename static/templates/{admin_invites_list.handlebars => admin_invites_list.hbs} (100%) rename static/templates/{admin_profile_field_list.handlebars => admin_profile_field_list.hbs} (98%) create mode 100644 static/templates/admin_settings_modals.hbs delete mode 100644 static/templates/admin_tab.handlebars create mode 100644 static/templates/admin_tab.hbs rename static/templates/{admin_user_group_list.handlebars => admin_user_group_list.hbs} (100%) rename static/templates/{admin_user_list.handlebars => admin_user_list.hbs} (100%) rename static/templates/{alert_word_settings_item.handlebars => alert_word_settings_item.hbs} (100%) rename static/templates/{all_messages_sidebar_actions.handlebars => all_messages_sidebar_actions.hbs} (100%) rename static/templates/{announce_stream_docs.handlebars => announce_stream_docs.hbs} (100%) rename static/templates/{archive_message_group.handlebars => archive_message_group.hbs} (100%) rename static/templates/{archive_recipient_row.handlebars => archive_recipient_row.hbs} (100%) rename static/templates/{bankruptcy_modal.handlebars => bankruptcy_modal.hbs} (100%) rename static/templates/{bookend.handlebars => bookend.hbs} (100%) rename static/templates/{bot_avatar_row.handlebars => bot_avatar_row.hbs} (100%) rename static/templates/{bot_owner_select.handlebars => bot_owner_select.hbs} (100%) rename static/templates/{compose_all_everyone.handlebars => compose_all_everyone.hbs} (100%) rename static/templates/{compose_announce.handlebars => compose_announce.hbs} (100%) rename static/templates/{compose-invite-users.handlebars => compose_invite_users.hbs} (100%) rename static/templates/{compose_not_subscribed.handlebars => compose_not_subscribed.hbs} (100%) rename static/templates/{compose_notification.handlebars => compose_notification.hbs} (100%) rename static/templates/{compose_private_stream_alert.handlebars => compose_private_stream_alert.hbs} (100%) rename static/templates/{confirm_delete_user.handlebars => confirm_delete_user.hbs} (100%) rename static/templates/{confirm_dialog.handlebars => confirm_dialog.hbs} (100%) rename static/templates/{default_language_modal.handlebars => default_language_modal.hbs} (100%) rename static/templates/{delete_topic_modal.handlebars => delete_topic_modal.hbs} (100%) rename static/templates/{draft.handlebars => draft.hbs} (100%) rename static/templates/{draft_table_body.handlebars => draft_table_body.hbs} (100%) rename static/templates/{edit_bot.handlebars => edit_bot.hbs} (100%) rename static/templates/{edited_notice.handlebars => edited_notice.hbs} (100%) rename static/templates/{email_address_hint.handlebars => email_address_hint.hbs} (100%) rename static/templates/{embedded_bot_config_item.handlebars => embedded_bot_config_item.hbs} (100%) rename static/templates/{emoji_popover.handlebars => emoji_popover.hbs} (100%) rename static/templates/{emoji_popover_content.handlebars => emoji_popover_content.hbs} (100%) rename static/templates/{emoji_popover_emoji.handlebars => emoji_popover_emoji.hbs} (100%) rename static/templates/{emoji_popover_search_results.handlebars => emoji_popover_search_results.hbs} (100%) rename static/templates/{emoji_showcase.handlebars => emoji_showcase.hbs} (100%) rename static/templates/{feedback_container.handlebars => feedback_container.hbs} (100%) rename static/templates/{group_pms.handlebars => group_pms.hbs} (100%) rename static/templates/{hotspot_overlay.handlebars => hotspot_overlay.hbs} (100%) rename static/templates/{input_pill.handlebars => input_pill.hbs} (100%) rename static/templates/{intro_reply_hotspot.handlebars => intro_reply_hotspot.hbs} (100%) rename static/templates/{invitation_failed_error.handlebars => invitation_failed_error.hbs} (100%) rename static/templates/{invite_subscription.handlebars => invite_subscription.hbs} (100%) rename static/templates/{loader.handlebars => loader.hbs} (100%) rename static/templates/{me_message.handlebars => me_message.hbs} (100%) rename static/templates/{message_avatar.handlebars => message_avatar.hbs} (100%) rename static/templates/{message_body.handlebars => message_body.hbs} (100%) rename static/templates/{message_controls.handlebars => message_controls.hbs} (100%) rename static/templates/{message_edit_form.handlebars => message_edit_form.hbs} (100%) rename static/templates/{message_edit_history.handlebars => message_edit_history.hbs} (100%) rename static/templates/{message_group.handlebars => message_group.hbs} (100%) rename static/templates/{message_reaction.handlebars => message_reaction.hbs} (100%) rename static/templates/{message_reactions.handlebars => message_reactions.hbs} (100%) rename static/templates/{mobile_message_buttons_popover.handlebars => mobile_message_buttons_popover.hbs} (100%) rename static/templates/{mobile_message_buttons_popover_content.handlebars => mobile_message_buttons_popover_content.hbs} (100%) rename static/templates/{more_topics.handlebars => more_topics.hbs} (100%) rename static/templates/{muted_topic_ui_row.handlebars => muted_topic_ui_row.hbs} (100%) rename static/templates/{new_stream_users.handlebars => new_stream_users.hbs} (100%) rename static/templates/{no_arrow_popover.handlebars => no_arrow_popover.hbs} (100%) rename static/templates/{non_editable_user_group.handlebars => non_editable_user_group.hbs} (100%) rename static/templates/{notification.handlebars => notification.hbs} (100%) rename static/templates/{recipient_row.handlebars => recipient_row.hbs} (100%) rename static/templates/{remind_me_popover_content.handlebars => remind_me_popover_content.hbs} (100%) rename static/templates/settings/{account-settings.handlebars => account_settings.hbs} (100%) rename static/templates/settings/{admin_auth_methods_list.handlebars => admin_auth_methods_list.hbs} (100%) rename static/templates/settings/{admin-realm-domains-list.handlebars => admin_realm_domains_list.hbs} (100%) rename static/templates/settings/{admin-realm-dropdown-stream-list.handlebars => admin_realm_dropdown_stream_list.hbs} (100%) rename static/templates/settings/{alert-word-settings.handlebars => alert_word_settings.hbs} (100%) rename static/templates/settings/{attachments-settings.handlebars => attachments_settings.hbs} (100%) rename static/templates/settings/{auth-methods-settings-admin.handlebars => auth_methods_settings_admin.hbs} (93%) rename static/templates/settings/{bot-list-admin.handlebars => bot_list_admin.hbs} (100%) rename static/templates/settings/{bot-settings.handlebars => bot_settings.hbs} (100%) rename static/templates/settings/{custom-user-profile-field.handlebars => custom_user_profile_field.hbs} (100%) rename static/templates/settings/{deactivate-realm-modal.handlebars => deactivate_realm_modal.hbs} (100%) rename static/templates/settings/{deactivated-users-admin.handlebars => deactivated_users_admin.hbs} (100%) rename static/templates/settings/{deactivation-stream-modal.handlebars => deactivation_stream_modal.hbs} (100%) rename static/templates/settings/{deactivation-user-modal.handlebars => deactivation_user_modal.hbs} (100%) rename static/templates/settings/{default-streams-list-admin.handlebars => default_streams_list_admin.hbs} (100%) rename static/templates/settings/{dev_env_email_access.handlebars => dev_env_email_access.hbs} (100%) rename static/templates/settings/{display-settings.handlebars => display_settings.hbs} (100%) rename static/templates/settings/{edit-embedded-bot-service.handlebars => edit_embedded_bot_service.hbs} (100%) rename static/templates/settings/{edit-outgoing-webhook-service.handlebars => edit_outgoing_webhook_service.hbs} (100%) rename static/templates/settings/{emoji-settings-admin.handlebars => emoji_settings_admin.hbs} (97%) rename static/templates/settings/{emoji-settings-tip.handlebars => emoji_settings_tip.hbs} (100%) rename static/templates/settings/{invites-list-admin.handlebars => invites_list_admin.hbs} (100%) rename static/templates/settings/{linkifier-settings-admin.handlebars => linkifier_settings_admin.hbs} (100%) rename static/templates/settings/{muted-topics-settings.handlebars => muted_topics_settings.hbs} (100%) rename static/templates/settings/{notification-settings.handlebars => notification_settings.hbs} (100%) rename static/templates/settings/{organization-permissions-admin.handlebars => organization_permissions_admin.hbs} (97%) rename static/templates/settings/{organization-profile-admin.handlebars => organization_profile_admin.hbs} (98%) rename static/templates/settings/{organization-settings-admin.handlebars => organization_settings_admin.hbs} (98%) rename static/templates/settings/{organization-settings-tip.handlebars => organization_settings_tip.hbs} (100%) rename static/templates/settings/{profile-field-choice.handlebars => profile_field_choice.hbs} (100%) rename static/templates/settings/{profile-field-settings-admin.handlebars => profile_field_settings_admin.hbs} (100%) rename static/templates/settings/{realm-domains-modal.handlebars => realm_domains_modal.hbs} (100%) rename static/templates/settings/{resend-invite-modal.handlebars => resend_invite_modal.hbs} (100%) rename static/templates/settings/{revoke-invite-modal.handlebars => revoke_invite_modal.hbs} (100%) rename static/templates/settings/{settings_checkbox.handlebars => settings_checkbox.hbs} (100%) rename static/templates/settings/{settings-save-discard-widget.handlebars => settings_save_discard_widget.hbs} (100%) rename static/templates/settings/{upload-space-stats.handlebars => upload_space_stats.hbs} (100%) rename static/templates/settings/{user-list-admin.handlebars => user_list_admin.hbs} (100%) delete mode 100644 static/templates/settings_tab.handlebars create mode 100644 static/templates/settings_tab.hbs rename static/templates/{sidebar_private_message_list.handlebars => sidebar_private_message_list.hbs} (100%) rename static/templates/{single_message.handlebars => single_message.hbs} (100%) rename static/templates/{starred_messages_sidebar_actions.handlebars => starred_messages_sidebar_actions.hbs} (100%) rename static/templates/{stream_creation_form.handlebars => stream_creation_form.hbs} (100%) rename static/templates/{stream_member_list_entry.handlebars => stream_member_list_entry.hbs} (100%) rename static/templates/{stream_privacy.handlebars => stream_privacy.hbs} (100%) rename static/templates/{stream-settings-checkbox.handlebars => stream_settings_checkbox.hbs} (100%) rename static/templates/{stream_sidebar_actions.handlebars => stream_sidebar_actions.hbs} (100%) rename static/templates/{stream_sidebar_row.handlebars => stream_sidebar_row.hbs} (100%) rename static/templates/{stream_types.handlebars => stream_types.hbs} (100%) rename static/templates/{subscription.handlebars => subscription.hbs} (100%) rename static/templates/{subscription_count.handlebars => subscription_count.hbs} (100%) rename static/templates/{subscription_invites_warning_modal.handlebars => subscription_invites_warning_modal.hbs} (100%) rename static/templates/{subscription_members.handlebars => subscription_members.hbs} (100%) rename static/templates/{subscription_setting_icon.handlebars => subscription_setting_icon.hbs} (100%) rename static/templates/{subscription_settings.handlebars => subscription_settings.hbs} (98%) rename static/templates/{subscription_stream_privacy_modal.handlebars => subscription_stream_privacy_modal.hbs} (100%) rename static/templates/{subscription_table_body.handlebars => subscription_table_body.hbs} (100%) rename static/templates/{subscription_type.handlebars => subscription_type.hbs} (100%) rename static/templates/{subscriptions.handlebars => subscriptions.hbs} (100%) rename static/templates/{tab_bar.handlebars => tab_bar.hbs} (100%) rename static/templates/{topic_edit_form.handlebars => topic_edit_form.hbs} (100%) rename static/templates/{topic_list_item.handlebars => topic_list_item.hbs} (100%) rename static/templates/{topic_muted.handlebars => topic_muted.hbs} (100%) rename static/templates/{topic_sidebar_actions.handlebars => topic_sidebar_actions.hbs} (100%) rename static/templates/{typeahead_list_item.handlebars => typeahead_list_item.hbs} (100%) rename static/templates/{typing_notification.handlebars => typing_notification.hbs} (100%) rename static/templates/{typing_notifications.handlebars => typing_notifications.hbs} (100%) rename static/templates/{unstar-messages-modal.handlebars => unstar_messages_modal.hbs} (100%) rename static/templates/{uploaded_files_list.handlebars => uploaded_files_list.hbs} (100%) rename static/templates/{user_group_info_popover.handlebars => user_group_info_popover.hbs} (100%) rename static/templates/{user_group_info_popover_content.handlebars => user_group_info_popover_content.hbs} (100%) rename static/templates/{user-groups-admin.handlebars => user_groups_admin.hbs} (100%) rename static/templates/{user-info-form-modal.handlebars => user_info_form_modal.hbs} (100%) rename static/templates/{user_info_popover_content.handlebars => user_info_popover_content.hbs} (100%) rename static/templates/{user_info_popover_title.handlebars => user_info_popover_title.hbs} (100%) rename static/templates/{user_presence_row.handlebars => user_presence_row.hbs} (100%) rename static/templates/{user_presence_rows.handlebars => user_presence_rows.hbs} (100%) rename static/templates/{user_profile_modal.handlebars => user_profile_modal.hbs} (100%) rename static/templates/widgets/{poll-widget.handlebars => poll_widget.hbs} (100%) rename static/templates/widgets/{poll-widget-results.handlebars => poll_widget_results.hbs} (100%) rename static/templates/widgets/{tictactoe-widget.handlebars => tictactoe_widget.hbs} (100%) rename static/templates/widgets/{todo-widget.handlebars => todo_widget.hbs} (100%) rename static/templates/widgets/{todo-widget-tasks.handlebars => todo_widget_tasks.hbs} (100%) rename static/templates/widgets/{zform-choices.handlebars => zform_choices.hbs} (100%) diff --git a/docs/contributing/code-style.md b/docs/contributing/code-style.md index f14dde4f03..eb9ec44959 100644 --- a/docs/contributing/code-style.md +++ b/docs/contributing/code-style.md @@ -236,7 +236,7 @@ functions or other arguments following them. Combine adjacent on-ready functions, if they are logically related. The best way to build complicated DOM elements is a Mustache template -like `static/templates/message_reactions.handlebars`. For simpler things +like `static/templates/message_reactions.hbs`. For simpler things you can use jQuery DOM building APIs like so: var new_tr = $('').attr('id', object.id); diff --git a/docs/subsystems/html-templates.md b/docs/subsystems/html-templates.md index 92b165cc0e..c70990a8d1 100644 --- a/docs/subsystems/html-templates.md +++ b/docs/subsystems/html-templates.md @@ -64,7 +64,7 @@ templates. In order to find the context definition, you should grep without using the file extension. For example, to find where -`invite_subscription.handlebars` is rendered, you should run something +`invite_subscription.hbs` is rendered, you should run something like this: ``` diff --git a/docs/tutorials/new-feature-tutorial.md b/docs/tutorials/new-feature-tutorial.md index 14773f6461..5bd3b8e09f 100644 --- a/docs/tutorials/new-feature-tutorial.md +++ b/docs/tutorials/new-feature-tutorial.md @@ -42,7 +42,7 @@ organization in Zulip). The following files are involved in the process: consistent and correct. **Frontend** -- `static/templates/settings/organization-permissions-admin.handlebars`: defines +- `static/templates/settings/organization_permissions_admin.hbs`: defines the structure of the admin permissions page (checkboxes for each organization permission setting). - `static/js/settings_org.js`: handles organization setting form submission. @@ -488,7 +488,7 @@ handled on the client. To add the checkbox to the admin page, modify the relevant template in `static/templates/settings/`, which can be -`organization-permissions-admin.handlebars` or `organization-settings-admin.handlebars` +`organization_permissions_admin.hbs` or `organization_settings_admin.hbs` (omitted here since it is relatively straightforward). Then add the new form control in `static/js/admin.js`. diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.js index 11bca18533..6168d79ea3 100644 --- a/frontend_tests/node_tests/compose.js +++ b/frontend_tests/node_tests/compose.js @@ -1086,7 +1086,7 @@ run_test('on_events', () => { var called; templates.render = function (template_name, context) { called = true; - assert.equal(template_name, 'compose-invite-users'); + assert.equal(template_name, 'compose_invite_users'); assert.equal(context.email, 'foo@bar.com'); assert.equal(context.name, 'Foo Barson'); return 'fake-compose-invite-user-template'; diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.js index 3a52460cb5..5718178817 100644 --- a/frontend_tests/node_tests/settings_org.js +++ b/frontend_tests/node_tests/settings_org.js @@ -36,7 +36,7 @@ const _channel = {}; const _templates = { render: function (name, data) { - if (name === 'settings/admin-realm-domains-list') { + if (name === 'settings/admin_realm_domains_list') { assert(data.realm_domain.domain); return 'stub-domains-list'; } diff --git a/frontend_tests/node_tests/templates.js b/frontend_tests/node_tests/templates.js index 7e1908005d..814d5f64ab 100644 --- a/frontend_tests/node_tests/templates.js +++ b/frontend_tests/node_tests/templates.js @@ -11,7 +11,7 @@ const { window } = new JSDOM(); global.$ = require('jquery')(window); // When writing these tests, the following command might be helpful: -// ./tools/get-handlebar-vars static/templates/*.handlebars +// ./tools/get-handlebar-vars static/templates/*.hbs function render(template_name, args) { return global.render_template(template_name, args); @@ -20,13 +20,13 @@ function render(template_name, args) { run_test('finding_partials', () => { var fns = global.find_included_partials('settings_tab'); assert.deepEqual(fns, [ - 'settings/account-settings', - 'settings/display-settings', - 'settings/notification-settings', - 'settings/bot-settings', - 'settings/alert-word-settings', - 'settings/attachments-settings', - 'settings/muted-topics-settings', + 'settings/account_settings', + 'settings/display_settings', + 'settings/notification_settings', + 'settings/bot_settings', + 'settings/alert_word_settings', + 'settings/attachments_settings', + 'settings/muted_topics_settings', ]); }); @@ -91,7 +91,7 @@ run_test('admin_realm_domains_list', () => { allow_subdomains: true, }, }; - html += render("settings/admin-realm-domains-list", args); + html += render("settings/admin_realm_domains_list", args); html += ""; var button = $(html).find('.button'); @@ -115,7 +115,7 @@ run_test('admin_realm_dropdown_stream_list', () => { stream_id: 18, }, }; - html += render("settings/admin-realm-dropdown-stream-list", args); + html += render("settings/admin_realm_dropdown_stream_list", args); html += ""; var link = $(html).find("a"); @@ -519,12 +519,12 @@ run_test('compose_invite_users', () => { name: 'Hamlet', can_subscribe_other_users: true, }; - var html = render('compose-invite-users', args); + var html = render('compose_invite_users', args); var button = $(html).find("button").first(); assert.equal(button.text(), "translated: Subscribe"); args.can_subscribe_other_users = false; - html = render('compose-invite-users', args); + html = render('compose_invite_users', args); button = $(html).find("button").first(); assert.equal(button.length, 0); }); @@ -590,7 +590,7 @@ run_test('compose_private_stream_alert', () => { run_test('custom_user_profile_field', () => { var field = {name: "GitHub user name", id: 2, hint: "Or link to profile"}; var args = {field: field, field_value: {value: "@GitHub", rendered_value: "

@GitHub

"}, field_type: "text"}; - var html = render('settings/custom-user-profile-field', args); + var html = render('settings/custom_user_profile_field', args); assert.equal($(html).attr('data-field-id'), 2); assert.equal($(html).find('.custom_user_field_value').val(), "@GitHub"); assert.equal($(html).find('.field_hint').text(), "Or link to profile"); @@ -602,7 +602,7 @@ run_test('deactivate_stream_modal', () => { stream_name: "Public stream", stream_id: 1, }; - var html = render('settings/deactivation-stream-modal', args); + var html = render('settings/deactivation_stream_modal', args); var modal_header = $(html).find("#deactivation_stream_modal_label"); assert.equal(modal_header.text(), "translated: Delete stream " + args.stream_name); @@ -1097,7 +1097,7 @@ run_test('revoke_invite_modal', () => { }; var html = "
"; - html += render('settings/revoke-invite-modal', args); + html += render('settings/revoke_invite_modal', args); html += "
"; assert.equal($(html).find("p strong").text(), "iago@zulip.com"); }); @@ -1471,7 +1471,7 @@ run_test('upload_space_stats', () => { percent_used: 50, upload_quota: "1 GB", }; - var html = render('settings/upload-space-stats', args); + var html = render('settings/upload_space_stats', args); assert.equal($(html).text().trim(), "translated: Organization using 50% of 1 GB.\n translated: Upgrade for more space."); args = { @@ -1479,7 +1479,7 @@ run_test('upload_space_stats', () => { percent_used: 10, upload_quota: "5 GB", }; - html = render('settings/upload-space-stats', args); + html = render('settings/upload_space_stats', args); assert.equal($(html).text().trim(), "translated: Organization using 10% of 5 GB."); }); @@ -1678,7 +1678,7 @@ run_test('edit_outgoing_webhook_service', () => { service: {base_url: "http://www.foo.bar", interface: "1"}, }; - var html = render('settings/edit-outgoing-webhook-service', args); + var html = render('settings/edit_outgoing_webhook_service', args); assert.equal($(html).find('#edit_service_base_url').val(), args.service.base_url); assert.equal($(html).find('#edit_service_interface').val(), args.service.interface); }); @@ -1688,7 +1688,7 @@ run_test('edit_embedded_bot_service', () => { service: {service_name: "giphy", config_data: {key: "abcd1234"}}, }; - var html = render('settings/edit-embedded-bot-service', args); + var html = render('settings/edit_embedded_bot_service', args); assert.equal($(html).find('#embedded_bot_key_edit').attr('name'), 'key'); assert.equal($(html).find('#embedded_bot_key_edit').val(), 'abcd1234'); }); diff --git a/frontend_tests/node_tests/voting_widget.js b/frontend_tests/node_tests/voting_widget.js index e73fff3e3b..19de15c8ec 100644 --- a/frontend_tests/node_tests/voting_widget.js +++ b/frontend_tests/node_tests/voting_widget.js @@ -141,11 +141,11 @@ run_test('poll_data_holder my question', () => { run_test('activate another person poll', () => { people.is_my_user_id = return_false; templates.render = (template_name) => { - if (template_name === 'widgets/poll-widget') { - return 'widgets/poll-widget'; + if (template_name === 'widgets/poll_widget') { + return 'widgets/poll_widget'; } - if (template_name === 'widgets/poll-widget-results') { - return 'widgets/poll-widget-results'; + if (template_name === 'widgets/poll_widget_results') { + return 'widgets/poll_widget_results'; } }; @@ -234,8 +234,8 @@ run_test('activate another person poll', () => { poll_widget.activate(opts); - assert.equal(widget_elem.html(), 'widgets/poll-widget'); - assert.equal(widget_option_container.html(), 'widgets/poll-widget-results'); + assert.equal(widget_elem.html(), 'widgets/poll_widget'); + assert.equal(widget_option_container.html(), 'widgets/poll_widget_results'); assert.equal(poll_question_header.text(), 'What do you want?'); const e = { @@ -306,11 +306,11 @@ run_test('activate own poll', () => { people.is_my_user_id = return_true; templates.render = (template_name) => { - if (template_name === 'widgets/poll-widget') { - return 'widgets/poll-widget'; + if (template_name === 'widgets/poll_widget') { + return 'widgets/poll_widget'; } - if (template_name === 'widgets/poll-widget-results') { - return 'widgets/poll-widget-results'; + if (template_name === 'widgets/poll_widget_results') { + return 'widgets/poll_widget_results'; } }; @@ -396,8 +396,8 @@ run_test('activate own poll', () => { poll_widget.activate(opts); - assert.equal(widget_elem.html(), 'widgets/poll-widget'); - assert.equal(widget_option_container.html(), 'widgets/poll-widget-results'); + assert.equal(widget_elem.html(), 'widgets/poll_widget'); + assert.equal(widget_option_container.html(), 'widgets/poll_widget_results'); assert.equal(poll_question_header.text(), 'Where to go?'); { diff --git a/frontend_tests/zjsunit/render.js b/frontend_tests/zjsunit/render.js index 77831e075b..7b45fa121a 100644 --- a/frontend_tests/zjsunit/render.js +++ b/frontend_tests/zjsunit/render.js @@ -68,7 +68,7 @@ exports.template_finder = (function () { // This class lets you find template files in our file system. // It may be slightly overkill for our flat directory system; // it might make more sense to just do something more like - // this: get_template_dir() + name + '.handlebars' + // this: get_template_dir() + name + '.hbs' var self = {}; @@ -76,12 +76,12 @@ exports.template_finder = (function () { var all_files = exports.walk(template_dir()); var files = all_files .filter(function (file) { - return (/\.handlebars$/).test(file.name); + return (/\.hbs$/).test(file.name); }) .map(function (file) { return { url: file.url, - name: file.name.replace(/\.handlebars$/, ""), + name: file.name.replace(/\.hbs$/, ""), }; }); diff --git a/static/js/attachments_ui.js b/static/js/attachments_ui.js index a45314b064..0d1dde7dba 100644 --- a/static/js/attachments_ui.js +++ b/static/js/attachments_ui.js @@ -38,7 +38,7 @@ function set_upload_space_stats() { percent_used: exports.percentage_used_space(upload_space_used), upload_quota: attachments_ui.bytes_to_size(page_params.realm_upload_quota, true), }; - var rendered_upload_stats_html = templates.render("settings/upload-space-stats", args); + var rendered_upload_stats_html = templates.render("settings/upload_space_stats", args); $("#attachment-stats-holder").html(rendered_upload_stats_html); } diff --git a/static/js/compose.js b/static/js/compose.js index 2f4c10ba60..a7f96a1389 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -835,7 +835,7 @@ exports.initialize = function () { name: data.mentioned.full_name, can_subscribe_other_users: page_params.can_subscribe_other_users, }; - var new_row = templates.render("compose-invite-users", context); + var new_row = templates.render("compose_invite_users", context); error_area.append(new_row); } diff --git a/static/js/poll_widget.js b/static/js/poll_widget.js index 15395f5aa3..a628b0b4b9 100644 --- a/static/js/poll_widget.js +++ b/static/js/poll_widget.js @@ -285,7 +285,7 @@ exports.activate = function (opts) { } function build_widget() { - var html = templates.render('widgets/poll-widget'); + var html = templates.render('widgets/poll_widget'); elem.html(html); elem.find('input.poll-question').on('keyup', function (e) { @@ -346,7 +346,7 @@ exports.activate = function (opts) { function render_results() { var widget_data = poll_data.get_widget_data(); - var html = templates.render('widgets/poll-widget-results', widget_data); + var html = templates.render('widgets/poll_widget_results', widget_data); elem.find('ul.poll-widget').html(html); elem.find("button.poll-vote").off('click').on('click', function (e) { diff --git a/static/js/settings_account.js b/static/js/settings_account.js index 59ad864d16..93b4c95712 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -110,7 +110,7 @@ exports.append_custom_profile_fields = function (element_id, user_id) { } } - var html = templates.render("settings/custom-user-profile-field", { + var html = templates.render("settings/custom_user_profile_field", { field: field, field_type: all_field_template_types[field.type], field_value: field_value, diff --git a/static/js/settings_bots.js b/static/js/settings_bots.js index 43f3ec6c32..f13ba21eee 100644 --- a/static/js/settings_bots.js +++ b/static/js/settings_bots.js @@ -401,12 +401,12 @@ exports.set_up = function () { $("#settings_page .edit_bot .edit-bot-owner select").val(bot.owner); var service = bot_data.get_services(bot_id)[0]; if (bot.bot_type.toString() === OUTGOING_WEBHOOK_BOT_TYPE) { - $("#service_data").append(templates.render("settings/edit-outgoing-webhook-service", + $("#service_data").append(templates.render("settings/edit_outgoing_webhook_service", {service: service})); $("#edit_service_interface").val(service.interface); } if (bot.bot_type.toString() === EMBEDDED_BOT_TYPE) { - $("#service_data").append(templates.render("settings/edit-embedded-bot-service", + $("#service_data").append(templates.render("settings/edit_embedded_bot_service", {service: service})); } diff --git a/static/js/settings_emoji.js b/static/js/settings_emoji.js index 901376be93..9a57610bd5 100644 --- a/static/js/settings_emoji.js +++ b/static/js/settings_emoji.js @@ -34,7 +34,7 @@ function can_admin_emoji(emoji) { } exports.update_custom_emoji_ui = function () { - var rendered_tip = templates.render("settings/emoji-settings-tip", { + var rendered_tip = templates.render("settings/emoji_settings_tip", { realm_add_emoji_by_admins_only: page_params.realm_add_emoji_by_admins_only, }); $('#emoji-settings').find('.emoji-settings-tip-container').html(rendered_tip); diff --git a/static/js/settings_invites.js b/static/js/settings_invites.js index 9f957c8460..855707fa9b 100644 --- a/static/js/settings_invites.js +++ b/static/js/settings_invites.js @@ -146,7 +146,7 @@ exports.on_load_success = function (invites_data, initialize_event_handlers) { meta.invite_id = $(e.currentTarget).attr("data-invite-id"); meta.is_multiuse = $(e.currentTarget).attr("data-is-multiuse"); var ctx = {is_multiuse: meta.is_multiuse === "true", email: email, referred_by: referred_by}; - var rendered_revoke_modal = templates.render("settings/revoke-invite-modal", ctx); + var rendered_revoke_modal = templates.render("settings/revoke_invite_modal", ctx); $("#revoke_invite_modal_holder").html(rendered_revoke_modal); $("#revoke_invite_modal #do_revoke_invite_button").attr("data-invite-id", meta.invite_id); $("#revoke_invite_modal #do_revoke_invite_button").attr("data-is-multiuse", meta.is_multiuse); diff --git a/static/js/settings_org.js b/static/js/settings_org.js index 0c719784d4..d76020faf1 100644 --- a/static/js/settings_org.js +++ b/static/js/settings_org.js @@ -325,7 +325,7 @@ exports.populate_realm_domains = function (realm_domains) { var realm_domains_table_body = $("#realm_domains_table tbody").expectOne(); realm_domains_table_body.find("tr").remove(); _.each(realm_domains, function (realm_domain) { - realm_domains_table_body.append(templates.render("settings/admin-realm-domains-list", {realm_domain: realm_domain})); + realm_domains_table_body.append(templates.render("settings/admin_realm_domains_list", {realm_domain: realm_domain})); }); }; function sort_object_by_key(obj) { @@ -357,7 +357,7 @@ function insert_tip_box() { if (page_params.is_admin) { return; } - var tip_box = templates.render("settings/organization-settings-tip", {is_admin: page_params.is_admin}); + var tip_box = templates.render("settings/organization_settings_tip", {is_admin: page_params.is_admin}); $(".organization-box").find(".settings-section:not(.can-edit)") .not("#emoji-settings") .not("#user-groups-admin") @@ -388,7 +388,7 @@ exports.populate_notifications_stream_dropdown = function (stream_list) { list_render.create(dropdown_list_body, stream_list, { name: "admin-realm-notifications-stream-dropdown-list", modifier: function (item) { - return templates.render("settings/admin-realm-dropdown-stream-list", { stream: item }); + return templates.render("settings/admin_realm_dropdown_stream_list", { stream: item }); }, filter: { element: search_input, @@ -417,7 +417,7 @@ exports.populate_signup_notifications_stream_dropdown = function (stream_list) { list_render.create(dropdown_list_body, stream_list, { name: "admin-realm-signup-notifications-stream-dropdown-list", modifier: function (item) { - return templates.render("settings/admin-realm-dropdown-stream-list", { stream: item }); + return templates.render("settings/admin_realm_dropdown_stream_list", { stream: item }); }, filter: { element: search_input, diff --git a/static/js/settings_profile_fields.js b/static/js/settings_profile_fields.js index 8b640faab3..2962bc8ee1 100644 --- a/static/js/settings_profile_fields.js +++ b/static/js/settings_profile_fields.js @@ -101,7 +101,7 @@ function update_choice_delete_btn(container, display_flag) { function create_choice_row(container) { var context = {}; - var row = templates.render("settings/profile-field-choice", context); + var row = templates.render("settings/profile_field_choice", context); $(container).append(row); } @@ -221,7 +221,7 @@ function set_up_choices_field_edit_form(profile_field, field_data) { _.each(choices_data, function (choice) { choice_list.append( - templates.render("settings/profile-field-choice", { + templates.render("settings/profile_field_choice", { text: choice.text, }) ); diff --git a/static/js/settings_users.js b/static/js/settings_users.js index 700e2575fd..2049d89ebd 100644 --- a/static/js/settings_users.js +++ b/static/js/settings_users.js @@ -244,7 +244,7 @@ exports.set_up = function () { }; function open_user_info_form_modal(person) { - var html = templates.render('user-info-form-modal', { + var html = templates.render('user_info_form_modal', { user_id: person.user_id, email: person.email, full_name: people.get_full_name(person.user_id), diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index 65f67f1a0e..459c864e23 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -617,7 +617,7 @@ exports.initialize = function () { return; } var stream_name = stream_data.maybe_get_stream_name(stream_id); - var deactivate_stream_modal = templates.render("settings/deactivation-stream-modal", { + var deactivate_stream_modal = templates.render("settings/deactivation_stream_modal", { stream_name: stream_name, stream_id: stream_id, }); diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js index f3f39a90f7..74e782838c 100644 --- a/static/js/stream_popover.js +++ b/static/js/stream_popover.js @@ -318,7 +318,7 @@ exports.register_stream_handlers = function () { e.preventDefault(); e.stopPropagation(); $(".left-sidebar-modal-holder").empty(); - $(".left-sidebar-modal-holder").html(templates.render("unstar-messages-modal")); + $(".left-sidebar-modal-holder").html(templates.render("unstar_messages_modal")); $("#unstar-messages-modal").modal("show"); }); diff --git a/static/js/templates.js b/static/js/templates.js index a86547aebb..0dfcf08211 100644 --- a/static/js/templates.js +++ b/static/js/templates.js @@ -5,10 +5,10 @@ var exports = {}; exports.render = function (name, arg) { var template; try { - template = require('../templates/' + name + '.handlebars'); + template = require('../templates/' + name + '.hbs'); } catch (_e) { throw new Error('Cannot find template static/templates/' + name - + '.handlebars.'); + + '.hbs.'); } return template(arg); diff --git a/static/js/tictactoe_widget.js b/static/js/tictactoe_widget.js index 89d7def044..333a956a7c 100644 --- a/static/js/tictactoe_widget.js +++ b/static/js/tictactoe_widget.js @@ -127,7 +127,7 @@ exports.activate = function (opts) { function render() { var widget_data = tictactoe_data.get_widget_data(); - var html = templates.render('widgets/tictactoe-widget', widget_data); + var html = templates.render('widgets/tictactoe_widget', widget_data); elem.html(html); elem.find("button.tictactoe-square").on('click', function (e) { diff --git a/static/js/todo_widget.js b/static/js/todo_widget.js index 9a003be97f..e129eaae29 100644 --- a/static/js/todo_widget.js +++ b/static/js/todo_widget.js @@ -122,7 +122,7 @@ exports.activate = function (opts) { var task_data = exports.task_data_holder(); function render() { - var html = templates.render('widgets/todo-widget'); + var html = templates.render('widgets/todo_widget'); elem.html(html); elem.find("button.add-task").on('click', function (e) { @@ -149,7 +149,7 @@ exports.activate = function (opts) { function render_results() { var widget_data = task_data.get_widget_data(); - var html = templates.render('widgets/todo-widget-tasks', widget_data); + var html = templates.render('widgets/todo_widget_tasks', widget_data); elem.find('ul.todo-widget').html(html); elem.find(".widget-error").text(''); diff --git a/static/js/zform.js b/static/js/zform.js index 8e62d1393a..40fdee586f 100644 --- a/static/js/zform.js +++ b/static/js/zform.js @@ -64,7 +64,7 @@ exports.activate = function (opts) { choice.idx = idx; }); - var html = templates.render('widgets/zform-choices', data); + var html = templates.render('widgets/zform_choices', data); var elem = $(html); elem.find('button').on('click', function (e) { diff --git a/static/templates/actions_popover_content.handlebars b/static/templates/actions_popover_content.hbs similarity index 100% rename from static/templates/actions_popover_content.handlebars rename to static/templates/actions_popover_content.hbs diff --git a/static/templates/admin-settings-modals.handlebars b/static/templates/admin-settings-modals.handlebars deleted file mode 100644 index 115f647779..0000000000 --- a/static/templates/admin-settings-modals.handlebars +++ /dev/null @@ -1,9 +0,0 @@ -{{ partial "settings/deactivation-user-modal" }} - -{{ partial "settings/realm-domains-modal" }} - -{{ partial "settings/revoke-invite-modal" }} - -{{ partial "settings/resend-invite-modal" }} - -
diff --git a/static/templates/admin_default_streams_list.handlebars b/static/templates/admin_default_streams_list.hbs similarity index 100% rename from static/templates/admin_default_streams_list.handlebars rename to static/templates/admin_default_streams_list.hbs diff --git a/static/templates/admin_emoji_list.handlebars b/static/templates/admin_emoji_list.hbs similarity index 100% rename from static/templates/admin_emoji_list.handlebars rename to static/templates/admin_emoji_list.hbs diff --git a/static/templates/admin_filter_list.handlebars b/static/templates/admin_filter_list.hbs similarity index 100% rename from static/templates/admin_filter_list.handlebars rename to static/templates/admin_filter_list.hbs diff --git a/static/templates/admin_invites_list.handlebars b/static/templates/admin_invites_list.hbs similarity index 100% rename from static/templates/admin_invites_list.handlebars rename to static/templates/admin_invites_list.hbs diff --git a/static/templates/admin_profile_field_list.handlebars b/static/templates/admin_profile_field_list.hbs similarity index 98% rename from static/templates/admin_profile_field_list.handlebars rename to static/templates/admin_profile_field_list.hbs index 0fd8fa0d04..106ea03551 100644 --- a/static/templates/admin_profile_field_list.handlebars +++ b/static/templates/admin_profile_field_list.hbs @@ -42,7 +42,7 @@
{{#each choices}} - {{partial "settings/profile-field-choice" }} + {{partial "settings/profile_field_choice" }} {{/each}}
diff --git a/static/templates/admin_settings_modals.hbs b/static/templates/admin_settings_modals.hbs new file mode 100644 index 0000000000..b8b033cfee --- /dev/null +++ b/static/templates/admin_settings_modals.hbs @@ -0,0 +1,9 @@ +{{ partial "settings/deactivation_user_modal" }} + +{{ partial "settings/realm_domains_modal" }} + +{{ partial "settings/revoke_invite_modal" }} + +{{ partial "settings/resend_invite_modal" }} + +
diff --git a/static/templates/admin_tab.handlebars b/static/templates/admin_tab.handlebars deleted file mode 100644 index 41c1298854..0000000000 --- a/static/templates/admin_tab.handlebars +++ /dev/null @@ -1,30 +0,0 @@ -
-
- -{{ partial "admin-settings-modals"}} - -{{ partial "settings/organization-profile-admin" }} - -{{ partial "settings/organization-settings-admin" }} - -{{ partial "settings/organization-permissions-admin" }} - -{{ partial "settings/emoji-settings-admin" }} - -{{ partial "settings/user-list-admin" }} - -{{ partial "settings/deactivated-users-admin" }} - -{{ partial "settings/bot-list-admin" }} - -{{ partial "settings/default-streams-list-admin" }} - -{{ partial "settings/auth-methods-settings-admin" }} - -{{ partial "settings/linkifier-settings-admin" }} - -{{ partial "settings/invites-list-admin" }} - -{{ partial "user-groups-admin" }} - -{{ partial "settings/profile-field-settings-admin" }} diff --git a/static/templates/admin_tab.hbs b/static/templates/admin_tab.hbs new file mode 100644 index 0000000000..d562f51132 --- /dev/null +++ b/static/templates/admin_tab.hbs @@ -0,0 +1,30 @@ +
+
+ +{{ partial "admin_settings_modals"}} + +{{ partial "settings/organization_profile_admin" }} + +{{ partial "settings/organization_settings_admin" }} + +{{ partial "settings/organization_permissions_admin" }} + +{{ partial "settings/emoji_settings_admin" }} + +{{ partial "settings/user_list_admin" }} + +{{ partial "settings/deactivated_users_admin" }} + +{{ partial "settings/bot_list_admin" }} + +{{ partial "settings/default_streams_list_admin" }} + +{{ partial "settings/auth_methods_settings_admin" }} + +{{ partial "settings/linkifier_settings_admin" }} + +{{ partial "settings/invites_list_admin" }} + +{{ partial "user_groups_admin" }} + +{{ partial "settings/profile_field_settings_admin" }} diff --git a/static/templates/admin_user_group_list.handlebars b/static/templates/admin_user_group_list.hbs similarity index 100% rename from static/templates/admin_user_group_list.handlebars rename to static/templates/admin_user_group_list.hbs diff --git a/static/templates/admin_user_list.handlebars b/static/templates/admin_user_list.hbs similarity index 100% rename from static/templates/admin_user_list.handlebars rename to static/templates/admin_user_list.hbs diff --git a/static/templates/alert_word_settings_item.handlebars b/static/templates/alert_word_settings_item.hbs similarity index 100% rename from static/templates/alert_word_settings_item.handlebars rename to static/templates/alert_word_settings_item.hbs diff --git a/static/templates/all_messages_sidebar_actions.handlebars b/static/templates/all_messages_sidebar_actions.hbs similarity index 100% rename from static/templates/all_messages_sidebar_actions.handlebars rename to static/templates/all_messages_sidebar_actions.hbs diff --git a/static/templates/announce_stream_docs.handlebars b/static/templates/announce_stream_docs.hbs similarity index 100% rename from static/templates/announce_stream_docs.handlebars rename to static/templates/announce_stream_docs.hbs diff --git a/static/templates/archive_message_group.handlebars b/static/templates/archive_message_group.hbs similarity index 100% rename from static/templates/archive_message_group.handlebars rename to static/templates/archive_message_group.hbs diff --git a/static/templates/archive_recipient_row.handlebars b/static/templates/archive_recipient_row.hbs similarity index 100% rename from static/templates/archive_recipient_row.handlebars rename to static/templates/archive_recipient_row.hbs diff --git a/static/templates/bankruptcy_modal.handlebars b/static/templates/bankruptcy_modal.hbs similarity index 100% rename from static/templates/bankruptcy_modal.handlebars rename to static/templates/bankruptcy_modal.hbs diff --git a/static/templates/bookend.handlebars b/static/templates/bookend.hbs similarity index 100% rename from static/templates/bookend.handlebars rename to static/templates/bookend.hbs diff --git a/static/templates/bot_avatar_row.handlebars b/static/templates/bot_avatar_row.hbs similarity index 100% rename from static/templates/bot_avatar_row.handlebars rename to static/templates/bot_avatar_row.hbs diff --git a/static/templates/bot_owner_select.handlebars b/static/templates/bot_owner_select.hbs similarity index 100% rename from static/templates/bot_owner_select.handlebars rename to static/templates/bot_owner_select.hbs diff --git a/static/templates/compose_all_everyone.handlebars b/static/templates/compose_all_everyone.hbs similarity index 100% rename from static/templates/compose_all_everyone.handlebars rename to static/templates/compose_all_everyone.hbs diff --git a/static/templates/compose_announce.handlebars b/static/templates/compose_announce.hbs similarity index 100% rename from static/templates/compose_announce.handlebars rename to static/templates/compose_announce.hbs diff --git a/static/templates/compose-invite-users.handlebars b/static/templates/compose_invite_users.hbs similarity index 100% rename from static/templates/compose-invite-users.handlebars rename to static/templates/compose_invite_users.hbs diff --git a/static/templates/compose_not_subscribed.handlebars b/static/templates/compose_not_subscribed.hbs similarity index 100% rename from static/templates/compose_not_subscribed.handlebars rename to static/templates/compose_not_subscribed.hbs diff --git a/static/templates/compose_notification.handlebars b/static/templates/compose_notification.hbs similarity index 100% rename from static/templates/compose_notification.handlebars rename to static/templates/compose_notification.hbs diff --git a/static/templates/compose_private_stream_alert.handlebars b/static/templates/compose_private_stream_alert.hbs similarity index 100% rename from static/templates/compose_private_stream_alert.handlebars rename to static/templates/compose_private_stream_alert.hbs diff --git a/static/templates/confirm_delete_user.handlebars b/static/templates/confirm_delete_user.hbs similarity index 100% rename from static/templates/confirm_delete_user.handlebars rename to static/templates/confirm_delete_user.hbs diff --git a/static/templates/confirm_dialog.handlebars b/static/templates/confirm_dialog.hbs similarity index 100% rename from static/templates/confirm_dialog.handlebars rename to static/templates/confirm_dialog.hbs diff --git a/static/templates/default_language_modal.handlebars b/static/templates/default_language_modal.hbs similarity index 100% rename from static/templates/default_language_modal.handlebars rename to static/templates/default_language_modal.hbs diff --git a/static/templates/delete_topic_modal.handlebars b/static/templates/delete_topic_modal.hbs similarity index 100% rename from static/templates/delete_topic_modal.handlebars rename to static/templates/delete_topic_modal.hbs diff --git a/static/templates/draft.handlebars b/static/templates/draft.hbs similarity index 100% rename from static/templates/draft.handlebars rename to static/templates/draft.hbs diff --git a/static/templates/draft_table_body.handlebars b/static/templates/draft_table_body.hbs similarity index 100% rename from static/templates/draft_table_body.handlebars rename to static/templates/draft_table_body.hbs diff --git a/static/templates/edit_bot.handlebars b/static/templates/edit_bot.hbs similarity index 100% rename from static/templates/edit_bot.handlebars rename to static/templates/edit_bot.hbs diff --git a/static/templates/edited_notice.handlebars b/static/templates/edited_notice.hbs similarity index 100% rename from static/templates/edited_notice.handlebars rename to static/templates/edited_notice.hbs diff --git a/static/templates/email_address_hint.handlebars b/static/templates/email_address_hint.hbs similarity index 100% rename from static/templates/email_address_hint.handlebars rename to static/templates/email_address_hint.hbs diff --git a/static/templates/embedded_bot_config_item.handlebars b/static/templates/embedded_bot_config_item.hbs similarity index 100% rename from static/templates/embedded_bot_config_item.handlebars rename to static/templates/embedded_bot_config_item.hbs diff --git a/static/templates/emoji_popover.handlebars b/static/templates/emoji_popover.hbs similarity index 100% rename from static/templates/emoji_popover.handlebars rename to static/templates/emoji_popover.hbs diff --git a/static/templates/emoji_popover_content.handlebars b/static/templates/emoji_popover_content.hbs similarity index 100% rename from static/templates/emoji_popover_content.handlebars rename to static/templates/emoji_popover_content.hbs diff --git a/static/templates/emoji_popover_emoji.handlebars b/static/templates/emoji_popover_emoji.hbs similarity index 100% rename from static/templates/emoji_popover_emoji.handlebars rename to static/templates/emoji_popover_emoji.hbs diff --git a/static/templates/emoji_popover_search_results.handlebars b/static/templates/emoji_popover_search_results.hbs similarity index 100% rename from static/templates/emoji_popover_search_results.handlebars rename to static/templates/emoji_popover_search_results.hbs diff --git a/static/templates/emoji_showcase.handlebars b/static/templates/emoji_showcase.hbs similarity index 100% rename from static/templates/emoji_showcase.handlebars rename to static/templates/emoji_showcase.hbs diff --git a/static/templates/feedback_container.handlebars b/static/templates/feedback_container.hbs similarity index 100% rename from static/templates/feedback_container.handlebars rename to static/templates/feedback_container.hbs diff --git a/static/templates/group_pms.handlebars b/static/templates/group_pms.hbs similarity index 100% rename from static/templates/group_pms.handlebars rename to static/templates/group_pms.hbs diff --git a/static/templates/hotspot_overlay.handlebars b/static/templates/hotspot_overlay.hbs similarity index 100% rename from static/templates/hotspot_overlay.handlebars rename to static/templates/hotspot_overlay.hbs diff --git a/static/templates/input_pill.handlebars b/static/templates/input_pill.hbs similarity index 100% rename from static/templates/input_pill.handlebars rename to static/templates/input_pill.hbs diff --git a/static/templates/intro_reply_hotspot.handlebars b/static/templates/intro_reply_hotspot.hbs similarity index 100% rename from static/templates/intro_reply_hotspot.handlebars rename to static/templates/intro_reply_hotspot.hbs diff --git a/static/templates/invitation_failed_error.handlebars b/static/templates/invitation_failed_error.hbs similarity index 100% rename from static/templates/invitation_failed_error.handlebars rename to static/templates/invitation_failed_error.hbs diff --git a/static/templates/invite_subscription.handlebars b/static/templates/invite_subscription.hbs similarity index 100% rename from static/templates/invite_subscription.handlebars rename to static/templates/invite_subscription.hbs diff --git a/static/templates/loader.handlebars b/static/templates/loader.hbs similarity index 100% rename from static/templates/loader.handlebars rename to static/templates/loader.hbs diff --git a/static/templates/me_message.handlebars b/static/templates/me_message.hbs similarity index 100% rename from static/templates/me_message.handlebars rename to static/templates/me_message.hbs diff --git a/static/templates/message_avatar.handlebars b/static/templates/message_avatar.hbs similarity index 100% rename from static/templates/message_avatar.handlebars rename to static/templates/message_avatar.hbs diff --git a/static/templates/message_body.handlebars b/static/templates/message_body.hbs similarity index 100% rename from static/templates/message_body.handlebars rename to static/templates/message_body.hbs diff --git a/static/templates/message_controls.handlebars b/static/templates/message_controls.hbs similarity index 100% rename from static/templates/message_controls.handlebars rename to static/templates/message_controls.hbs diff --git a/static/templates/message_edit_form.handlebars b/static/templates/message_edit_form.hbs similarity index 100% rename from static/templates/message_edit_form.handlebars rename to static/templates/message_edit_form.hbs diff --git a/static/templates/message_edit_history.handlebars b/static/templates/message_edit_history.hbs similarity index 100% rename from static/templates/message_edit_history.handlebars rename to static/templates/message_edit_history.hbs diff --git a/static/templates/message_group.handlebars b/static/templates/message_group.hbs similarity index 100% rename from static/templates/message_group.handlebars rename to static/templates/message_group.hbs diff --git a/static/templates/message_reaction.handlebars b/static/templates/message_reaction.hbs similarity index 100% rename from static/templates/message_reaction.handlebars rename to static/templates/message_reaction.hbs diff --git a/static/templates/message_reactions.handlebars b/static/templates/message_reactions.hbs similarity index 100% rename from static/templates/message_reactions.handlebars rename to static/templates/message_reactions.hbs diff --git a/static/templates/mobile_message_buttons_popover.handlebars b/static/templates/mobile_message_buttons_popover.hbs similarity index 100% rename from static/templates/mobile_message_buttons_popover.handlebars rename to static/templates/mobile_message_buttons_popover.hbs diff --git a/static/templates/mobile_message_buttons_popover_content.handlebars b/static/templates/mobile_message_buttons_popover_content.hbs similarity index 100% rename from static/templates/mobile_message_buttons_popover_content.handlebars rename to static/templates/mobile_message_buttons_popover_content.hbs diff --git a/static/templates/more_topics.handlebars b/static/templates/more_topics.hbs similarity index 100% rename from static/templates/more_topics.handlebars rename to static/templates/more_topics.hbs diff --git a/static/templates/muted_topic_ui_row.handlebars b/static/templates/muted_topic_ui_row.hbs similarity index 100% rename from static/templates/muted_topic_ui_row.handlebars rename to static/templates/muted_topic_ui_row.hbs diff --git a/static/templates/new_stream_users.handlebars b/static/templates/new_stream_users.hbs similarity index 100% rename from static/templates/new_stream_users.handlebars rename to static/templates/new_stream_users.hbs diff --git a/static/templates/no_arrow_popover.handlebars b/static/templates/no_arrow_popover.hbs similarity index 100% rename from static/templates/no_arrow_popover.handlebars rename to static/templates/no_arrow_popover.hbs diff --git a/static/templates/non_editable_user_group.handlebars b/static/templates/non_editable_user_group.hbs similarity index 100% rename from static/templates/non_editable_user_group.handlebars rename to static/templates/non_editable_user_group.hbs diff --git a/static/templates/notification.handlebars b/static/templates/notification.hbs similarity index 100% rename from static/templates/notification.handlebars rename to static/templates/notification.hbs diff --git a/static/templates/recipient_row.handlebars b/static/templates/recipient_row.hbs similarity index 100% rename from static/templates/recipient_row.handlebars rename to static/templates/recipient_row.hbs diff --git a/static/templates/remind_me_popover_content.handlebars b/static/templates/remind_me_popover_content.hbs similarity index 100% rename from static/templates/remind_me_popover_content.handlebars rename to static/templates/remind_me_popover_content.hbs diff --git a/static/templates/settings/account-settings.handlebars b/static/templates/settings/account_settings.hbs similarity index 100% rename from static/templates/settings/account-settings.handlebars rename to static/templates/settings/account_settings.hbs diff --git a/static/templates/settings/admin_auth_methods_list.handlebars b/static/templates/settings/admin_auth_methods_list.hbs similarity index 100% rename from static/templates/settings/admin_auth_methods_list.handlebars rename to static/templates/settings/admin_auth_methods_list.hbs diff --git a/static/templates/settings/admin-realm-domains-list.handlebars b/static/templates/settings/admin_realm_domains_list.hbs similarity index 100% rename from static/templates/settings/admin-realm-domains-list.handlebars rename to static/templates/settings/admin_realm_domains_list.hbs diff --git a/static/templates/settings/admin-realm-dropdown-stream-list.handlebars b/static/templates/settings/admin_realm_dropdown_stream_list.hbs similarity index 100% rename from static/templates/settings/admin-realm-dropdown-stream-list.handlebars rename to static/templates/settings/admin_realm_dropdown_stream_list.hbs diff --git a/static/templates/settings/alert-word-settings.handlebars b/static/templates/settings/alert_word_settings.hbs similarity index 100% rename from static/templates/settings/alert-word-settings.handlebars rename to static/templates/settings/alert_word_settings.hbs diff --git a/static/templates/settings/attachments-settings.handlebars b/static/templates/settings/attachments_settings.hbs similarity index 100% rename from static/templates/settings/attachments-settings.handlebars rename to static/templates/settings/attachments_settings.hbs diff --git a/static/templates/settings/auth-methods-settings-admin.handlebars b/static/templates/settings/auth_methods_settings_admin.hbs similarity index 93% rename from static/templates/settings/auth-methods-settings-admin.handlebars rename to static/templates/settings/auth_methods_settings_admin.hbs index 4d787014eb..356c57ac47 100644 --- a/static/templates/settings/auth-methods-settings-admin.handlebars +++ b/static/templates/settings/auth_methods_settings_admin.hbs @@ -3,7 +3,7 @@

{{t "Authentication methods" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "auth_settings" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "auth_settings" }}
diff --git a/static/templates/settings/bot-list-admin.handlebars b/static/templates/settings/bot_list_admin.hbs similarity index 100% rename from static/templates/settings/bot-list-admin.handlebars rename to static/templates/settings/bot_list_admin.hbs diff --git a/static/templates/settings/bot-settings.handlebars b/static/templates/settings/bot_settings.hbs similarity index 100% rename from static/templates/settings/bot-settings.handlebars rename to static/templates/settings/bot_settings.hbs diff --git a/static/templates/settings/custom-user-profile-field.handlebars b/static/templates/settings/custom_user_profile_field.hbs similarity index 100% rename from static/templates/settings/custom-user-profile-field.handlebars rename to static/templates/settings/custom_user_profile_field.hbs diff --git a/static/templates/settings/deactivate-realm-modal.handlebars b/static/templates/settings/deactivate_realm_modal.hbs similarity index 100% rename from static/templates/settings/deactivate-realm-modal.handlebars rename to static/templates/settings/deactivate_realm_modal.hbs diff --git a/static/templates/settings/deactivated-users-admin.handlebars b/static/templates/settings/deactivated_users_admin.hbs similarity index 100% rename from static/templates/settings/deactivated-users-admin.handlebars rename to static/templates/settings/deactivated_users_admin.hbs diff --git a/static/templates/settings/deactivation-stream-modal.handlebars b/static/templates/settings/deactivation_stream_modal.hbs similarity index 100% rename from static/templates/settings/deactivation-stream-modal.handlebars rename to static/templates/settings/deactivation_stream_modal.hbs diff --git a/static/templates/settings/deactivation-user-modal.handlebars b/static/templates/settings/deactivation_user_modal.hbs similarity index 100% rename from static/templates/settings/deactivation-user-modal.handlebars rename to static/templates/settings/deactivation_user_modal.hbs diff --git a/static/templates/settings/default-streams-list-admin.handlebars b/static/templates/settings/default_streams_list_admin.hbs similarity index 100% rename from static/templates/settings/default-streams-list-admin.handlebars rename to static/templates/settings/default_streams_list_admin.hbs diff --git a/static/templates/settings/dev_env_email_access.handlebars b/static/templates/settings/dev_env_email_access.hbs similarity index 100% rename from static/templates/settings/dev_env_email_access.handlebars rename to static/templates/settings/dev_env_email_access.hbs diff --git a/static/templates/settings/display-settings.handlebars b/static/templates/settings/display_settings.hbs similarity index 100% rename from static/templates/settings/display-settings.handlebars rename to static/templates/settings/display_settings.hbs diff --git a/static/templates/settings/edit-embedded-bot-service.handlebars b/static/templates/settings/edit_embedded_bot_service.hbs similarity index 100% rename from static/templates/settings/edit-embedded-bot-service.handlebars rename to static/templates/settings/edit_embedded_bot_service.hbs diff --git a/static/templates/settings/edit-outgoing-webhook-service.handlebars b/static/templates/settings/edit_outgoing_webhook_service.hbs similarity index 100% rename from static/templates/settings/edit-outgoing-webhook-service.handlebars rename to static/templates/settings/edit_outgoing_webhook_service.hbs diff --git a/static/templates/settings/emoji-settings-admin.handlebars b/static/templates/settings/emoji_settings_admin.hbs similarity index 97% rename from static/templates/settings/emoji-settings-admin.handlebars rename to static/templates/settings/emoji_settings_admin.hbs index b64b654fad..e6f18483ef 100644 --- a/static/templates/settings/emoji-settings-admin.handlebars +++ b/static/templates/settings/emoji_settings_admin.hbs @@ -1,6 +1,6 @@
- {{partial "settings/emoji-settings-tip"}} + {{partial "settings/emoji_settings_tip"}}
diff --git a/static/templates/settings/emoji-settings-tip.handlebars b/static/templates/settings/emoji_settings_tip.hbs similarity index 100% rename from static/templates/settings/emoji-settings-tip.handlebars rename to static/templates/settings/emoji_settings_tip.hbs diff --git a/static/templates/settings/invites-list-admin.handlebars b/static/templates/settings/invites_list_admin.hbs similarity index 100% rename from static/templates/settings/invites-list-admin.handlebars rename to static/templates/settings/invites_list_admin.hbs diff --git a/static/templates/settings/linkifier-settings-admin.handlebars b/static/templates/settings/linkifier_settings_admin.hbs similarity index 100% rename from static/templates/settings/linkifier-settings-admin.handlebars rename to static/templates/settings/linkifier_settings_admin.hbs diff --git a/static/templates/settings/muted-topics-settings.handlebars b/static/templates/settings/muted_topics_settings.hbs similarity index 100% rename from static/templates/settings/muted-topics-settings.handlebars rename to static/templates/settings/muted_topics_settings.hbs diff --git a/static/templates/settings/notification-settings.handlebars b/static/templates/settings/notification_settings.hbs similarity index 100% rename from static/templates/settings/notification-settings.handlebars rename to static/templates/settings/notification_settings.hbs diff --git a/static/templates/settings/organization-permissions-admin.handlebars b/static/templates/settings/organization_permissions_admin.hbs similarity index 97% rename from static/templates/settings/organization-permissions-admin.handlebars rename to static/templates/settings/organization_permissions_admin.hbs index e759b10f42..697d710aa6 100644 --- a/static/templates/settings/organization-permissions-admin.handlebars +++ b/static/templates/settings/organization_permissions_admin.hbs @@ -4,7 +4,7 @@

{{t "Joining the organization" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "org-join" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "org-join" }}
@@ -36,7 +36,7 @@

{{t "User identity" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "user-identity" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "user-identity" }}
{{partial "settings/settings_checkbox" @@ -62,7 +62,7 @@

{{t "Other permissions" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "other-permissions" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "other-permissions" }}
diff --git a/static/templates/settings/organization-profile-admin.handlebars b/static/templates/settings/organization_profile_admin.hbs similarity index 98% rename from static/templates/settings/organization-profile-admin.handlebars rename to static/templates/settings/organization_profile_admin.hbs index 51a22f98aa..c7bd4c5384 100644 --- a/static/templates/settings/organization-profile-admin.handlebars +++ b/static/templates/settings/organization_profile_admin.hbs @@ -9,7 +9,7 @@ - {{ partial "settings/settings-save-discard-widget" "section_name" "org-profile" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "org-profile" }}
@@ -116,7 +116,7 @@ {{t 'Deactivate organization' }}
- {{ partial "settings/deactivate-realm-modal"}} + {{ partial "settings/deactivate_realm_modal"}}
diff --git a/static/templates/settings/organization-settings-admin.handlebars b/static/templates/settings/organization_settings_admin.hbs similarity index 98% rename from static/templates/settings/organization-settings-admin.handlebars rename to static/templates/settings/organization_settings_admin.hbs index c60a4c6dc7..3f8e488a8d 100644 --- a/static/templates/settings/organization-settings-admin.handlebars +++ b/static/templates/settings/organization_settings_admin.hbs @@ -10,7 +10,7 @@ - {{ partial "settings/settings-save-discard-widget" "section_name" "msg-editing" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "msg-editing" }}
@@ -72,7 +72,7 @@

{{t "Notifications" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "notifications" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "notifications" }}
{{partial "settings/settings_checkbox" @@ -152,7 +152,7 @@

{{t "Default user settings" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "user-defaults" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "user-defaults" }}

{{t "Default settings for new users joining this organization." }}

@@ -175,7 +175,7 @@

{{t "Other settings" }}

- {{ partial "settings/settings-save-discard-widget" "section_name" "other-settings" }} + {{ partial "settings/settings_save_discard_widget" "section_name" "other-settings" }}
diff --git a/static/templates/settings/organization-settings-tip.handlebars b/static/templates/settings/organization_settings_tip.hbs similarity index 100% rename from static/templates/settings/organization-settings-tip.handlebars rename to static/templates/settings/organization_settings_tip.hbs diff --git a/static/templates/settings/profile-field-choice.handlebars b/static/templates/settings/profile_field_choice.hbs similarity index 100% rename from static/templates/settings/profile-field-choice.handlebars rename to static/templates/settings/profile_field_choice.hbs diff --git a/static/templates/settings/profile-field-settings-admin.handlebars b/static/templates/settings/profile_field_settings_admin.hbs similarity index 100% rename from static/templates/settings/profile-field-settings-admin.handlebars rename to static/templates/settings/profile_field_settings_admin.hbs diff --git a/static/templates/settings/realm-domains-modal.handlebars b/static/templates/settings/realm_domains_modal.hbs similarity index 100% rename from static/templates/settings/realm-domains-modal.handlebars rename to static/templates/settings/realm_domains_modal.hbs diff --git a/static/templates/settings/resend-invite-modal.handlebars b/static/templates/settings/resend_invite_modal.hbs similarity index 100% rename from static/templates/settings/resend-invite-modal.handlebars rename to static/templates/settings/resend_invite_modal.hbs diff --git a/static/templates/settings/revoke-invite-modal.handlebars b/static/templates/settings/revoke_invite_modal.hbs similarity index 100% rename from static/templates/settings/revoke-invite-modal.handlebars rename to static/templates/settings/revoke_invite_modal.hbs diff --git a/static/templates/settings/settings_checkbox.handlebars b/static/templates/settings/settings_checkbox.hbs similarity index 100% rename from static/templates/settings/settings_checkbox.handlebars rename to static/templates/settings/settings_checkbox.hbs diff --git a/static/templates/settings/settings-save-discard-widget.handlebars b/static/templates/settings/settings_save_discard_widget.hbs similarity index 100% rename from static/templates/settings/settings-save-discard-widget.handlebars rename to static/templates/settings/settings_save_discard_widget.hbs diff --git a/static/templates/settings/upload-space-stats.handlebars b/static/templates/settings/upload_space_stats.hbs similarity index 100% rename from static/templates/settings/upload-space-stats.handlebars rename to static/templates/settings/upload_space_stats.hbs diff --git a/static/templates/settings/user-list-admin.handlebars b/static/templates/settings/user_list_admin.hbs similarity index 100% rename from static/templates/settings/user-list-admin.handlebars rename to static/templates/settings/user_list_admin.hbs diff --git a/static/templates/settings_tab.handlebars b/static/templates/settings_tab.handlebars deleted file mode 100644 index d9f41b6cf4..0000000000 --- a/static/templates/settings_tab.handlebars +++ /dev/null @@ -1,15 +0,0 @@ -
- {{ partial "settings/account-settings" }} - - {{ partial "settings/display-settings" }} - - {{ partial "settings/notification-settings" }} - - {{ partial "settings/bot-settings" }} - - {{ partial "settings/alert-word-settings" }} - - {{ partial "settings/attachments-settings" }} - - {{ partial "settings/muted-topics-settings" }} -
diff --git a/static/templates/settings_tab.hbs b/static/templates/settings_tab.hbs new file mode 100644 index 0000000000..bc6d6e29ae --- /dev/null +++ b/static/templates/settings_tab.hbs @@ -0,0 +1,15 @@ +
+ {{ partial "settings/account_settings" }} + + {{ partial "settings/display_settings" }} + + {{ partial "settings/notification_settings" }} + + {{ partial "settings/bot_settings" }} + + {{ partial "settings/alert_word_settings" }} + + {{ partial "settings/attachments_settings" }} + + {{ partial "settings/muted_topics_settings" }} +
diff --git a/static/templates/sidebar_private_message_list.handlebars b/static/templates/sidebar_private_message_list.hbs similarity index 100% rename from static/templates/sidebar_private_message_list.handlebars rename to static/templates/sidebar_private_message_list.hbs diff --git a/static/templates/single_message.handlebars b/static/templates/single_message.hbs similarity index 100% rename from static/templates/single_message.handlebars rename to static/templates/single_message.hbs diff --git a/static/templates/starred_messages_sidebar_actions.handlebars b/static/templates/starred_messages_sidebar_actions.hbs similarity index 100% rename from static/templates/starred_messages_sidebar_actions.handlebars rename to static/templates/starred_messages_sidebar_actions.hbs diff --git a/static/templates/stream_creation_form.handlebars b/static/templates/stream_creation_form.hbs similarity index 100% rename from static/templates/stream_creation_form.handlebars rename to static/templates/stream_creation_form.hbs diff --git a/static/templates/stream_member_list_entry.handlebars b/static/templates/stream_member_list_entry.hbs similarity index 100% rename from static/templates/stream_member_list_entry.handlebars rename to static/templates/stream_member_list_entry.hbs diff --git a/static/templates/stream_privacy.handlebars b/static/templates/stream_privacy.hbs similarity index 100% rename from static/templates/stream_privacy.handlebars rename to static/templates/stream_privacy.hbs diff --git a/static/templates/stream-settings-checkbox.handlebars b/static/templates/stream_settings_checkbox.hbs similarity index 100% rename from static/templates/stream-settings-checkbox.handlebars rename to static/templates/stream_settings_checkbox.hbs diff --git a/static/templates/stream_sidebar_actions.handlebars b/static/templates/stream_sidebar_actions.hbs similarity index 100% rename from static/templates/stream_sidebar_actions.handlebars rename to static/templates/stream_sidebar_actions.hbs diff --git a/static/templates/stream_sidebar_row.handlebars b/static/templates/stream_sidebar_row.hbs similarity index 100% rename from static/templates/stream_sidebar_row.handlebars rename to static/templates/stream_sidebar_row.hbs diff --git a/static/templates/stream_types.handlebars b/static/templates/stream_types.hbs similarity index 100% rename from static/templates/stream_types.handlebars rename to static/templates/stream_types.hbs diff --git a/static/templates/subscription.handlebars b/static/templates/subscription.hbs similarity index 100% rename from static/templates/subscription.handlebars rename to static/templates/subscription.hbs diff --git a/static/templates/subscription_count.handlebars b/static/templates/subscription_count.hbs similarity index 100% rename from static/templates/subscription_count.handlebars rename to static/templates/subscription_count.hbs diff --git a/static/templates/subscription_invites_warning_modal.handlebars b/static/templates/subscription_invites_warning_modal.hbs similarity index 100% rename from static/templates/subscription_invites_warning_modal.handlebars rename to static/templates/subscription_invites_warning_modal.hbs diff --git a/static/templates/subscription_members.handlebars b/static/templates/subscription_members.hbs similarity index 100% rename from static/templates/subscription_members.handlebars rename to static/templates/subscription_members.hbs diff --git a/static/templates/subscription_setting_icon.handlebars b/static/templates/subscription_setting_icon.hbs similarity index 100% rename from static/templates/subscription_setting_icon.handlebars rename to static/templates/subscription_setting_icon.hbs diff --git a/static/templates/subscription_settings.handlebars b/static/templates/subscription_settings.hbs similarity index 98% rename from static/templates/subscription_settings.handlebars rename to static/templates/subscription_settings.hbs index 5e331bcf19..0c25158b67 100644 --- a/static/templates/subscription_settings.handlebars +++ b/static/templates/subscription_settings.hbs @@ -51,7 +51,7 @@
    {{#each settings}}
  • - {{partial "stream-settings-checkbox" + {{partial "stream_settings_checkbox" "setting_name" name "prefix" "sub_" "suffix" "_setting" diff --git a/static/templates/subscription_stream_privacy_modal.handlebars b/static/templates/subscription_stream_privacy_modal.hbs similarity index 100% rename from static/templates/subscription_stream_privacy_modal.handlebars rename to static/templates/subscription_stream_privacy_modal.hbs diff --git a/static/templates/subscription_table_body.handlebars b/static/templates/subscription_table_body.hbs similarity index 100% rename from static/templates/subscription_table_body.handlebars rename to static/templates/subscription_table_body.hbs diff --git a/static/templates/subscription_type.handlebars b/static/templates/subscription_type.hbs similarity index 100% rename from static/templates/subscription_type.handlebars rename to static/templates/subscription_type.hbs diff --git a/static/templates/subscriptions.handlebars b/static/templates/subscriptions.hbs similarity index 100% rename from static/templates/subscriptions.handlebars rename to static/templates/subscriptions.hbs diff --git a/static/templates/tab_bar.handlebars b/static/templates/tab_bar.hbs similarity index 100% rename from static/templates/tab_bar.handlebars rename to static/templates/tab_bar.hbs diff --git a/static/templates/topic_edit_form.handlebars b/static/templates/topic_edit_form.hbs similarity index 100% rename from static/templates/topic_edit_form.handlebars rename to static/templates/topic_edit_form.hbs diff --git a/static/templates/topic_list_item.handlebars b/static/templates/topic_list_item.hbs similarity index 100% rename from static/templates/topic_list_item.handlebars rename to static/templates/topic_list_item.hbs diff --git a/static/templates/topic_muted.handlebars b/static/templates/topic_muted.hbs similarity index 100% rename from static/templates/topic_muted.handlebars rename to static/templates/topic_muted.hbs diff --git a/static/templates/topic_sidebar_actions.handlebars b/static/templates/topic_sidebar_actions.hbs similarity index 100% rename from static/templates/topic_sidebar_actions.handlebars rename to static/templates/topic_sidebar_actions.hbs diff --git a/static/templates/typeahead_list_item.handlebars b/static/templates/typeahead_list_item.hbs similarity index 100% rename from static/templates/typeahead_list_item.handlebars rename to static/templates/typeahead_list_item.hbs diff --git a/static/templates/typing_notification.handlebars b/static/templates/typing_notification.hbs similarity index 100% rename from static/templates/typing_notification.handlebars rename to static/templates/typing_notification.hbs diff --git a/static/templates/typing_notifications.handlebars b/static/templates/typing_notifications.hbs similarity index 100% rename from static/templates/typing_notifications.handlebars rename to static/templates/typing_notifications.hbs diff --git a/static/templates/unstar-messages-modal.handlebars b/static/templates/unstar_messages_modal.hbs similarity index 100% rename from static/templates/unstar-messages-modal.handlebars rename to static/templates/unstar_messages_modal.hbs diff --git a/static/templates/uploaded_files_list.handlebars b/static/templates/uploaded_files_list.hbs similarity index 100% rename from static/templates/uploaded_files_list.handlebars rename to static/templates/uploaded_files_list.hbs diff --git a/static/templates/user_group_info_popover.handlebars b/static/templates/user_group_info_popover.hbs similarity index 100% rename from static/templates/user_group_info_popover.handlebars rename to static/templates/user_group_info_popover.hbs diff --git a/static/templates/user_group_info_popover_content.handlebars b/static/templates/user_group_info_popover_content.hbs similarity index 100% rename from static/templates/user_group_info_popover_content.handlebars rename to static/templates/user_group_info_popover_content.hbs diff --git a/static/templates/user-groups-admin.handlebars b/static/templates/user_groups_admin.hbs similarity index 100% rename from static/templates/user-groups-admin.handlebars rename to static/templates/user_groups_admin.hbs diff --git a/static/templates/user-info-form-modal.handlebars b/static/templates/user_info_form_modal.hbs similarity index 100% rename from static/templates/user-info-form-modal.handlebars rename to static/templates/user_info_form_modal.hbs diff --git a/static/templates/user_info_popover_content.handlebars b/static/templates/user_info_popover_content.hbs similarity index 100% rename from static/templates/user_info_popover_content.handlebars rename to static/templates/user_info_popover_content.hbs diff --git a/static/templates/user_info_popover_title.handlebars b/static/templates/user_info_popover_title.hbs similarity index 100% rename from static/templates/user_info_popover_title.handlebars rename to static/templates/user_info_popover_title.hbs diff --git a/static/templates/user_presence_row.handlebars b/static/templates/user_presence_row.hbs similarity index 100% rename from static/templates/user_presence_row.handlebars rename to static/templates/user_presence_row.hbs diff --git a/static/templates/user_presence_rows.handlebars b/static/templates/user_presence_rows.hbs similarity index 100% rename from static/templates/user_presence_rows.handlebars rename to static/templates/user_presence_rows.hbs diff --git a/static/templates/user_profile_modal.handlebars b/static/templates/user_profile_modal.hbs similarity index 100% rename from static/templates/user_profile_modal.handlebars rename to static/templates/user_profile_modal.hbs diff --git a/static/templates/widgets/poll-widget.handlebars b/static/templates/widgets/poll_widget.hbs similarity index 100% rename from static/templates/widgets/poll-widget.handlebars rename to static/templates/widgets/poll_widget.hbs diff --git a/static/templates/widgets/poll-widget-results.handlebars b/static/templates/widgets/poll_widget_results.hbs similarity index 100% rename from static/templates/widgets/poll-widget-results.handlebars rename to static/templates/widgets/poll_widget_results.hbs diff --git a/static/templates/widgets/tictactoe-widget.handlebars b/static/templates/widgets/tictactoe_widget.hbs similarity index 100% rename from static/templates/widgets/tictactoe-widget.handlebars rename to static/templates/widgets/tictactoe_widget.hbs diff --git a/static/templates/widgets/todo-widget.handlebars b/static/templates/widgets/todo_widget.hbs similarity index 100% rename from static/templates/widgets/todo-widget.handlebars rename to static/templates/widgets/todo_widget.hbs diff --git a/static/templates/widgets/todo-widget-tasks.handlebars b/static/templates/widgets/todo_widget_tasks.hbs similarity index 100% rename from static/templates/widgets/todo-widget-tasks.handlebars rename to static/templates/widgets/todo_widget_tasks.hbs diff --git a/static/templates/widgets/zform-choices.handlebars b/static/templates/widgets/zform_choices.hbs similarity index 100% rename from static/templates/widgets/zform-choices.handlebars rename to static/templates/widgets/zform_choices.hbs diff --git a/tools/check-templates b/tools/check-templates index ad3cae16e5..72e735280a 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -27,10 +27,10 @@ def check_our_files(modified_only, all_dups, targets): lister.list_files( targets=targets, modified_only=args.modified, - ftypes=['handlebars', 'html'], + ftypes=['hbs', 'html'], group_by_ftype=True, exclude=EXCLUDED_FILES)) - check_handlebar_templates(by_lang['handlebars']) + check_handlebar_templates(by_lang['hbs']) check_html_templates(by_lang['html'], args.all_dups) def check_html_templates(templates, all_dups): @@ -145,11 +145,11 @@ def check_html_templates(templates, all_dups): def check_handlebar_templates(templates): # type: (Iterable[str]) -> None # Check all our handlebars templates. - templates = [fn for fn in templates if fn.endswith('.handlebars')] + templates = [fn for fn in templates if fn.endswith('.hbs')] IGNORE_FILES = [ # TODO: Add some exclude mechanism for the line-wrapping issue here. - 'static/templates/recipient_row.handlebars', + 'static/templates/recipient_row.hbs', ] for fn in templates: diff --git a/tools/html-grep b/tools/html-grep index 881aa41b9b..92adb24ff6 100755 --- a/tools/html-grep +++ b/tools/html-grep @@ -41,7 +41,7 @@ USAGE = ''' Finding files to search: The tool currently searches your git repo for files with - the extension .html or .handlebars., and then it does + the extension .html or .hbs., and then it does the grep against all those files. TODO: allow specific files to be searched.''' @@ -72,7 +72,7 @@ def check_our_files(): files = lister.list_files( modified_only=options.modified, - ftypes=['handlebars', 'html'], + ftypes=['hbs', 'html'], ) fns = [fn for fn in files if ('casperjs' not in fn) and ('puppet/zulip' not in fn)] diff --git a/tools/lint b/tools/lint index 65d351a42a..ae99681c2d 100755 --- a/tools/lint +++ b/tools/lint @@ -48,7 +48,7 @@ def run(): by_lang = linter_config.list_files(groups={ 'backend': ['py', 'sh', 'pp', 'json', 'md', 'txt', 'text', 'yaml', 'rst'], - 'frontend': ['js', 'ts', 'css', 'scss', 'handlebars', 'html'], + 'frontend': ['js', 'ts', 'css', 'scss', 'hbs', 'html'], }, exclude=EXCLUDED_FILES) linter_config.external_linter('add_class', ['tools/find-add-class'], ['js'], @@ -70,7 +70,7 @@ def run(): fix_arg='--fix', description="Standard puppet linter" "(config: tools/linter_lib/exclude.py)") - linter_config.external_linter('templates', ['tools/check-templates'], ['handlebars', 'html'], + linter_config.external_linter('templates', ['tools/check-templates'], ['hbs', 'html'], description="Custom linter checks whitespace formatting" "of HTML templates.") linter_config.external_linter('swagger', ['node', 'tools/check-swagger'], ['yaml'], diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index d96f031c9c..13f234d451 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -646,7 +646,7 @@ html_rules = whitespace_rules + prose_style_rules + cast(Rule, [ 'description': "`title` value should be translatable."}, {'pattern': r'''\Walt=["'][^{"']''', 'description': "alt argument should be enclosed by _() or it should be an empty string.", - 'exclude': set(['static/templates/settings/display-settings.handlebars', + 'exclude': set(['static/templates/settings/display_settings.hbs', 'templates/zerver/app/keyboard_shortcuts.html', 'templates/zerver/app/markdown_help.html']), 'good_lines': ['{{ _(name) }}', ''], @@ -671,12 +671,12 @@ html_rules = whitespace_rules + prose_style_rules + cast(Rule, [ # 5xx page doesn't have external CSS 'static/html/5xx.html', # Group PMs color is dynamically calculated - 'static/templates/group_pms.handlebars', + 'static/templates/group_pms.hbs', # exclude_pattern above handles color, but have other issues: - 'static/templates/draft.handlebars', - 'static/templates/subscription.handlebars', - 'static/templates/single_message.handlebars', + 'static/templates/draft.hbs', + 'static/templates/subscription.hbs', + 'static/templates/single_message.hbs', # Old-style email templates need to use inline style # attributes; it should be possible to clean these up @@ -691,11 +691,11 @@ html_rules = whitespace_rules + prose_style_rules + cast(Rule, [ 'templates/zerver/app/navbar.html', # Needs the width cleaned up; display: none is fine - 'static/templates/settings/account-settings.handlebars', + 'static/templates/settings/account_settings.hbs', # background image property is dynamically generated - 'static/templates/user_profile_modal.handlebars', - 'static/templates/sidebar_private_message_list.handlebars', + 'static/templates/user_profile_modal.hbs', + 'static/templates/sidebar_private_message_list.hbs', # Inline styling for an svg; could be moved to CSS files? 'templates/zerver/landing_nav.html', @@ -707,8 +707,8 @@ html_rules = whitespace_rules + prose_style_rules + cast(Rule, [ 'templates/corporate/upgrade.html', # Miscellaneous violations to be cleaned up - 'static/templates/user_info_popover_title.handlebars', - 'static/templates/subscription_invites_warning_modal.handlebars', + 'static/templates/user_info_popover_title.hbs', + 'static/templates/subscription_invites_warning_modal.hbs', 'templates/zerver/reset_confirm.html', 'templates/zerver/config_error.html', 'templates/zerver/dev_env_email_access_details.html', @@ -726,7 +726,7 @@ html_rules = whitespace_rules + prose_style_rules + cast(Rule, [ ]) handlebars_rules = RuleList( - langs=['handlebars'], + langs=['hbs'], rules=html_rules + cast(Rule, [ {'pattern': "[<]script", 'description': "Do not use inline