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">
<section> {{#if defaultBranch}}
<h2 class="small-title">Default Branch</h2> <section>
<ul class="blank-list"> <h2 class="small-title">Default Branch</h2>
{{branch-row build=defaultBranch}} <ul class="blank-list">
</ul> {{branch-row build=defaultBranch}}
</section> </ul>
</section>
{{/if}}
{{#if activeBranches.length}} {{#if activeBranches.length}}
<section> <section>