From 0071ff339d8e2b09a1109243e108847d49b36bcd Mon Sep 17 00:00:00 2001 From: BertrandLeRoy Date: Thu, 16 Sep 2010 12:25:11 -0700 Subject: [PATCH 1/3] Deleted Futures.Modules.Packaging.csproj that had been added back by mistake. --HG-- branch : dev --- .../Futures.Modules.Packaging.csproj | 126 ------------------ 1 file changed, 126 deletions(-) delete mode 100644 src/Orchard.Web/Modules/Futures.Modules.Packaging/Futures.Modules.Packaging.csproj diff --git a/src/Orchard.Web/Modules/Futures.Modules.Packaging/Futures.Modules.Packaging.csproj b/src/Orchard.Web/Modules/Futures.Modules.Packaging/Futures.Modules.Packaging.csproj deleted file mode 100644 index 7653cf843..000000000 --- a/src/Orchard.Web/Modules/Futures.Modules.Packaging/Futures.Modules.Packaging.csproj +++ /dev/null @@ -1,126 +0,0 @@ - - - - Debug - AnyCPU - - - 2.0 - {DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059} - {F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - Futures.Modules.Packaging - Futures.Modules.Packaging - v4.0 - false - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - - - - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - 3.5 - - - - 3.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} - Orchard.Framework - - - - - - - - - - - - - - - - False - True - 40980 - / - - - False - True - http://orchard.codeplex.com - False - - - - - \ No newline at end of file From eaf946c6e46c6102e9a4420698250a85b1d77507 Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Thu, 16 Sep 2010 12:40:53 -0700 Subject: [PATCH 2/3] Updating some views in tags --HG-- branch : dev --- .../Orchard.Tags/Controllers/HomeController.cs | 15 ++++++++++----- .../ViewModels/TagsSearchViewModel.cs | 2 +- .../DisplayTemplates/Parts/Tags.ShowTags.cshtml | 15 ++++++++++++--- .../Modules/Orchard.Tags/Views/Home/Search.cshtml | 12 +++++++++--- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Controllers/HomeController.cs b/src/Orchard.Web/Modules/Orchard.Tags/Controllers/HomeController.cs index 103fc08d2..781f8c090 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Controllers/HomeController.cs +++ b/src/Orchard.Web/Modules/Orchard.Tags/Controllers/HomeController.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Web.Mvc; using JetBrains.Annotations; using Orchard.ContentManagement; +using Orchard.DisplayManagement; using Orchard.Localization; using Orchard.Logging; using Orchard.Security; @@ -15,10 +16,12 @@ namespace Orchard.Tags.Controllers { public class HomeController : Controller { private readonly ITagService _tagService; private readonly IContentManager _contentManager; + private readonly IShapeHelperFactory _shapeHelperFactory; - public HomeController(ITagService tagService, IContentManager contentManager) { + public HomeController(ITagService tagService, IContentManager contentManager, IShapeHelperFactory shapeHelperFactory) { _tagService = tagService; _contentManager = contentManager; + _shapeHelperFactory = shapeHelperFactory; T = NullLocalizer.Instance; } @@ -40,13 +43,15 @@ namespace Orchard.Tags.Controllers { return RedirectToAction("Index"); } - var items = - _tagService.GetTaggedContentItems(tag.Id).Select( - ic => _contentManager.BuildDisplayModel(ic, "SummaryForSearch")); + var shape = _shapeHelperFactory.CreateHelper(); + var list = shape.List(); + foreach (var taggedContentItem in _tagService.GetTaggedContentItems(tag.Id)) { + list.Add(_contentManager.BuildDisplayModel(taggedContentItem, "Summary")); + } var viewModel = new TagsSearchViewModel { TagName = tag.TagName, - Items = (IList) items.ToList() + List = list }; return View(viewModel); diff --git a/src/Orchard.Web/Modules/Orchard.Tags/ViewModels/TagsSearchViewModel.cs b/src/Orchard.Web/Modules/Orchard.Tags/ViewModels/TagsSearchViewModel.cs index 990f95f42..b300d38ac 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/ViewModels/TagsSearchViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Tags/ViewModels/TagsSearchViewModel.cs @@ -4,6 +4,6 @@ using Orchard.ContentManagement; namespace Orchard.Tags.ViewModels { public class TagsSearchViewModel { public string TagName { get; set; } - public IEnumerable Items { get; set; } + public dynamic List { get; set; } } } diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/DisplayTemplates/Parts/Tags.ShowTags.cshtml b/src/Orchard.Web/Modules/Orchard.Tags/Views/DisplayTemplates/Parts/Tags.ShowTags.cshtml index a44ffefbb..5cb79d660 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/DisplayTemplates/Parts/Tags.ShowTags.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/DisplayTemplates/Parts/Tags.ShowTags.cshtml @@ -1,8 +1,17 @@ @model Orchard.Tags.Models.TagsPart +@{ + var tagsHtml = new List(); + foreach(var t in Model.CurrentTags) { + if (tagsHtml.Any()) { + tagsHtml.Add(new HtmlString(",")); + } + tagsHtml.Add(Html.ActionLink(t.TagName, "Search", "Home", new { area = "Orchard.Tags", tagName = t.TagName }, new { })); + } +} -@if (Model.CurrentTags.Count > 0) { +@if (tagsHtml.Any()) {

