diff --git a/assets/scripts/app/controllers/repo.coffee b/assets/scripts/app/controllers/repo.coffee
index 0b10c3ed..15ec7e9b 100644
--- a/assets/scripts/app/controllers/repo.coffee
+++ b/assets/scripts/app/controllers/repo.coffee
@@ -1,8 +1,9 @@
Travis.RepoController = Travis.Controller.extend
- bindings: []
- needs: ['repos', 'currentUser']
+ needs: ['repos', 'currentUser', 'build']
currentUserBinding: 'controllers.currentUser'
+ build: Ember.computed.alias('controllers.build.build')
+
slug: (-> @get('repo.slug') ).property('repo.slug')
isLoading: (-> @get('repo.isLoading') ).property('repo.isLoading')
diff --git a/assets/scripts/app/templates/builds/show.hbs b/assets/scripts/app/templates/builds/show.hbs
index 959cad63..302ba6a1 100644
--- a/assets/scripts/app/templates/builds/show.hbs
+++ b/assets/scripts/app/templates/builds/show.hbs
@@ -20,26 +20,26 @@
{{formatDuration build.duration}}
- {{#with build.commit}}
+ {{#with build}}
{{/with}}
diff --git a/assets/scripts/app/templates/jobs/show.hbs b/assets/scripts/app/templates/jobs/show.hbs
index f607ae71..79558480 100644
--- a/assets/scripts/app/templates/jobs/show.hbs
+++ b/assets/scripts/app/templates/jobs/show.hbs
@@ -19,26 +19,26 @@
{{formatDuration job.duration}}
- {{#with job.commit}}
+ {{#with job}}
{{/with}}
diff --git a/assets/scripts/app/templates/repos/show/tabs.hbs b/assets/scripts/app/templates/repos/show/tabs.hbs
index 75029f23..b1671c2f 100644
--- a/assets/scripts/app/templates/repos/show/tabs.hbs
+++ b/assets/scripts/app/templates/repos/show/tabs.hbs
@@ -1,8 +1,8 @@
-
- {{#if slug}}
- {{#linkTo "repo" this currentWhen="repo.index"}}
+ {{#if repo.slug}}
+ {{#linkTo "repo" repo currentWhen="repo.index"}}
{{t repositories.tabs.current}}
{{/linkTo}}
{{/if}}
@@ -10,8 +10,8 @@
-
- {{#if slug}}
- {{#linkTo "builds" this}}
+ {{#if repo.slug}}
+ {{#linkTo "builds" repo}}
{{t repositories.tabs.build_history}}
{{/linkTo}}
{{/if}}
@@ -19,8 +19,8 @@
-
- {{#if slug}}
- {{#linkTo "pullRequests" this}}
+ {{#if repo.slug}}
+ {{#linkTo "pullRequests" repo}}
{{t repositories.tabs.pull_requests}}
{{/linkTo}}
{{/if}}
@@ -28,8 +28,8 @@
-
- {{#if slug}}
- {{#linkTo "branches" this}}
+ {{#if repo.slug}}
+ {{#linkTo "branches" repo}}
{{t repositories.tabs.branches}}
{{/linkTo}}
{{/if}}
@@ -37,10 +37,10 @@
-
- {{#if view.build.id}}
- {{#if view.build.repo.slug}}
- {{#linkTo "build" view.build.repo view.build}}
- {{t repositories.tabs.build}} #{{view.build.number}}
+ {{#if build.id}}
+ {{#if repo.slug}}
+ {{#linkTo "build" repo build}}
+ {{t repositories.tabs.build}} #{{build.number}}
{{/linkTo}}
{{/if}}
{{/if}}
@@ -48,10 +48,10 @@
-
- {{#if view.job.id}}
- {{#if view.job.repo.slug}}
- {{#linkTo "job" view.job.repo view.job}}
- {{t repositories.tabs.job}} #{{view.job.number}}
+ {{#if job.id}}
+ {{#if repo.slug}}
+ {{#linkTo "job" repo job}}
+ {{t repositories.tabs.job}} #{{job.number}}
{{/linkTo}}
{{/if}}
{{/if}}
diff --git a/assets/scripts/app/views/repo/show.coffee b/assets/scripts/app/views/repo/show.coffee
index fc0b6177..3a7736d9 100644
--- a/assets/scripts/app/views/repo/show.coffee
+++ b/assets/scripts/app/views/repo/show.coffee
@@ -32,10 +32,8 @@ Travis.reopen
RepoShowTabsView: Travis.View.extend
templateName: 'repos/show/tabs'
- repoBinding: 'controller.repo'
- buildBinding: 'controller.build'
- jobBinding: 'controller.job'
tabBinding: 'controller.tab'
+ contextBinding: 'controller'
# hrm. how to parametrize bindAttr?
classCurrent: (->