From 2d34fc0252e4a596aed2cd922f48608ac26edbfa Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Mon, 27 Jul 2015 18:45:18 +0200 Subject: [PATCH] group no-build-svg elements and alter message on PR tab --- app/controllers/builds.coffee | 8 ++ app/templates/builds.hbs | 2 +- app/templates/components/no-builds.hbs | 120 +++++++++++++------------ 3 files changed, 74 insertions(+), 56 deletions(-) diff --git a/app/controllers/builds.coffee b/app/controllers/builds.coffee index 7bd25ad8..5a179af5 100644 --- a/app/controllers/builds.coffee +++ b/app/controllers/builds.coffee @@ -21,6 +21,14 @@ Controller = Ember.ArrayController.extend @get('tab') != 'branches' and parseInt(@get('lastObject.number')) > 1 ).property('tab', 'lastObject.number') + displayPullRequests: (-> + if @get('tab') == 'pull_requests' + return true + else + return false + + ).property('tab', 'lastObject.number') + olderThanNumber: (id, number, type) -> options = { repository_id: id, after_number: number } if type? diff --git a/app/templates/builds.hbs b/app/templates/builds.hbs index e9cd7322..932d2453 100644 --- a/app/templates/builds.hbs +++ b/app/templates/builds.hbs @@ -3,7 +3,7 @@ {{#each controller as |build|}} {{builds-item build=build}} {{else}} - {{no-builds}} + {{no-builds isPR=displayPullRequests}} {{/each}} {{#if displayShowMoreButton}}

diff --git a/app/templates/components/no-builds.hbs b/app/templates/components/no-builds.hbs index 35c85ad0..6f41699e 100644 --- a/app/templates/components/no-builds.hbs +++ b/app/templates/components/no-builds.hbs @@ -2,62 +2,72 @@

- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-

No builds for this repository

-

Want to start testing this project on Travis CI?

- Read the Docs on Getting Started + {{#unless isPR}} +

No builds for this repository

+

Want to start testing this project on Travis CI?

+ Read the Docs on Getting Started + {{else}} +

No Pull Request builds for this Repositiory

+ {{/unless}} +