From 59599efab60ad842774e04b2497f1c9b7755201e Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 25 Nov 2013 14:45:14 +1100 Subject: [PATCH] Fixes: U4-3655 Clicking on recycle bin in media section redirects you back to the content tree --- src/Umbraco.Web.UI.Client/src/routes.js | 10 +++++----- src/Umbraco.Web/Trees/ContentTreeControllerBase.cs | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/routes.js b/src/Umbraco.Web.UI.Client/src/routes.js index 15f08ec2cc..11e6478178 100644 --- a/src/Umbraco.Web.UI.Client/src/routes.js +++ b/src/Umbraco.Web.UI.Client/src/routes.js @@ -67,19 +67,19 @@ app.config(function ($routeProvider) { return 'views/common/legacy.html'; }, resolve: checkAuth(true) - }) - .when('/:section/:method', { - templateUrl: function(rp) { + }) + .when('/:section/:tree/:method', { + templateUrl: function (rp) { if (!rp.method) return "views/common/dashboard.html"; - + //NOTE: This current isn't utilized by anything but does open up some cool opportunities for // us since we'll be able to have specialized views for individual sections which is something // we've never had before. So could utilize this for a new dashboard model when we get native // angular dashboards working. Perhaps a normal section dashboard would list out the registered // dashboards (as tabs if we wanted) and each tab could actually be a route link to one of these views? - return 'views/' + rp.section + '/' + rp.method + '.html'; + return 'views/' + rp.tree + '/' + rp.method + '.html'; }, resolve: checkAuth(true) }) diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 6b9b46e0bf..fd18c03c37 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -111,7 +111,11 @@ namespace Umbraco.Web.Trees ui.GetText("general", "recycleBin"), "icon-trash", RecycleBinSmells, - queryStrings.GetValue("application") + TreeAlias.EnsureStartsWith('/') + "/recyclebin")); + //TODO: This would be nice to enable so we can have a nice recyclebin view, see the NOTE: in the routes.js angular file + // for the time being we'll just load the dashboard of the section. + //queryStrings.GetValue("application") + TreeAlias.EnsureStartsWith('/') + "/recyclebin")); + queryStrings.GetValue("application"))); + } return nodes;