From e4b689b0d56993ae54e8023ae56516212ec9b5e0 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Mon, 17 Aug 2015 10:15:09 +0200 Subject: [PATCH] display actiavte options on not-active of if user has pushPermissions --- app/controllers/builds.coffee | 2 +- app/templates/builds.hbs | 3 +-- app/templates/components/not-active.hbs | 4 +++- app/templates/repo.hbs | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/builds.coffee b/app/controllers/builds.coffee index 681799df..956c9dbb 100644 --- a/app/controllers/builds.coffee +++ b/app/controllers/builds.coffee @@ -41,7 +41,7 @@ Controller = Ember.ArrayController.extend false ).property('tab', 'repo.builds', 'repo.branches') - things: (-> + noticeData: (-> return { repo: @get('repo'), auth: @auth.token() diff --git a/app/templates/builds.hbs b/app/templates/builds.hbs index c44c859e..86b77799 100644 --- a/app/templates/builds.hbs +++ b/app/templates/builds.hbs @@ -1,9 +1,8 @@ {{#if content.isLoaded}} -{{!-- --}} {{#each controller as |build|}} {{builds-item build=build}} {{else}} - {{no-builds repo=things isPR=displayPullRequests isBranch=displayBranches}} + {{no-builds repo=noticeData isPR=displayPullRequests isBranch=displayBranches}} {{/each}} {{#if displayShowMoreButton}}

diff --git a/app/templates/components/not-active.hbs b/app/templates/components/not-active.hbs index 77db3a1c..fd055090 100644 --- a/app/templates/components/not-active.hbs +++ b/app/templates/components/not-active.hbs @@ -63,5 +63,7 @@

This is not an active repository

Want to start testing this project on Travis CI?

Read the Docs on Getting Started -

If this repository is already in active use,
make sure it’s activated on {{#link-to "profile"}}your profile{{/link-to}}.

+ {{#if user.pushPermissions.length}} +

If this repository is already in active use,
make sure it’s activated on {{#link-to "account" repo.owner}}your profile{{/link-to}}.

+ {{/if}} diff --git a/app/templates/repo.hbs b/app/templates/repo.hbs index fa452ec2..090a8e79 100644 --- a/app/templates/repo.hbs +++ b/app/templates/repo.hbs @@ -29,7 +29,7 @@ {{#if repo.lastBuildId}} {{outlet}} {{else}} - {{not-active}} + {{not-active user=currentUser repo=repo}} {{/if}} {{/if}}