travis-web/app/templates/branches.hbs
Piotr Sarnacki 069f7ddbeb Fix displaying no-builds and not-active errors
This commit unifies the behaviour of displaying no-builds and not-active
errors for repo and fixes the error when user can't access repo settings
when the project is not active.
2016-01-21 16:35:36 +01:00

35 lines
845 B
Handlebars

{{#if defaultBranch}}
<div class="branches">
<section>
<h2 class="small-title">Default Branch</h2>
<ul class="blank-list">
{{branch-row build=defaultBranch}}
</ul>
</section>
{{#if activeBranches.length}}
<section>
<h2 class="small-title">Active Branches</h2>
<ul class="blank-list">
{{#each activeBranches as |branch|}}
{{branch-row build=branch}}
{{/each}}
</ul>
</section>
{{/if}}
{{#if inactiveBranches.length}}
<section>
<h2 class="small-title">Inactive Branches</h2>
<ul class="blank-list">
{{#each inactiveBranches as |branch|}}
{{branch-row build=branch inactive=true}}
{{/each}}
</ul>
</section>
{{/if}}
</div>
{{else}}
{{no-builds}}
{{/if}}