From 90408dfb47d185e72f1eaa1b821dd92ad873467c Mon Sep 17 00:00:00 2001 From: Lisa P Date: Tue, 26 Jan 2016 15:56:21 +0100 Subject: [PATCH] hide some UI elements for enterprise --- app/routes/home-pro.js | 9 +++++- app/templates/account.hbs | 32 ++++++++++----------- app/templates/footer.hbs | 46 +++++++++++++++++------------- app/templates/top.hbs | 59 +++++++++++++++++++++++---------------- 4 files changed, 84 insertions(+), 62 deletions(-) diff --git a/app/routes/home-pro.js b/app/routes/home-pro.js index 0f305d73..276abd22 100644 --- a/app/routes/home-pro.js +++ b/app/routes/home-pro.js @@ -1,5 +1,12 @@ import TravisRoute from 'travis/routes/basic'; +import config from 'travis/config/environment'; export default TravisRoute.extend({ - needsAuth: false + needsAuth: false, + + activate: function() { + if (config.enterprise) { + return this.transitionTo('auth'); + } + } }); diff --git a/app/templates/account.hbs b/app/templates/account.hbs index 19bdae4a..da7836e2 100644 --- a/app/templates/account.hbs +++ b/app/templates/account.hbs @@ -2,25 +2,21 @@
- {{#if config.billingEndpoint}} -
- {{#if subscribeButtonInfo.subscribed}} - - Subscription active! - - {{else}} - {{#if subscribeButtonInfo.education}} - - Educational account! - + {{#unless config.enterprise}} + {{#if config.billingEndpoint}} +
+ {{#if subscribeButtonInfo.subscribed}} + Subscription active! {{else}} - - Sign up this account! - + {{#if subscribeButtonInfo.education}} + Educational account! + {{else}} + Sign up this account! + {{/if}} {{/if}} +
{{/if}} -
- {{/if}} + {{/unless}}

{{accountName}}

@@ -35,9 +31,9 @@

We're only showing your public repositories. You can find your private projects on travis-ci.com.

{{/if}} {{/if}} -
+{{#unless config.enterprise}}
{{!-- --}}
    @@ -61,7 +57,7 @@
- +{{/unless}}
diff --git a/app/templates/top.hbs b/app/templates/top.hbs index c5df2481..2649139d 100644 --- a/app/templates/top.hbs +++ b/app/templates/top.hbs @@ -5,32 +5,36 @@ -{{#if auth.signedIn}} +{{#unless config.enterprise}} + {{#if auth.signedIn}} - {{broadcast-tower toggleBroadcasts="toggleBroadcasts" status=broadcasts.lastBroadcastStatus}} + {{broadcast-tower toggleBroadcasts="toggleBroadcasts" status=broadcasts.lastBroadcastStatus}} - -{{/if}} + + {{/if}} +{{/unless}}