Remove many usages of `Discourse` in templates as it's deprecated in new

releases of Ember
This commit is contained in:
Robin Ward 2014-09-11 16:30:47 -04:00
parent af6936cf72
commit 8559bbe508
11 changed files with 18 additions and 13 deletions

View File

@ -11,6 +11,8 @@ export default Ember.Controller.extend({
versionCheck: null,
problemsCheckMinutes: 1,
showVersionChecks: Discourse.computed.setting('version_checks'),
foundProblems: function() {
return(Discourse.User.currentProp('admin') && this.get('problems') && this.get('problems').length > 0);
}.property('problems'),

View File

@ -10,11 +10,13 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
loading: false,
content: [],
actions: {
clearBlock: function(row){
row.clearBlock().then(function(){
// feeling lazy
window.location.reload();
});
}
},
show: function() {

View File

@ -13,6 +13,7 @@ export default Ember.ArrayController.extend(Discourse.Presence, {
content: null,
loading: false,
mustApproveUsers: Discourse.computed.setting('must_approve_users'),
queryNew: Em.computed.equal('query', 'new'),
queryPending: Em.computed.equal('query', 'pending'),
queryHasApproval: Em.computed.or('queryNew', 'queryPending'),

View File

@ -1,5 +1,5 @@
<div class="dashboard-left">
{{#if Discourse.SiteSettings.version_checks}}
{{#if showVersionChecks}}
{{partial 'admin/templates/version_checks'}}
{{/if}}

View File

@ -17,7 +17,7 @@
<div class="clearfix"></div>
</div>
{{view Discourse.ScreenedEmailsListView contentBinding="controller"}}
{{view 'screened-emails-list' content=controller}}
</div>
{{else}}

View File

@ -19,7 +19,7 @@
<div class="clearfix"></div>
</div>
{{view Discourse.ScreenedIpAddressesListView contentBinding="controller"}}
{{view 'screened-ip-addresses-list' content=controller}}
</div>
{{else}}

View File

@ -15,7 +15,7 @@
<div class="clearfix"></div>
</div>
{{view Discourse.ScreenedUrlsListView contentBinding="controller"}}
{{view 'screened-urls-list' content=controller}}
</div>
{{else}}

View File

@ -48,7 +48,7 @@
<div class='admin-loading'>{{i18n loading}}</div>
{{else}}
{{#if model.length}}
{{view Discourse.StaffActionLogsListView contentBinding="controller"}}
{{view "staff-action-logs-list" content=controller}}
{{else}}
{{i18n search.no_results}}
{{/if}}

View File

@ -1,5 +1,5 @@
{{#if filteredContent.length}}
{{collection contentBinding="filteredContent" classNames="form-horizontal settings" itemViewClass="Discourse.SiteSettingView"}}
{{collection contentBinding="filteredContent" classNames="form-horizontal settings" itemView="site-setting"}}
{{else}}
<br/>
{{i18n admin.site_settings.no_results}}

View File

@ -3,7 +3,7 @@
<ul class="nav nav-pills">
<li>{{#link-to 'adminUsersList.active'}}{{i18n admin.users.nav.active}}{{/link-to}}</li>
<li>{{#link-to 'adminUsersList.new'}}{{i18n admin.users.nav.new}}{{/link-to}}</li>
{{#if Discourse.SiteSettings.must_approve_users}}
{{#if mustApproveUsers}}
<li>{{#link-to 'adminUsersList.pending'}}{{i18n admin.users.nav.pending}}{{/link-to}}</li>
{{/if}}
<li>{{#link-to 'adminUsersList.admins'}}{{i18n admin.users.nav.admins}}{{/link-to}}</li>

View File

@ -61,7 +61,7 @@
<div class="container posts">
{{view Discourse.SelectedPostsView}}
{{view "selected-posts"}}
<div class="row">
<section class="topic-area" id='topic' data-topic-id='{{unbound id}}'>