From 88ce89d34cea8f8e4ed963d449300f08d13a586b Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 29 Dec 2014 17:53:39 +0100 Subject: [PATCH] [pro-merge] Update views and templates with travis-pro specific code --- assets/scripts/app/templates/jobs.hbs | 17 ++++ assets/scripts/app/templates/layouts/home.hbs | 6 ++ .../scripts/app/templates/layouts/sidebar.hbs | 19 +++++ .../scripts/app/templates/layouts/support.hbs | 12 +++ assets/scripts/app/templates/layouts/top.hbs | 62 +++++++++++---- .../app/templates/pro/no_owned_repos.hbs | 77 +++++++++++++++++++ .../app/templates/pro/repos/show/empty.hbs | 17 ++++ assets/scripts/app/templates/profile/show.hbs | 19 ++++- assets/scripts/app/templates/profile/tabs.hbs | 7 ++ assets/scripts/app/templates/queues/show.hbs | 23 ++++++ .../scripts/app/templates/repos/list/tabs.hbs | 8 +- assets/scripts/app/views.coffee | 14 +++- assets/scripts/app/views/profile.coffee | 2 + assets/scripts/app/views/repo/show.coffee | 7 +- 14 files changed, 267 insertions(+), 23 deletions(-) create mode 100644 assets/scripts/app/templates/jobs.hbs create mode 100644 assets/scripts/app/templates/layouts/support.hbs create mode 100644 assets/scripts/app/templates/pro/no_owned_repos.hbs create mode 100644 assets/scripts/app/templates/pro/repos/show/empty.hbs create mode 100644 assets/scripts/app/templates/queues/show.hbs diff --git a/assets/scripts/app/templates/jobs.hbs b/assets/scripts/app/templates/jobs.hbs new file mode 100644 index 00000000..04e19178 --- /dev/null +++ b/assets/scripts/app/templates/jobs.hbs @@ -0,0 +1,17 @@ +

Running Jobs ({{controller.length}})