@T("Tags:") - <%=string.Join(", ", Model.CurrentTags.Select(t => Html.ActionLink(Html.Encode(t.TagName), "Search", "Home", new { area = "Orchard.Tags", tagName = t.TagName }, new { }).ToHtmlString()).ToArray())%> + @foreach(var htmlString in tagsHtml) { @htmlString }

-} \ No newline at end of file +} diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.cshtml b/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.cshtml index c34876962..e8dc9d9a3 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.cshtml @@ -1,5 +1,11 @@ @model Orchard.Tags.ViewModels.TagsSearchViewModel -@Html.AddTitleParts(T("Tags").ToString(), T("Contents tagged with {0}", Model.TagName).ToString()); -

@T("Contents tagged with {0}", Html.Encode(Model.TagName))

-@Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c), "taggedPosts contentItems") +@{ + Html.AddTitleParts(T("Tags").ToString()); + Html.AddTitleParts(T("Contents tagged with {0}", Model.TagName).ToString()); + Model.List.Classes.Add("taggedPosts"); + Model.List.Classes.Add("contentItems"); +} + +

@T("Contents tagged with {0}", Model.TagName)

+@Display(Model.List) From 7ab05d9f88e9bd06016c08d1b2db8b91c41da05b Mon Sep 17 00:00:00 2001 From: Suha Can Date: Thu, 16 Sep 2010 13:16:32 -0700 Subject: [PATCH 3/3] - Commenting some RegisterStyle calls so they can be moved to the new Script/Style manager when it becomes available. --HG-- branch : dev --- .../EditorTemplates/Parts/ArchiveLater.cshtml | 14 ++++++++++++++ .../Orchard.Indexing/Views/Admin/Index.cshtml | 5 +++++ .../Modules/Orchard.Media/Views/Admin/Add.cshtml | 6 +++++- .../Orchard.Media/Views/Admin/Create.cshtml | 6 +++++- .../Modules/Orchard.Media/Views/Admin/Edit.cshtml | 6 +++++- .../Orchard.Media/Views/Admin/EditMedia.cshtml | 6 +++++- .../Views/Admin/EditProperties.cshtml | 6 +++++- .../Orchard.Search/Views/Search/Index.cshtml | 6 ++++++ 8 files changed, 50 insertions(+), 5 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/EditorTemplates/Parts/ArchiveLater.cshtml b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/EditorTemplates/Parts/ArchiveLater.cshtml index ab80e075e..344b5e55f 100644 --- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/EditorTemplates/Parts/ArchiveLater.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/EditorTemplates/Parts/ArchiveLater.cshtml @@ -1,6 +1,20 @@ @model Orchard.ArchiveLater.ViewModels.ArchiveLaterViewModel @using System.Web.Mvc.Html +@/* +migrate to new resource manager +<% Html.RegisterStyle("datetime.css"); %> +<% Html.RegisterStyle("jquery-ui-1.7.2.custom.css"); %> +<% Html.RegisterStyle("ui.datepicker.css"); %> +<% Html.RegisterStyle("ui.timepickr.css"); %> +<% Html.RegisterFootScript("jquery.ui.core.js"); %> +<% Html.RegisterFootScript("jquery.ui.widget.js"); %> +<% Html.RegisterFootScript("jquery.ui.datepicker.js"); %> +<% Html.RegisterFootScript("jquery.utils.js"); %> +<% Html.RegisterFootScript("ui.timepickr.js"); %> + */ + +
@T("Archive Settings")
diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Indexing/Views/Admin/Index.cshtml index 89c56cb3f..8168843aa 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Views/Admin/Index.cshtml @@ -1,5 +1,10 @@ @model Orchard.Indexing.ViewModels.IndexViewModel +@/* +migrate to new resource manager +<% Html.RegisterStyle("admin.css"); %> + */ +

@Html.TitleForPage(T("Search Index Management").ToString())

@using (Html.BeginForm("update", "admin", FormMethod.Post, new {area = "Orchard.Indexing"})) {
diff --git a/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.cshtml b/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.cshtml index e758d6b3c..3d242aa2b 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.cshtml @@ -1,8 +1,12 @@ @model Orchard.Media.ViewModels.MediaItemAddViewModel - @using Orchard.Media.Helpers @using Orchard.Media.Models +@/* +migrate to new resource manager +<% Html.RegisterStyle("admin.css"); %> + */ +

@Html.TitleForPage(T("Add Media").ToString())