From 34c07325d3085d41a633a0edd42d576205b6a3cb Mon Sep 17 00:00:00 2001 From: Mathias Meyer Date: Tue, 18 Mar 2014 10:44:34 +0100 Subject: [PATCH] Add a message for travis-ci.com as well. Switched the logic around to make a bit more sense with the configuration conditionals. --- assets/scripts/app/controllers/profile.coffee | 4 ++++ assets/scripts/app/templates/profile/tabs/hooks.hbs | 8 ++++++-- assets/scripts/travis.coffee | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/assets/scripts/app/controllers/profile.coffee b/assets/scripts/app/controllers/profile.coffee index 1a69c14f..330f6482 100644 --- a/assets/scripts/app/controllers/profile.coffee +++ b/assets/scripts/app/controllers/profile.coffee @@ -60,5 +60,9 @@ Travis.ProfileController = Travis.Controller.extend @set("params.#{key}", params[key]) for key, value of params showPrivateReposHint: (-> + Travis.config.show_repos_hint == 'private' + ) .property() + + showPublicReposHint: (-> Travis.config.show_repos_hint == 'public' ) .property() diff --git a/assets/scripts/app/templates/profile/tabs/hooks.hbs b/assets/scripts/app/templates/profile/tabs/hooks.hbs index 19e326a8..944503b8 100644 --- a/assets/scripts/app/templates/profile/tabs/hooks.hbs +++ b/assets/scripts/app/templates/profile/tabs/hooks.hbs @@ -1,9 +1,13 @@ -{{#if showPrivateReposHint}}

+ {{#if showPrivateReposHint}} We're only showing your public repositories below. You can find your private projects on travis-ci.com. + {{/if}} + {{#if showPublicReposHint}} + We're only showing your private repositories below. + You can find your public projects on travis-ci.org. + {{/if}}

-{{/if}}

Enable your projects below by flicking the switch, add a .travis.yml to your project, and push a new commit to diff --git a/assets/scripts/travis.coffee b/assets/scripts/travis.coffee index 056f248f..9e17ae1c 100644 --- a/assets/scripts/travis.coffee +++ b/assets/scripts/travis.coffee @@ -82,7 +82,7 @@ $.extend Travis, ga_code: $('meta[name="travis.ga_code"]').attr('value') code_climate: $('meta[name="travis.code_climate"]').attr('value') code_climate_url: $('meta[name="travis.code_climate_url"]').attr('value') - show_repos_hint: 'public' + show_repos_hint: 'private' CONFIG_KEYS_MAP: { go: 'Go'