Fix displaying no-builds message with an index view
This commit is contained in:
parent
4bbf114e82
commit
b0df09fb22
|
@ -27,6 +27,10 @@ export default Ember.Controller.extend({
|
||||||
return statusImage(this.get('repo.slug'));
|
return statusImage(this.get('repo.slug'));
|
||||||
}.property('repo.slug'),
|
}.property('repo.slug'),
|
||||||
|
|
||||||
|
showCurrentBuild: function() {
|
||||||
|
return this.get('repo.lastBuildId') && this.get('repo.active');
|
||||||
|
}.property('repo.lastBuildId', 'repo.active'),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
statusImages() {
|
statusImages() {
|
||||||
this.get('popup').open('status-images');
|
this.get('popup').open('status-images');
|
||||||
|
|
|
@ -8,11 +8,7 @@ export default TravisRoute.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
if (this.modelFor('repo').get('lastBuildId')) {
|
return this.render('build');
|
||||||
return this.render('build');
|
|
||||||
} else {
|
|
||||||
return this.render('builds/not_found');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deactivate() {
|
deactivate() {
|
||||||
var repo;
|
var repo;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{{no-builds}}
|
|
|
@ -23,13 +23,13 @@
|
||||||
{{repo-show-tabs repo=repo tab=tab build=build job=job}}
|
{{repo-show-tabs repo=repo tab=tab build=build job=job}}
|
||||||
</div>
|
</div>
|
||||||
<div class="tabbody repo-body">
|
<div class="tabbody repo-body">
|
||||||
{{#if repo.active}}
|
{{#if showCurrentBuild}}
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if repo.lastBuildId}}
|
{{#if repo.lastBuildId}}
|
||||||
{{outlet}}
|
|
||||||
{{else}}
|
|
||||||
{{not-active user=currentUser repo=repo}}
|
{{not-active user=currentUser repo=repo}}
|
||||||
|
{{else}}
|
||||||
|
{{no-builds}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user