From c3ef9ac5d9c647004c3de32f1328fb88854a2262 Mon Sep 17 00:00:00 2001
From: Piotr Sarnacki
Date: Tue, 12 Jan 2016 14:06:19 +0100
Subject: [PATCH] [deprecations] Remove all of the views we use just for
layouts
---
app/components/travis-layout.js | 3 +++
app/controllers/error.js | 14 +++++++++++++-
app/controllers/loading.js | 14 +++++++++++++-
app/templates/auth/signin.hbs | 2 ++
app/templates/dashboard.hbs | 4 +++-
app/templates/error404.hbs | 2 ++
app/templates/first-sync.hbs | 2 ++
app/templates/home-pro.hbs | 2 ++
app/templates/home.hbs | 2 ++
app/templates/insufficient-oauth-permissions.hbs | 2 ++
app/templates/loading.hbs | 4 +++-
app/templates/logo.hbs | 4 +++-
app/templates/main.hbs | 4 +++-
app/templates/not-found.hbs | 4 +++-
app/templates/owner.hbs | 2 ++
app/templates/plans.hbs | 2 ++
app/templates/profile.hbs | 4 +++-
app/templates/team.hbs | 4 +++-
app/views/auth/signin.js | 5 -----
app/views/dashboard.js | 6 ------
app/views/error.js | 10 ----------
app/views/error404.js | 6 ------
app/views/first-sync.js | 5 -----
app/views/home-pro.js | 6 ------
app/views/home.js | 5 -----
app/views/insufficient-oauth-permissions.js | 5 -----
app/views/loading.js | 10 ----------
app/views/logo.js | 6 ------
app/views/main.js | 6 ------
app/views/not-found.js | 5 -----
app/views/owner.js | 6 ------
app/views/plans.js | 6 ------
app/views/profile.js | 12 ------------
app/views/team.js | 6 ------
34 files changed, 66 insertions(+), 114 deletions(-)
create mode 100644 app/components/travis-layout.js
delete mode 100644 app/views/auth/signin.js
delete mode 100644 app/views/dashboard.js
delete mode 100644 app/views/error.js
delete mode 100644 app/views/error404.js
delete mode 100644 app/views/first-sync.js
delete mode 100644 app/views/home-pro.js
delete mode 100644 app/views/home.js
delete mode 100644 app/views/insufficient-oauth-permissions.js
delete mode 100644 app/views/loading.js
delete mode 100644 app/views/logo.js
delete mode 100644 app/views/main.js
delete mode 100644 app/views/not-found.js
delete mode 100644 app/views/owner.js
delete mode 100644 app/views/plans.js
delete mode 100644 app/views/profile.js
delete mode 100644 app/views/team.js
diff --git a/app/components/travis-layout.js b/app/components/travis-layout.js
new file mode 100644
index 00000000..6e705e67
--- /dev/null
+++ b/app/components/travis-layout.js
@@ -0,0 +1,3 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({});
diff --git a/app/controllers/error.js b/app/controllers/error.js
index 38e5364f..344c515b 100644
--- a/app/controllers/error.js
+++ b/app/controllers/error.js
@@ -1,3 +1,15 @@
import Ember from 'ember';
-export default Ember.Controller.extend();
+export default Ember.Controller.extend({
+ layoutName: Ember.computed({
+ get(key) {
+ if(this._layoutName) {
+ return 'layouts/' + this._layoutName;
+ }
+ },
+
+ set(key, value) {
+ return this._layoutName = value;
+ }
+ })
+});
diff --git a/app/controllers/loading.js b/app/controllers/loading.js
index 38e5364f..344c515b 100644
--- a/app/controllers/loading.js
+++ b/app/controllers/loading.js
@@ -1,3 +1,15 @@
import Ember from 'ember';
-export default Ember.Controller.extend();
+export default Ember.Controller.extend({
+ layoutName: Ember.computed({
+ get(key) {
+ if(this._layoutName) {
+ return 'layouts/' + this._layoutName;
+ }
+ },
+
+ set(key, value) {
+ return this._layoutName = value;
+ }
+ })
+});
diff --git a/app/templates/auth/signin.hbs b/app/templates/auth/signin.hbs
index c5af9b3d..fda0bb4e 100644
--- a/app/templates/auth/signin.hbs
+++ b/app/templates/auth/signin.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/simple"}}
{{#if redirected}}
{{/if}}
@@ -14,3 +15,4 @@
{{/if}}
+{{/travis-layout}}
diff --git a/app/templates/dashboard.hbs b/app/templates/dashboard.hbs
index c24cd689..70454b53 100644
--- a/app/templates/dashboard.hbs
+++ b/app/templates/dashboard.hbs
@@ -1 +1,3 @@
-{{outlet}}
+{{#travis-layout layoutName="layouts/dashboard" class="dashboard"}}
+ {{outlet}}
+{{/travis-layout}}
diff --git a/app/templates/error404.hbs b/app/templates/error404.hbs
index cc397661..fb95f1fe 100644
--- a/app/templates/error404.hbs
+++ b/app/templates/error404.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/error" class="error error404"}}
@@ -8,3 +9,4 @@
404: Something's Missing
We're sorry! It seems like this page cannot be found.
+{{/travis-layout}}
diff --git a/app/templates/first-sync.hbs b/app/templates/first-sync.hbs
index d72e62d3..3cff22a1 100644
--- a/app/templates/first-sync.hbs
+++ b/app/templates/first-sync.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/simple"}}
{{#if isSyncing}}
@@ -23,3 +24,4 @@
{{/unless}}
+{{/travis-layout}}
diff --git a/app/templates/home-pro.hbs b/app/templates/home-pro.hbs
index 45319ab5..c3cdc5bb 100644
--- a/app/templates/home-pro.hbs
+++ b/app/templates/home-pro.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/landing-page" class="landing-pro"}}
+{{/travis-layout}}
diff --git a/app/templates/home.hbs b/app/templates/home.hbs
index cc41929d..89ba15ce 100644
--- a/app/templates/home.hbs
+++ b/app/templates/home.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/landing-page"}}
+{{/travis-layout}}
diff --git a/app/templates/insufficient-oauth-permissions.hbs b/app/templates/insufficient-oauth-permissions.hbs
index 5403a743..78073a0b 100644
--- a/app/templates/insufficient-oauth-permissions.hbs
+++ b/app/templates/insufficient-oauth-permissions.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/simple"}}

@@ -23,3 +24,4 @@
{{/if}}
+{{/travis-layout}}
diff --git a/app/templates/loading.hbs b/app/templates/loading.hbs
index 18503769..6350bd7a 100644
--- a/app/templates/loading.hbs
+++ b/app/templates/loading.hbs
@@ -1 +1,3 @@
-{{loading-indicator}}
\ No newline at end of file
+{{#travis-layout layoutName=layoutName}}
+ {{loading-indicator}}
+{{/travis-layout}}
diff --git a/app/templates/logo.hbs b/app/templates/logo.hbs
index f37a6e5e..10b99210 100644
--- a/app/templates/logo.hbs
+++ b/app/templates/logo.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/landing-page" class="landing-pro"}}
-
\ No newline at end of file
+
+{{/travis-layout}}
diff --git a/app/templates/main.hbs b/app/templates/main.hbs
index c24cd689..25a79202 100644
--- a/app/templates/main.hbs
+++ b/app/templates/main.hbs
@@ -1 +1,3 @@
-{{outlet}}
+{{#travis-layout layoutName="layouts/home" class="main"}}
+ {{outlet}}
+{{/travis-layout}}
diff --git a/app/templates/not-found.hbs b/app/templates/not-found.hbs
index 2f69fa59..a233a312 100644
--- a/app/templates/not-found.hbs
+++ b/app/templates/not-found.hbs
@@ -1 +1,3 @@
-The requested page was not found.
+{{#travis-layout layoutName="layouts/simple"}}
+ The requested page was not found.
+{{/travis-layout}}
diff --git a/app/templates/owner.hbs b/app/templates/owner.hbs
index 8cebd903..8a2ae6ed 100644
--- a/app/templates/owner.hbs
+++ b/app/templates/owner.hbs
@@ -1,3 +1,4 @@
+{{#travis-layout layoutName="layouts/profile" class="owner"}}