zulip/web/templates/stream_settings/stream_settings.hbs

156 lines
8.3 KiB
Handlebars

<div class="stream_settings_header" data-stream-id="{{sub.stream_id}}">
<div class="tab-container"></div>
{{#with sub}}
<div class="button-group">
<div class="sub_unsub_button_wrapper inline-block {{#unless should_display_subscription_button }}cannot-subscribe-tooltip{{/unless}}" data-tooltip-template-id="cannot-subscribe-tooltip-template">
<template id="cannot-subscribe-tooltip-template">
<span>
{{#tr}}
Cannot subscribe to private stream <z-stream></z-stream>
{{#*inline "z-stream"}}{{> ../inline_decorated_stream_name stream=../sub}}{{/inline}}
{{/tr}}
</span>
</template>
<button class="button small rounded subscribe-button sub_unsub_button {{#if should_display_subscription_button}}toggle-subscription-tooltip{{/if}} {{#unless subscribed }}unsubscribed{{/unless}}" type="button" name="button" data-tooltip-template-id="toggle-subscription-tooltip-template" {{#unless should_display_subscription_button}}disabled="disabled"{{/unless}}>
{{#if subscribed }}
{{t "Unsubscribe" }}
{{else}}
{{t "Subscribe" }}
{{/if}}
</button>
</div>
<a href="{{preview_url}}" class="button small rounded tippy-zulip-delayed-tooltip" id="preview-stream-button" role="button" data-tooltip-template-id="view-stream-tooltip-template" data-tippy-placement="bottom" {{#unless should_display_preview_button }}style="display: none"{{/unless}}><i class="fa fa-eye"></i></a>
{{#if is_realm_admin}}
<button class="button small rounded btn-danger deactivate tippy-zulip-delayed-tooltip" type="button" name="delete_button" data-tippy-content="{{t 'Archive stream'}}"> <i class="fa fa-trash-o" aria-hidden="true"></i></button>
{{/if}}
</div>
{{/with}}
</div>
<div class="subscription_settings" data-stream-id="{{sub.stream_id}}">
<div class="inner-box">
<div class="stream-creation-confirmation-banner"></div>
<div class="stream_section" data-stream-section="general">
{{#with sub}}
<div class="stream-settings-tip-container">
{{> stream_settings_tip}}
</div>
<div class="stream-header">
{{> stream_privacy_icon
invite_only=invite_only
is_web_public=is_web_public }}
<div class="stream-name">
<span class="sub-stream-name" title="{{name}}">{{name}}</span>
</div>
<div class="stream_change_property_info alert-notification"></div>
<div class="button-group" {{#unless can_change_name_description}}style="display:none"{{/unless}}>
<button id="open_stream_info_modal" class="button rounded small btn-warning tippy-zulip-delayed-tooltip" data-tippy-content="{{t 'Edit stream name and description' }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="stream-description">
{{> stream_description
rendered_description=rendered_description
}}
</div>
<div class="stream-permissions settings-subsection-parent" id="stream_permission_settings">
<div class="subsection-header">
<h3 class="stream_setting_subsection_title">{{t "Stream permissions" }}
</h3>
{{> ../settings/settings_save_discard_widget section_name="stream-permissions" }}
</div>
<div class="stream-permissions-warning-banner"></div>
{{> stream_types
stream_post_policy_values=../stream_post_policy_values
stream_privacy_policy_values=../stream_privacy_policy_values
stream_privacy_policy=../stream_privacy_policy
check_default_stream=../check_default_stream
zulip_plan_is_not_limited=../zulip_plan_is_not_limited
upgrade_text_for_wide_organization_logo=../upgrade_text_for_wide_organization_logo
is_business_type_org=../is_business_type_org
org_level_message_retention_setting=../org_level_message_retention_setting
is_stream_edit=true
can_remove_subscribers_setting_widget_name="can_remove_subscribers_group" }}
</div>
{{/with}}
<div class="stream-email-box" {{#unless can_access_stream_email}}style="display: none;"{{/unless}}>
<div class="stream-email-box-header">
<h3 class="stream_setting_subsection_title">
{{t "Email address" }}
{{> ../help_link_widget link="/help/message-a-stream-by-email" }}
</h3>
<div class="stream_email_address_error alert-notification"></div>
</div>
<p>
{{t "You can use email to send messages to Zulip streams."}}
</p>
<p>
<button class="button rounded copy_email_button" type="button" name="button">
<span class="copy_button">{{t "Generate email address" }}</span>
</button>
</p>
</div>
</div>
<div id="personal-stream-settings" class="stream_section" data-stream-section="personal">
<div class="subsection-parent">
<div class="subsection-header">
<h3 class="stream_setting_subsection_title inline-block">{{t "Personal settings" }}</h3>
<div class="stream_change_property_status alert-notification"></div>
</div>
{{#each other_settings}}
<div class="input-group">
{{> stream_settings_checkbox
setting_name=name
is_checked=is_checked
is_muted=(lookup ../sub "is_muted")
stream_id=(lookup ../sub "stream_id")
notification_setting=false
disabled_realm_setting=disabled_realm_setting
is_disabled=is_disabled
label=label}}
</div>
{{/each}}
<div class="input-group">
<label for="streamcolor">{{t "Stream color" }}</label>
<span class="sub_setting_control">
<input stream_id="{{sub.stream_id}}" class="colorpicker" id="streamcolor" type="text" value="{{sub.color}}" tabindex="-1" />
</span>
</div>
</div>
<div class="subsection-parent">
<div class="subsection-header">
<h4 class="stream_setting_subsection_title">{{t "Notification settings" }}</h4>
<div class="stream_change_property_status alert-notification"></div>
<p>{{t "In muted streams, stream notification settings apply only to unmuted topics." }}</p>
</div>
<div class="input-group">
<button class="button small rounded reset-stream-notifications-button" type="button">{{t "Reset to default notifications" }}</button>
</div>
{{#each notification_settings}}
<div class="input-group">
{{> stream_settings_checkbox
setting_name=name
is_checked=is_checked
stream_id=(lookup ../sub "stream_id")
notification_setting=true
disabled_realm_setting=disabled_realm_setting
is_disabled=is_disabled
label=label}}
</div>
{{/each}}
</div>
</div>
<div class="stream_section" data-stream-section="subscribers">
{{#with sub}}
<div class="edit_subscribers_for_stream">
{{> stream_members}}
</div>
{{/with}}
</div>
</div>
</div>