Merge pull request #391 from travis-ci/fixes-for-notactive

Fixes for notactive
This commit is contained in:
Lisa P 2015-08-17 10:40:42 +02:00
commit f6e4aca204
6 changed files with 41 additions and 18 deletions

View File

@ -31,7 +31,17 @@ Controller = Ember.ArrayController.extend
false false
).property('tab', 'repo.builds', 'repo.pullRequests') ).property('tab', 'repo.builds', 'repo.pullRequests')
things: (-> displayBranches: (->
if @get('tab') == 'branches'
if Ember.isEmpty(@get('repo.branches.content.content'))
true
else
false
else
false
).property('tab', 'repo.builds', 'repo.branches')
noticeData: (->
return { return {
repo: @get('repo'), repo: @get('repo'),
auth: @auth.token() auth: @auth.token()

View File

@ -1,9 +1,14 @@
.missing-notice .missing-notice
text-align: center text-align: center
a p a
color: $grey-dark
text-decoration: underline
a.button
font-size: 14px font-size: 14px
.page-title .page-title
color: #434343 color: #434343
font-size: 36px font-size: 36px

View File

@ -1,9 +1,8 @@
{{#if content.isLoaded}} {{#if content.isLoaded}}
{{!-- <table id="builds" class="list"> --}}
{{#each controller as |build|}} {{#each controller as |build|}}
{{builds-item build=build}} {{builds-item build=build}}
{{else}} {{else}}
{{no-builds repo=things isPR=displayPullRequests}} {{no-builds repo=noticeData isPR=displayPullRequests isBranch=displayBranches}}
{{/each}} {{/each}}
{{#if displayShowMoreButton}} {{#if displayShowMoreButton}}
<p> <p>

View File

@ -62,17 +62,20 @@
</svg> </svg>
</figure> </figure>
{{#unless isPR}} {{#if isPR}}
<h2 class="page-title">No builds for this repository</h2> <h2 class="page-title">No pull request builds for this repositiory</h2>
<p class="page-notice">Want to start testing this project on Travis CI?</p>
<a href="http://docs.travis-ci.com/user/getting-started/" class="button button--green">Read the Docs on Getting Started</a>
{{!-- {{#if isLoading}}
{{loading-indicator}}
{{else}}
<a href="#" class="button button--green" {{action "triggerBuild"}}>Trigger the first build</a>
{{/if}} --}}
{{else}} {{else}}
<h2 class="page-title">No Pull Request builds for this repositiory</h2> {{#if isBranch}}
{{/unless}} <h2 class="page-title">No other branches for this repositiory</h2>
{{else}}
<h2 class="page-title">No builds for this repository</h2>
<p class="page-notice">Want to start testing this project on Travis CI?</p>
<a href="http://docs.travis-ci.com/user/getting-started/" class="button button--green">Read the Docs on Getting Started</a>
{{!-- {{#if isLoading}}
{{loading-indicator}}
{{else}}
<a href="#" class="button button--green" {{action "triggerBuild"}}>Trigger the first build</a>
{{/if}} --}}
{{/if}}
{{/if}}
</div> </div>

View File

@ -63,5 +63,7 @@
<h2 class="page-title">This is not an active repository</h2> <h2 class="page-title">This is not an active repository</h2>
<p class="page-notice">Want to start testing this project on Travis CI?</p> <p class="page-notice">Want to start testing this project on Travis CI?</p>
<a href="http://docs.travis-ci.com/user/getting-started/" class="button button--green">Read the Docs on Getting Started</a> <a href="http://docs.travis-ci.com/user/getting-started/" class="button button--green">Read the Docs on Getting Started</a>
{{#if user.pushPermissions.length}}
<p>If this repository is already in active use, <br> make sure its activated on {{#link-to "account" repo.owner}}your profile{{/link-to}}.</p>
{{/if}}
</div> </div>

View File

@ -26,7 +26,11 @@
{{#if repo.active}} {{#if repo.active}}
{{outlet}} {{outlet}}
{{else}} {{else}}
{{not-active}} {{#if repo.lastBuildId}}
{{outlet}}
{{else}}
{{not-active user=currentUser repo=repo}}
{{/if}}
{{/if}} {{/if}}
</div> </div>
</div> </div>