From 836975f424096a637bad750a76c8bafaccbdb30c Mon Sep 17 00:00:00 2001 From: Lombiq Date: Thu, 18 Feb 2016 17:42:23 +0100 Subject: [PATCH 1/6] Removing unused code from Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml --- .../Views/Parts/MediaLibrary.Navigation.cshtml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml index 499c6211a..2685b6803 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml @@ -1,6 +1 @@ -@using Orchard.MediaLibrary.ViewModels -@{ - MediaManagerIndexViewModel viewModel = Model.MediaManagerIndexViewModel; - -} -
  • @T("Recent") +
  • @T("Recent") \ No newline at end of file From 2d9a5e04d707c012e810bb4ae976d0dd482ddd90 Mon Sep 17 00:00:00 2001 From: Lombiq Date: Fri, 19 Feb 2016 18:18:20 +0100 Subject: [PATCH 2/6] Fixing that titles of Custom Forms forms were double-encoded --- .../Modules/Orchard.CustomForms/Views/Item/Create.cshtml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml b/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml index 6fe2fcd59..72365658a 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml @@ -1,8 +1,11 @@ @using Orchard.ContentManagement @using Orchard.Utility.Extensions +@using Orchard.ContentManagement.Aspects; @{ ContentItem customForm = Model.ContentItem; string returnUrl = Model.ReturnUrl; + var metadata = customForm.ContentManager.GetItemMetadata(customForm); + var displayText = metadata != null ? MvcHtmlString.Create(metadata.DisplayText) : null; Html.AddPageClassNames("edit-" + customForm.ContentType.HtmlClassify()); @@ -12,7 +15,7 @@ var submitButtonText = String.IsNullOrEmpty(Model.ContentItem.CustomFormPart.SubmitButtonText) ? T("Submit").Text : Model.ContentItem.CustomFormPart.SubmitButtonText; } -@Display(New.Parts_Title().Title(Html.ItemDisplayText(customForm))) +@Display(New.Parts_Title().Title(displayText)) @using (Html.BeginFormAntiForgeryPost(returnUrl)) { @Html.ValidationSummary() From 4b8d11c1ed121993a1dcc20532893a58bf2b1292 Mon Sep 17 00:00:00 2001 From: Gustavo Tandeciarz Date: Tue, 23 Feb 2016 22:26:15 +0100 Subject: [PATCH 3/6] Fixes broken icons introduced into the media library by upgrading FontAwesome --- .../Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml | 4 ++-- .../Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml | 2 +- .../Views/Parts/MediaLibrary.Navigation.cshtml | 2 +- .../Modules/Orchard.MediaLibrary/Views/WebSearch/Index.cshtml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml index 83fabc58d..7f2905c88 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml @@ -96,7 +96,7 @@ var mediaLibrarySettings = { moveActionUrl: '@Url.Action("Move", "Folder", new {area = "Orchard.MediaLibrary"})', deleteActionUrl: '@Url.Action("Delete", "Admin", new {area = "Orchard.MediaLibrary"})', cloneActionUrl: '@Url.Action("Clone", "Admin", new {area = "Orchard.MediaLibrary"})', - hasFolderPath: @(viewModel.FolderPath != null ? "true" : "false"), + hasFolderPath: @(!string.IsNullOrEmpty(viewModel.FolderPath) ? "true" : "false"), folderPath: '@HttpUtility.JavaScriptStringEncode(viewModel.FolderPath)', deleteConfirmationMessage: '@HttpUtility.JavaScriptStringEncode(T("Are you sure you want to delete these media items ?").Text)', cloneConfirmationMessage: '@HttpUtility.JavaScriptStringEncode(T("Are you sure you want to clone this media item ?").Text)', @@ -110,7 +110,7 @@ var mediaLibrarySettings = {
  • - +
    diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml index d2f46d5c7..a8940840d 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml @@ -53,7 +53,7 @@
    @T("Please enter the URL of the embeddable media you want to integrate (requires an oEmbed compatible media provider such as YouTube):")
    - +
    diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml index 2685b6803..d89ad7004 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Parts/MediaLibrary.Navigation.cshtml @@ -1 +1 @@ -
  • @T("Recent") \ No newline at end of file +
  • @T("Recent") \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/WebSearch/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/WebSearch/Index.cshtml index 4512a6999..39520f175 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/WebSearch/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/WebSearch/Index.cshtml @@ -37,7 +37,7 @@
    - +
    From 6cd28be1a05d4a0a9e20a11d09df0a4fe5c9b106 Mon Sep 17 00:00:00 2001 From: Lombiq Date: Tue, 23 Feb 2016 22:28:41 +0100 Subject: [PATCH 4/6] MediaLibrary: Fixing invalid HTML in OEmbed template --- .../Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml index a8940840d..39889b802 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/OEmbed/Index.cshtml @@ -56,7 +56,7 @@
    - +
  • From b983787d0d9370ec8c1158ee1f66c4214b7f245b Mon Sep 17 00:00:00 2001 From: Lombiq Date: Wed, 24 Feb 2016 00:11:24 +0100 Subject: [PATCH 5/6] Media Library: Fixing NRE when renaming folder while having ManageMediaContent permission --- .../Orchard.MediaLibrary/Controllers/FolderController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs index da6065f17..33927b245 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/FolderController.cs @@ -165,7 +165,7 @@ namespace Orchard.MediaLibrary.Controllers { foreach (var media in Services.ContentManager.Query().ForPart().ForContentItems(mediaItemIds).List()) { // don't try to rename the file if there is no associated media file - if (!String.IsNullOrEmpty(media.FileName)) { + if (!string.IsNullOrEmpty(media.FileName)) { var uniqueFilename = _mediaLibraryService.GetUniqueFilename(folderPath, media.FileName); _mediaLibraryService.MoveFile(media.FolderPath, media.FileName, folderPath, uniqueFilename); media.FileName = uniqueFilename; @@ -179,7 +179,10 @@ namespace Orchard.MediaLibrary.Controllers { private bool IsRootFolder(string folderPath) { var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder(); - return String.Equals(rootMediaFolder.MediaPath, folderPath, StringComparison.OrdinalIgnoreCase); + + return rootMediaFolder == null ? + string.IsNullOrEmpty(folderPath) : + string.Equals(rootMediaFolder.MediaPath, folderPath, StringComparison.OrdinalIgnoreCase); } } } \ No newline at end of file From f0dd64d5c9f85f1fe327200bb26fc2395dae5a90 Mon Sep 17 00:00:00 2001 From: Lombiq Date: Fri, 26 Feb 2016 22:20:00 +0100 Subject: [PATCH 6/6] Fixing typo in an Azure Media Services template --- .../Views/EditorTemplates/EncodingSettingsViewModel.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/EncodingSettingsViewModel.cshtml b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/EncodingSettingsViewModel.cshtml index 7aaf12a96..a5e5b0e32 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/EncodingSettingsViewModel.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/EncodingSettingsViewModel.cshtml @@ -30,7 +30,7 @@
    -

    @T("Leave empty if this is standard preset (in which case the name must match a standard Microsoft Azure Media Services encoding preset name.")

    +

    @T("Leave empty if this is a standard preset (in which case the name must match a standard Microsoft Azure Media Services encoding preset name).")