From 66399bd58cc314f3b86e1507859d2915d353504a Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Mon, 11 Aug 2014 12:47:45 +0200 Subject: [PATCH] Adding not found url --- app/coffee/app.coffee | 5 +++-- app/partials/error.jade | 2 +- app/partials/not-found.jade | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 app/partials/not-found.jade diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index 9c1b201b..3fe8e9b0 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -126,8 +126,9 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, tgLoade $routeProvider.when("/invitation/:token", {templateUrl: "/partials/invitation.html"}) $routeProvider.when("/error", {templateUrl: "/partials/error.html"}) + $routeProvider.when("/not-found", {templateUrl: "/partials/not-found.html"}) - $routeProvider.otherwise({redirectTo: '/login'}) + $routeProvider.otherwise({redirectTo: '/not-found'}) $locationProvider.html5Mode(true) defaultHeaders = { @@ -147,7 +148,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, tgLoade return promise.then null, (response) -> if response.status == 0 $confirm.notify("error", "One of our Oompa Loompas says we are having a network problem. Please, try again in a few moments.") #TODO: i18n - $location.url("/error") + $location.path("/error") else if response.status == 401 nextPath = $location.path() $location.url("/login").search("next=#{nextPath}") diff --git a/app/partials/error.jade b/app/partials/error.jade index adbbc33a..91fef8b1 100644 --- a/app/partials/error.jade +++ b/app/partials/error.jade @@ -1 +1 @@ -h1 TODO +h1 TODO error diff --git a/app/partials/not-found.jade b/app/partials/not-found.jade new file mode 100644 index 00000000..502d42dc --- /dev/null +++ b/app/partials/not-found.jade @@ -0,0 +1 @@ +h1 TODO error not found