mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 16:32:46 +08:00
Remove the last of the Discourse
globals in our templates
This commit is contained in:
parent
cedc409461
commit
52094fe554
|
@ -3,9 +3,12 @@
|
|||
**/
|
||||
export default {
|
||||
name: 'mobile',
|
||||
after: 'inject-objects',
|
||||
|
||||
initialize: function() {
|
||||
initialize: function(container) {
|
||||
Discourse.Mobile.init();
|
||||
var site = container.lookup('site:main');
|
||||
site.set('mobileView', Discourse.Mobile.mobileView);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<div id="file-uploading" {{bind-attr class="view.isUploading::hidden"}}>
|
||||
{{i18n upload_selector.uploading}} {{view.uploadProgress}}% <a id="cancel-file-upload">{{i18n cancel}}</a>
|
||||
</div>
|
||||
{{#if Discourse.Mobile.mobileView}}
|
||||
{{#if site.mobileView}}
|
||||
<a {{bind-attr class=":mobile-file-upload view.isUploading:hidden"}}>{{i18n upload}}</a>
|
||||
<input type="file" id="mobile-uploader" />
|
||||
{{/if}}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{{#if loading}}<div id='revision-loading'><i class='fa fa-spinner fa-spin'></i>{{i18n loading}}</div>{{/if}}
|
||||
<div id="display-modes">
|
||||
<button {{bind-attr class=":btn displayingInline:btn-primary:standard"}} title="{{i18n post.revisions.displays.inline.title}}" {{action displayInline}}>{{{i18n post.revisions.displays.inline.button}}}</button>
|
||||
{{#unless Discourse.Mobile.mobileView}}
|
||||
{{#unless site.mobileView}}
|
||||
<button {{bind-attr class=":btn displayingSideBySide:btn-primary:standard"}} title="{{i18n post.revisions.displays.side_by_side.title}}" {{action displaySideBySide}}>{{{i18n post.revisions.displays.side_by_side.button}}}</button>
|
||||
<button {{bind-attr class=":btn displayingSideBySideMarkdown:btn-primary:standard"}} title="{{i18n post.revisions.displays.side_by_side_markdown.title}}" {{action displaySideBySideMarkdown}}>{{{i18n post.revisions.displays.side_by_side_markdown.button}}}</button>
|
||||
{{/unless}}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<span class='topic'>
|
||||
{{i18n search.post_format post_number=post_number username=username}}
|
||||
</span>
|
||||
{{#unless Discourse.Mobile.mobileView}}
|
||||
<span class='blurb'>
|
||||
{{{unbound blurb}}}
|
||||
</span>
|
||||
{{#unless controller.site.mobileView}}
|
||||
<span class='blurb'>
|
||||
{{{unbound blurb}}}
|
||||
</span>
|
||||
{{/unless}}
|
||||
</a>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<span class='topic'>
|
||||
{{topic-status topic=topic disableActions=true}}<span class='topic-title'>{{unbound topic.title}}</span>{{category-badge topic.category}}
|
||||
</span>
|
||||
{{#unless Discourse.Mobile.mobileView}}
|
||||
<span class='blurb'>
|
||||
{{age created_at}} - {{{unbound blurb}}}
|
||||
</span>
|
||||
{{#unless controller.site.mobileView}}
|
||||
<span class='blurb'>
|
||||
{{age created_at}} - {{{unbound blurb}}}
|
||||
</span>
|
||||
{{/unless}}
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue
Block a user