mirror of https://github.com/zulip/zulip.git
96 lines
4.2 KiB
Handlebars
96 lines
4.2 KiB
Handlebars
{{! Client-side Mustache template for rendering subscriptions.}}
|
|
{{#with this}}
|
|
<div class="subscription_row" id="subscription_{{id}}">
|
|
<div class="subscription_table_elem subscription_header collapsed" data-toggle="collapse" data-target="#subscription_settings_{{id}}">
|
|
<span class="subscription-setting-icon">
|
|
{{partial "subscription_setting_icon"}}
|
|
</span>
|
|
<span class="subscription_block">
|
|
<span class="subscription_name subscription-name-row">{{name}}</span>
|
|
</span>
|
|
<span class="sub_arrow"><i class="icon-vector-chevron-down"></i></span>
|
|
<button class="zulip-button sub_unsub_button {{^subscribed}}gray-button{{/subscribed}}{{#subscribed}} green-button subscribed-button{{/subscribed}}"
|
|
type="button" name="subscription">
|
|
{{#subscribed}}
|
|
Subscribed
|
|
{{/subscribed}}
|
|
{{^subscribed}}
|
|
Subscribe
|
|
{{/subscribed}}
|
|
</button>
|
|
</div>
|
|
|
|
<div id="subscription_settings_{{id}}" class="collapse subscription_settings">
|
|
<div class="regular_subscription_settings collapse {{#subscribed}}in{{/subscribed}}">
|
|
<div class="subscription-type">
|
|
{{partial "subscription_type"}}
|
|
</div>
|
|
<div class="subscription-config">
|
|
<ul>
|
|
<li>
|
|
<div id="sub_setting_not_in_home_view" class="sub_setting_checkbox">
|
|
<input id="mutestream-{{id}}" class="sub_setting_control" type="checkbox" tabindex="-1" {{#unless in_home_view}}checked{{/unless}} />
|
|
<label class="subscription-control-label">Mute stream</label>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<div id="sub_setting_notifications" class="sub_setting_checkbox">
|
|
<input id="notifystream-{{id}}" class="sub_setting_control" type="checkbox" tabindex="-1" {{#if notifications}}checked{{/if}} />
|
|
<label class="subscription-control-label">Show desktop notifications<br/>for traffic on this stream</label>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<span class="sub_setting_control">
|
|
<input stream_name="{{name}}" class="colorpicker" id="streamcolor" type="text" value="{{color}}" tabindex="-1" />
|
|
</span>
|
|
<label for="streamcolor" class="subscription-control-label">Stream color</label>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{{#if_and subscribed email_address}}
|
|
<div class="stream-email-box">
|
|
<span class="sub_settings_title">Email address <i class="icon-vector-question-sign stream-email-hint" id="email-address-hint-{{id}}"></i></span>
|
|
<div class="stream-email">
|
|
<span class="email-address">{{email_address}}</span>
|
|
</div>
|
|
</div>
|
|
{{/if_and}}
|
|
|
|
{{#if is_admin}}
|
|
<div class="rename-stream">
|
|
<span class="sub_settings_title">Administrator settings</span>
|
|
<form class="form-inline">
|
|
<input type="text" name="new-name" value="" class="input-block new-stream-name" tabindex="-1" />
|
|
<input type="submit" name="rename" value="Rename stream" class="zulip-button red-button stream-rename-button" tabindex="-1" />
|
|
</form>
|
|
</div>
|
|
<div class="change-stream-privacy">
|
|
{{partial "change_stream_privacy"}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#render_subscribers}}
|
|
<div class="subscriber_list_settings">
|
|
<span class="sub_settings_title">Stream membership</span>
|
|
<div class="subscriber_list_add">
|
|
<form class="form-inline">
|
|
<input type="text" name="principal" placeholder="Email address" value="" class="input-block" tabindex="-1" />
|
|
<input type="submit" name="add_subscriber" value="Add" class="zulip-button blue-button add-subscriber-button" tabindex="-1 "/>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="subscriber-list-box">
|
|
<div class="subscriber_list_container">
|
|
<div class="subscriber_list_loading_indicator"></div>
|
|
<div class="alert alert-error hide"></div>
|
|
<div class="alert alert-warning hide"></div>
|
|
<table class="subscriber-list">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{/render_subscribers}}
|
|
</div>
|
|
</div>
|
|
{{/with}}
|