This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/preferences/interface.hbs
OsamaSayegh decf1f27cf FEATURE: Groundwork for user-selectable theme components
* Phase 0 for user-selectable theme components

- Drops `key` column from the `themes` table
- Drops `theme_key` column from the `user_options` table
- Adds `theme_ids` (array of ints default []) column to the `user_options` table and migrates data from `theme_key` to the new column.
- Removes the `default_theme_key` site setting and adds `default_theme_id` instead.
- Replaces `theme_key` cookie with a new one called `theme_ids`
- no longer need Theme.settings_for_client
2018-07-12 14:18:21 +10:00

57 lines
2.0 KiB
Handlebars

{{#if showThemeSelector}}
<div class="control-group theme">
<label class="control-label">{{i18n 'user.theme'}}</label>
<div class="controls">
{{combo-box content=userSelectableThemes value=themeId}}
</div>
<div class="controls">
{{preference-checkbox labelKey="user.theme_default_on_all_devices" checked=makeThemeDefault}}
</div>
</div>
{{/if}}
{{#if siteSettings.allow_user_locale}}
<div class="control-group pref-locale">
<label class="control-label">{{i18n 'user.locale.title'}}</label>
<div class="controls">
{{combo-box filterable=true valueAttribute="value" content=availableLocales value=model.locale none="user.locale.default"}}
</div>
<div class='instructions'>
{{i18n 'user.locale.instructions'}}
</div>
</div>
{{/if}}
<div class="control-group home">
<label class="control-label">{{i18n 'user.home'}}</label>
<div class="controls">
{{combo-box content=userSelectableHome valueAttribute="value" value=model.user_option.homepage_id}}
</div>
</div>
<div class="control-group other">
<label class="control-label">{{i18n 'user.other_settings'}}</label>
{{preference-checkbox labelKey="user.external_links_in_new_tab" checked=model.user_option.external_links_in_new_tab}}
{{preference-checkbox labelKey="user.enable_quoting" checked=model.user_option.enable_quoting}}
{{preference-checkbox labelKey="user.dynamic_favicon" checked=model.user_option.dynamic_favicon}}
{{preference-checkbox labelKey="user.disable_jump_reply" checked=model.user_option.disable_jump_reply}}
{{#if siteSettings.automatically_unpin_topics}}
{{preference-checkbox labelKey="user.automatically_unpin_topics" checked=model.user_option.automatically_unpin_topics}}
{{/if}}
</div>
{{plugin-outlet name="user-preferences-interface" args=(hash model=model save=(action "save"))}}
<br/>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}
<div class="control-group save-button">
<div class="controls">
{{partial 'user/preferences/save-button'}}
</div>
</div>