diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js
index 7f9d05aebc..8f613469a3 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js
@@ -1,7 +1,7 @@
(function () {
'use strict';
- function ContentNodeInfoDirective($timeout, $location, logResource, eventsService, userService, localizationService, dateHelper) {
+ function ContentNodeInfoDirective($timeout, $location, logResource, eventsService, userService, localizationService, dateHelper, redirectUrlsResource) {
function link(scope, element, attrs, ctrl) {
@@ -46,6 +46,9 @@
// Make sure to set the node status
setNodePublishStatus(scope.node);
+ //default setting for redirect url management
+ scope.urlTrackerDisabled = false;
+
// Declare a fallback URL for the
+ * redirectUrlsResource.getRedirectsForContentItem("udi:123456")
+ * .then(function(response) {
+ *
+ * });
+ *
+ * @param {String} contentUdi identifier for the content item to retrieve redirects for
+ */
+ function getRedirectsForContentItem(contentUdi) {
+ return umbRequestHelper.resourcePromise(
+ $http.get(
+ umbRequestHelper.getApiUrl(
+ "redirectUrlManagementApiBaseUrl",
+ "RedirectUrlsForContentItem",
+ { contentUdi: contentUdi })),
+ 'Failed to retrieve redirects for content: ' + contentUdi);
+ }
function getEnableState() {
@@ -50,7 +76,7 @@
"GetEnableState")),
'Failed to retrieve data to check if the 301 redirect is enabled');
}
-
+
/**
* @ngdoc function
* @name umbraco.resources.redirectUrlResource#deleteRedirectUrl
@@ -107,7 +133,8 @@
searchRedirectUrls: searchRedirectUrls,
deleteRedirectUrl: deleteRedirectUrl,
toggleUrlTracker: toggleUrlTracker,
- getEnableState: getEnableState
+ getEnableState: getEnableState,
+ getRedirectsForContentItem: getRedirectsForContentItem
};
return resource;
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-content-node-info.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-content-node-info.html
index 7e80aa2fca..0706e9596c 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-content-node-info.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-content-node-info.html
@@ -19,6 +19,23 @@
+