+ + diff --git a/assets/scripts/app/templates/layouts/home.hbs b/assets/scripts/app/templates/layouts/home.hbs index 651e00c9..d273d386 100644 --- a/assets/scripts/app/templates/layouts/home.hbs +++ b/assets/scripts/app/templates/layouts/home.hbs @@ -10,3 +10,9 @@ {{render "flash"}} {{yield}} + +{{#if Travis.config.pro}} + +{{/if}} diff --git a/assets/scripts/app/templates/layouts/sidebar.hbs b/assets/scripts/app/templates/layouts/sidebar.hbs index e69de29b..ad196154 100644 --- a/assets/scripts/app/templates/layouts/sidebar.hbs +++ b/assets/scripts/app/templates/layouts/sidebar.hbs @@ -0,0 +1,19 @@ +
+
  +
+ +{{#if tip}} +
+

Tip:

+ +

{{{tip}}}

+
+{{/if}} + +{{#if Travis.config.pages_endpoint}} + {{view templateName="layouts/support"}} +{{/if}} + +{{render "runningJobs"}} + +{{view Travis.QueueView}} diff --git a/assets/scripts/app/templates/layouts/support.hbs b/assets/scripts/app/templates/layouts/support.hbs new file mode 100644 index 00000000..5d2f71e4 --- /dev/null +++ b/assets/scripts/app/templates/layouts/support.hbs @@ -0,0 +1,12 @@ +
+

How can we help?

+ +
+ diff --git a/assets/scripts/app/templates/layouts/top.hbs b/assets/scripts/app/templates/layouts/top.hbs index 3ddc2e88..a9d97fc0 100644 --- a/assets/scripts/app/templates/layouts/top.hbs +++ b/assets/scripts/app/templates/layouts/top.hbs @@ -14,24 +14,56 @@
  • Status
  • - + {{#unless Travis.config.pro}} + + {{/unless}} + + {{#if Travis.config.pages_endpoint}} +
  • + Status +
  • + + {{/if}} + + + + + {{#unless Travis.config.pro}} +
  • + Travis CI for Private Repositories +
  • + {{/unless}} +
  • {{#if auth.signedOut}} diff --git a/assets/scripts/app/templates/pro/no_owned_repos.hbs b/assets/scripts/app/templates/pro/no_owned_repos.hbs new file mode 100644 index 00000000..534f3481 --- /dev/null +++ b/assets/scripts/app/templates/pro/no_owned_repos.hbs @@ -0,0 +1,77 @@ +

    +

    Welcome to Travis CI!

    + +

    Hey, it looks like you're new around here and have yet to set up your first
    repository on Travis CI. We're here to help you get started, it's easy!

    + +
    +
    + +
    + +
    + Step 1:   Enabling your projects +

    + Start by going to your {{#link-to "profile.index"}}profile{{/link-to}} and enable one of your projects. We've been + synchronizing all repositories you have administrative access to. Pick one and flip the switch next to it. +

    +
    +
    + +
    +
    + +
    + +
    + Step 2:   Adding Travis +

    + Once you've enabled one of your projects, add a .travis.yml to your project, push some code, and we'll start processing your builds. Wait a + whee while and reload the page, and your newly setup and built project will show up on the right. +

    +
    +
    + +
    +
    + +
    + +
    + Step 3:   Wait for your build to finish +

    + We'll be sending you an email once the build has finished. Then, it's up to you to do the happy dance. +

    +
    +
    + +
    + Build Configuration +

    + We use sensible defaults for most languages, but you can customize + both the build process and the build + environment to fit your project's needs. +

    + + Notifications +

    + You can also configure how you want to be notified of build results. Email is only one channel you can use. We + support Campfire, HipChat, Flowdock, IRC, and webhooks. To avoid + exposing any private credentials, you can shield them from the public using encrypted + configuration settings. +

    + + Questions +

    + Should you have any questions or issues, have a look at our + documentation, open an issue or + send us an email. +

    +
    +
    diff --git a/assets/scripts/app/templates/pro/repos/show/empty.hbs b/assets/scripts/app/templates/pro/repos/show/empty.hbs new file mode 100644 index 00000000..9dc8139e --- /dev/null +++ b/assets/scripts/app/templates/pro/repos/show/empty.hbs @@ -0,0 +1,17 @@ +
    +

    Welcome to Travis CI!

    + +

    It looks like you're new around here. Let's get you started, shall we?

    + +

    You're only two steps away from using Travis:

    + +
      +
    • Hook up {{#link-to "profile.index" class="signed-in"}}one or more of your GitHub repositories{{/link-to}} with Travis.
    • +
    • Push some code!
    • +
    + +

    + If you have any questions or issues, hop on our Campfire support room or + contact support directly. +

    +

    diff --git a/assets/scripts/app/templates/profile/show.hbs b/assets/scripts/app/templates/profile/show.hbs index 39a2c90e..baacec3c 100644 --- a/assets/scripts/app/templates/profile/show.hbs +++ b/assets/scripts/app/templates/profile/show.hbs @@ -1,8 +1,25 @@

    {{view.name}}

    +{{#if Travis.config.billing_endpoint}} + {{#if view.subscribed}} + + Subscription active! + + {{else}} + {{#if view.education}} + + Educational account! + + {{else}} + + Sign up this account! + + {{/if}} + {{/if}} +{{/if}} + {{view Travis.ProfileTabsView}}
    {{outlet}}
    - diff --git a/assets/scripts/app/templates/profile/tabs.hbs b/assets/scripts/app/templates/profile/tabs.hbs index 21ee1799..190d1efe 100644 --- a/assets/scripts/app/templates/profile/tabs.hbs +++ b/assets/scripts/app/templates/profile/tabs.hbs @@ -11,4 +11,11 @@
  • {{/if}} + {{#if Travis.config.billing_endpoint}} +
  • +
    + Billing +
    +
  • + {{/if}} diff --git a/assets/scripts/app/templates/queues/show.hbs b/assets/scripts/app/templates/queues/show.hbs new file mode 100644 index 00000000..f4e47aa9 --- /dev/null +++ b/assets/scripts/app/templates/queues/show.hbs @@ -0,0 +1,23 @@ + diff --git a/assets/scripts/app/templates/repos/list/tabs.hbs b/assets/scripts/app/templates/repos/list/tabs.hbs index 724e7f75..9a88f7f2 100644 --- a/assets/scripts/app/templates/repos/list/tabs.hbs +++ b/assets/scripts/app/templates/repos/list/tabs.hbs @@ -3,9 +3,11 @@
    {{#link-to "index.my_repositories"}}My Repositories{{/link-to}}
    -
  • -
    {{#link-to "index.recent"}}Recent{{/link-to}}
    -
  • + {{#unless Travis.config.pro}} +
  • +
    {{#link-to "index.recent"}}Recent{{/link-to}}
    +
  • + {{/unless}}