Show branches content even if there's no defaultBranch

This commit is contained in:
Piotr Sarnacki 2016-02-02 11:08:48 +01:00
parent 4443dc9ddd
commit 8e610a6191
2 changed files with 15 additions and 7 deletions

View File

@ -13,6 +13,12 @@ export default Ember.Controller.extend({
} }
}.property('model'), }.property('model'),
branchesExist: function() {
var branches = this.get('model');
return branches.length;
}.property('model'),
activeBranches: function() { activeBranches: function() {
var repos; var repos;
repos = this.get('model'); repos = this.get('model');

View File

@ -1,11 +1,13 @@
{{#if defaultBranch}} {{#if branchesExist}}
<div class="branches"> <div class="branches">
{{#if defaultBranch}}
<section> <section>
<h2 class="small-title">Default Branch</h2> <h2 class="small-title">Default Branch</h2>
<ul class="blank-list"> <ul class="blank-list">
{{branch-row build=defaultBranch}} {{branch-row build=defaultBranch}}
</ul> </ul>
</section> </section>
{{/if}}
{{#if activeBranches.length}} {{#if activeBranches.length}}
<section> <section>