From e8b8a8895fbfedc0c3ef650988a1b9db4ba4d1c6 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Thu, 29 Apr 2010 14:03:24 -0700 Subject: [PATCH] Some work on the installed modules page. - representing more of the module info and linking in to contained features --HG-- branch : dev --- .../Orchard.Modules/Views/Admin/Features.ascx | 9 ++----- .../Orchard.Modules/Views/Admin/Index.ascx | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx index b604c24c6..d4f4474b0 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx +++ b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx @@ -23,7 +23,7 @@ using (Html.BeginFormAntiForgeryPost()) { %>

<%=Html.Encode(featureGroup.First().Descriptor.Category ?? T("General")) %>

diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx index ca0588562..c54567b93 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx +++ b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx @@ -1,22 +1,28 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Modules.ViewModels"%> -

<%=Html.TitleForPage(T("Manage Modules").ToString()) %>

-
<%=Html.ActionLink(T("Install a module").ToString(), "Features", new { }, new { @class = "button primaryAction" })%>
-

<%=T("Installed Modules") %>

+

<%=Html.TitleForPage(T("Installed Modules").ToString()) %>

+<%--
<%=Html.ActionLink(T("Install a module").ToString(), "Features", new { }, new { @class = "button primaryAction" })%>
--%> +<%--

<%=T("Installed Modules") %>

--%> <% if (Model.Modules.Count() > 0) { %> -
-
    <% +
    +
      <% foreach (var module in Model.Modules.OrderBy(m => m.DisplayName)) { %>
    • <%=Html.Encode(module.DisplayName) %>

      - +
        +
      • <%=T("Version: {0}", !string.IsNullOrEmpty(module.Version) ? Html.Encode(module.Version) : T("1.0")) %>
      • +
      •  | <%=T("Features: {0}", string.Join(", ", module.Features.Select(f => Html.Link(Html.Encode(f.Name), string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), Html.Encode(f.Name)) )).OrderBy(s => s).ToArray())) %>
      • +
      •  | <%=T("Author: {0}", !string.IsNullOrEmpty(module.Author) ? Html.Encode(module.Author) : (new []{"Bradley", "Bertrand", "Renaud", "Suha", "Sebastien", "Jon", "Nathan", "Erik"})[(module.DisplayName.Length + (new Random()).Next()) % 7]) %>
      • <%-- very efficient, I know --%> +
      •  | <%=T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? Html.Encode(module.HomePage) : T("http://orchardproject.net"))%>
      • +
      + <%----%>
      <% if (!string.IsNullOrEmpty(module.Description)) { %>

      <%=Html.Encode(module.Description) %>

      <%