mirror of https://github.com/zulip/zulip.git
settings: Create user_display_settings.hbs template.
This commit creates a new template user_display_settings.hbs for user display settings and display_settings.hbs will be used as a common template for user-level and realm-level settings.
This commit is contained in:
parent
3adf5e6383
commit
8bf5b3a399
|
@ -1,104 +1,102 @@
|
|||
<div id="user-display-settings" class="settings-section" data-name="display-settings">
|
||||
<form class="display-settings-form">
|
||||
<div class="lang-settings">
|
||||
<!-- this is inline block so that the alert notification can sit beside
|
||||
it. If there's not an alert, don't make it inline-block. -->
|
||||
<h3 class="inline-block">{{t "Language settings" }}</h3>
|
||||
<div class="alert-notification language-settings-status"></div>
|
||||
<form class="display-settings-form">
|
||||
<div class="lang-settings">
|
||||
<!-- this is inline block so that the alert notification can sit beside
|
||||
it. If there's not an alert, don't make it inline-block. -->
|
||||
<h3 class="inline-block">{{t "Language settings" }}</h3>
|
||||
<div class="alert-notification language-settings-status"></div>
|
||||
|
||||
<div class="input-group">
|
||||
<label class="inline-block title">{{t "Default language" }}</label>
|
||||
<button type="button" class="default_language button btn-link rounded small inline-block">
|
||||
<span class="default_language_name">{{default_language_name}}</span>
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{> ../default_language_modal language_list=language_list_dbl_col}}
|
||||
<div class="input-group">
|
||||
<label class="inline-block title">{{t "Default language" }}</label>
|
||||
<button type="button" class="default_language button btn-link rounded small inline-block">
|
||||
<span class="default_language_name">{{default_language_name}}</span>
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="display-settings">
|
||||
<h3 class="inline-block">{{t "Display settings" }}</h3>
|
||||
<div class="alert-notification display-settings-status"></div>
|
||||
{{> ../default_language_modal language_list=language_list_dbl_col}}
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="default_view" class="dropdown-title">{{t "Default view" }}
|
||||
{{> ../help_link_widget link="/help/change-default-view" }}
|
||||
<div class="display-settings">
|
||||
<h3 class="inline-block">{{t "Display settings" }}</h3>
|
||||
<div class="alert-notification display-settings-status"></div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="default_view" class="dropdown-title">{{t "Default view" }}
|
||||
{{> ../help_link_widget link="/help/change-default-view" }}
|
||||
</label>
|
||||
<select name="default_view" class="default_view">
|
||||
{{> dropdown_options_widget option_values=default_view_values}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="color_scheme" class="dropdown-title">{{t "Color scheme" }}
|
||||
</label>
|
||||
<select name="color_scheme" class="color_scheme">
|
||||
{{> dropdown_options_widget option_values=color_scheme_values}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{#each display_settings.settings.user_display_settings}}
|
||||
{{> settings_checkbox
|
||||
setting_name=this
|
||||
is_checked=(lookup ../user_settings this)
|
||||
label=(lookup ../settings_label this)
|
||||
render_only=(lookup ../display_settings.render_only this)}}
|
||||
{{/each}}
|
||||
|
||||
<div class="input-group">
|
||||
<label for="demote_inactive_streams" class="dropdown-title">{{t "Demote inactive streams" }}
|
||||
{{> ../help_link_widget link="/help/manage-inactive-streams" }}
|
||||
</label>
|
||||
<select name="demote_inactive_streams" class="demote_inactive_streams">
|
||||
{{> dropdown_options_widget option_values=demote_inactive_streams_values}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="time-settings">
|
||||
<h3 class="inline-block">{{t "Time settings" }}</h3>
|
||||
<div class="alert-notification time-settings-status"></div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="twenty_four_hour_time" class="dropdown-title">{{ settings_label.twenty_four_hour_time }}</label>
|
||||
<select name="twenty_four_hour_time" class="twenty_four_hour_time">
|
||||
{{#each twenty_four_hour_time_values}}
|
||||
<option value='{{ this.value }}'>{{ this.description }}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="emoji-settings">
|
||||
<h3 class="inline-block light">{{t "Emoji settings" }}</h3>
|
||||
<div class="alert-notification emoji-settings-status"></div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="emojiset_choices grey-box">
|
||||
{{#each user_settings.emojiset_choices}}
|
||||
<label>
|
||||
<input type="radio" class="emojiset_choice" name="emojiset_group" value="{{this.key}}" />
|
||||
<span>{{this.text}}</span>
|
||||
<span class="right">
|
||||
{{#if (eq this.key "text") }}
|
||||
<div class="emoji_alt_code"> :relaxed:</div>
|
||||
{{else}}
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f642.png" />
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f44d.png" />
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f680.png" />
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f389.png" />
|
||||
{{/if}}
|
||||
</span>
|
||||
</label>
|
||||
<select name="default_view" class="default_view">
|
||||
{{> dropdown_options_widget option_values=default_view_values}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="color_scheme" class="dropdown-title">{{t "Color scheme" }}
|
||||
</label>
|
||||
<select name="color_scheme" class="color_scheme">
|
||||
{{> dropdown_options_widget option_values=color_scheme_values}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{#each display_settings.settings.user_display_settings}}
|
||||
{{> settings_checkbox
|
||||
setting_name=this
|
||||
is_checked=(lookup ../user_settings this)
|
||||
label=(lookup ../settings_label this)
|
||||
render_only=(lookup ../display_settings.render_only this)}}
|
||||
{{/each}}
|
||||
|
||||
<div class="input-group">
|
||||
<label for="demote_inactive_streams" class="dropdown-title">{{t "Demote inactive streams" }}
|
||||
{{> ../help_link_widget link="/help/manage-inactive-streams" }}
|
||||
</label>
|
||||
<select name="demote_inactive_streams" class="demote_inactive_streams">
|
||||
{{> dropdown_options_widget option_values=demote_inactive_streams_values}}
|
||||
</select>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="time-settings">
|
||||
<h3 class="inline-block">{{t "Time settings" }}</h3>
|
||||
<div class="alert-notification time-settings-status"></div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="twenty_four_hour_time" class="dropdown-title">{{ settings_label.twenty_four_hour_time }}</label>
|
||||
<select name="twenty_four_hour_time" class="twenty_four_hour_time">
|
||||
{{#each twenty_four_hour_time_values}}
|
||||
<option value='{{ this.value }}'>{{ this.description }}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="emoji-settings">
|
||||
<h3 class="inline-block light">{{t "Emoji settings" }}</h3>
|
||||
<div class="alert-notification emoji-settings-status"></div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="emojiset_choices grey-box">
|
||||
{{#each user_settings.emojiset_choices}}
|
||||
<label>
|
||||
<input type="radio" class="emojiset_choice" name="emojiset_group" value="{{this.key}}" />
|
||||
<span>{{this.text}}</span>
|
||||
<span class="right">
|
||||
{{#if (eq this.key "text") }}
|
||||
<div class="emoji_alt_code"> :relaxed:</div>
|
||||
{{else}}
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f642.png" />
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f44d.png" />
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f680.png" />
|
||||
<img class="emoji" src="/static/generated/emoji/images-{{this.key}}-64/1f389.png" />
|
||||
{{/if}}
|
||||
</span>
|
||||
</label>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{> settings_checkbox
|
||||
setting_name="translate_emoticons"
|
||||
is_checked=user_settings.translate_emoticons
|
||||
label=settings_label.translate_emoticons}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{> settings_checkbox
|
||||
setting_name="translate_emoticons"
|
||||
is_checked=user_settings.translate_emoticons
|
||||
label=settings_label.translate_emoticons}}
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<div id="user-display-settings" class="settings-section" data-name="display-settings">
|
||||
{{> display_settings}}
|
||||
</div>
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
{{> settings/account_settings }}
|
||||
|
||||
{{> settings/display_settings }}
|
||||
{{> settings/user_display_settings }}
|
||||
|
||||
{{> settings/notification_settings }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue