From 6440cf9f5ee5de0e3a3ef533a90b37922a12d171 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Tue, 5 Aug 2014 15:49:01 -0700 Subject: [PATCH] #20855: Autoroute editor improvement Work Item: 20855 --- .../EditorTemplates/Parts.Autoroute.Edit.cshtml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml index 01e54b00f..072222774 100644 --- a/src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml @@ -26,8 +26,16 @@ @T("Save the current item and leave the input empty to have it automatically generated using the pattern {0} e.g., {1}", defaultPattern.Name, defaultPattern.Description) } else { - @Url.MakeAbsolute("/")@urlPrefix - @T("Save the current item and the url will be generated using the pattern {0} e.g., {1}", defaultPattern.Name, defaultPattern.Description) + var hintClass = string.Empty; + if (!string.IsNullOrEmpty(Model.CurrentUrl)) { + hintClass = "hint"; + @Url.MakeAbsolute("/")@urlPrefix@Model.CurrentUrl + } + + if (string.IsNullOrEmpty(Model.CurrentUrl) + || (!string.IsNullOrEmpty(Model.CurrentUrl) && Model.Settings.AutomaticAdjustmentOnEdit)) { + @T("Save the current item and the url will be generated using the pattern {0} e.g., {1}", defaultPattern.Name, defaultPattern.Description) + } }