zulip/static/templates/subscription.handlebars

90 lines
3.7 KiB
Handlebars
Raw Normal View History

{{! Client-side Mustache template for rendering subscriptions.}}
{{#with this}}
<tr class="subscription_row" id="subscription_{{id}}">
<td>
<div class="subscription_table_elem subscription_header" data-toggle="collapse" data-target="#subscription_settings_{{id}}">
<span class="color_swatch fade {{#subscribed}}in{{/subscribed}}" style="background-color: {{color}}"></span>
<span class="subscription_block">
<span class="subscription_name">{{name}}</span>
{{#if invite_only}}<span class="subscription_lock">&nbsp;&nbsp;<i class="icon-vector-lock"></i></span>{{/if}}
</span>
<span class="sub_arrow"><i class="icon-vector-chevron-down"></i></span>
<button class="btn sub_unsub_button {{^subscribed}}btn-primary{{/subscribed}}"
type="button" name="subscription">
{{#subscribed}}
Unsubscribe
{{/subscribed}}
{{^subscribed}}
Subscribe
{{/subscribed}}
</button>
</div>
<div id="subscription_settings_{{id}}" class="collapse subscription_settings">
<div class="regular_subscription_settings collapse {{#subscribed}}in{{/subscribed}}">
<p>This is
{{#if invite_only}}an <span class="icon-vector-lock"></span> <b>invite-only stream</b>. Only people who have been invited can access its content, but any member of the stream can invite others.
{{else}}a <span class="icon-vector-globe"></span> <b>public stream</b>. Anybody in your organization can join.{{/if}}
</p>
<span class="sub_settings_title">Settings</span>
<ul>
<li>
<div id="sub_setting_not_in_home_view" class="sub_setting_checkbox">
<input class="sub_setting_control" type="checkbox" {{#unless in_home_view}}checked{{/unless}} />
Mute stream
</div>
</li>
<li>
<div id="sub_setting_notifications" class="sub_setting_checkbox">
<input class="sub_setting_control" type="checkbox" {{#if notifications}}checked{{/if}} />
Show desktop notifications for traffic on this stream
</div>
</li>
<li>
<span class="sub_setting_control">
<input stream_name="{{name}}" class="colorpicker" type="text" value="{{color}}" />
</span>
Stream color
</li>
</ul>
</div>
{{#if subscribed}}
<div>
<p><b>Email address</b> <span class="email-address">{{email_address}}
<i class="icon-vector-question-sign" id="email-address-hint-{{id}}"></i></span></p>
</div>
{{/if}}
{{#if allow_rename}}
<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" />
<input type="submit" name="rename" value="Rename stream" class="btn btn-danger" />
</form>
</div>
{{/if}}
{{#render_subscribers}}
<div class="subscriber_list_settings">
<span class="sub_settings_title">Members</span>
<div class="subscriber_list_add">
<form class="form-inline">
<input type="text" name="principal" placeholder="Email address" value="" class="input-block" />
<input type="submit" name="add_subscriber" value="Add" class="btn btn-primary" />
</form>
</div>
</div>
<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>
<ul>
</ul>
</div>
{{/render_subscribers}}
</div>
</td>
</tr>
{{/with}}