mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add enable_mobile_theme site setting. Uncheck it to disable the mobile theme.
This commit is contained in:
@@ -32,6 +32,10 @@ Discourse.HeaderController = Discourse.Controller.extend({
|
||||
return Discourse.Mobile.mobileView;
|
||||
}.property(),
|
||||
|
||||
showMobileToggle: function() {
|
||||
return Discourse.SiteSettings.enable_mobile_theme;
|
||||
}.property(),
|
||||
|
||||
toggleMobileView: function() {
|
||||
Discourse.Mobile.toggleMobileView();
|
||||
}
|
||||
|
||||
@@ -123,15 +123,17 @@
|
||||
{{#titledLinkTo "list.latest" titleKey="filters.latest.help"}}{{i18n filters.latest.title}}{{/titledLinkTo}}
|
||||
</li>
|
||||
<li>{{faqLink}}</li>
|
||||
<li>
|
||||
<a href="#" {{action toggleMobileView}}>
|
||||
{{#if mobileView}}
|
||||
{{i18n desktop_view}}
|
||||
{{else}}
|
||||
{{i18n mobile_view}}
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
{{#if showMobileToggle}}
|
||||
<li>
|
||||
<a href="#" {{action toggleMobileView}}>
|
||||
{{#if mobileView}}
|
||||
{{i18n desktop_view}}
|
||||
{{else}}
|
||||
{{i18n mobile_view}}
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
{{#if categories}}
|
||||
|
||||
Reference in New Issue
Block a user