mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Some work on the installed modules page.
- representing more of the module info and linking in to contained features --HG-- branch : dev
This commit is contained in:
@@ -23,7 +23,7 @@ using (Html.BeginFormAntiForgeryPost()) { %>
|
|||||||
<h2><%=Html.Encode(featureGroup.First().Descriptor.Category ?? T("General")) %></h2>
|
<h2><%=Html.Encode(featureGroup.First().Descriptor.Category ?? T("General")) %></h2>
|
||||||
<ul><%
|
<ul><%
|
||||||
foreach (var feature in featureGroup) {%>
|
foreach (var feature in featureGroup) {%>
|
||||||
<li<%=feature == featureGroup.Last() ? " class=\"last\"" : "" %>>
|
<li<%=feature == featureGroup.Last() ? " class=\"last\"" : "" %> id="<%=Html.Encode(feature.Descriptor.Name) %>">
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
<div class="properties">
|
<div class="properties">
|
||||||
<input type="checkbox" name="selection" value="<%=Html.Encode(feature.Descriptor.Name) %>" />
|
<input type="checkbox" name="selection" value="<%=Html.Encode(feature.Descriptor.Name) %>" />
|
||||||
@@ -40,12 +40,7 @@ using (Html.BeginFormAntiForgeryPost()) { %>
|
|||||||
</li><%
|
</li><%
|
||||||
//dependencies
|
//dependencies
|
||||||
if (feature.Descriptor.Dependencies.Count() > 0) { %>
|
if (feature.Descriptor.Dependencies.Count() > 0) { %>
|
||||||
<li> | <%=_Encoded("Depends on: ") %><%
|
<li> | <%=T("Depends on: {0}", string.Join(", ", feature.Descriptor.Dependencies.Select(s => Html.Encode(s)).OrderBy(s => s).ToArray())) %></li><%
|
||||||
foreach (var dependency in feature.Descriptor.Dependencies) {
|
|
||||||
%><% if (dependency != feature.Descriptor.Dependencies.First()) { %><%=_Encoded(", ") %><% }
|
|
||||||
%><%=Html.Encode(dependency) %><%
|
|
||||||
} %>
|
|
||||||
</li><%
|
|
||||||
} %>
|
} %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,22 +1,28 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ModulesIndexViewModel>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ModulesIndexViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<%@ Import Namespace="Orchard.Modules.ViewModels"%>
|
<%@ Import Namespace="Orchard.Modules.ViewModels"%>
|
||||||
<h1><%=Html.TitleForPage(T("Manage Modules").ToString()) %></h1>
|
<h1><%=Html.TitleForPage(T("Installed Modules").ToString()) %></h1>
|
||||||
<div class="manage"><%=Html.ActionLink(T("Install a module").ToString(), "Features", new { }, new { @class = "button primaryAction" })%></div>
|
<%--<div class="manage"><%=Html.ActionLink(T("Install a module").ToString(), "Features", new { }, new { @class = "button primaryAction" })%></div>--%>
|
||||||
<h2><%=T("Installed Modules") %></h2>
|
<%--<h2><%=T("Installed Modules") %></h2>--%>
|
||||||
<% if (Model.Modules.Count() > 0) { %>
|
<% if (Model.Modules.Count() > 0) { %>
|
||||||
<fieldset class="pageList">
|
<fieldset class="">
|
||||||
<ul class="contentItems blogs"><%
|
<ul class="contentItems"><%
|
||||||
foreach (var module in Model.Modules.OrderBy(m => m.DisplayName)) { %>
|
foreach (var module in Model.Modules.OrderBy(m => m.DisplayName)) { %>
|
||||||
<li>
|
<li>
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
<div class="properties">
|
<div class="properties">
|
||||||
<h3><%=Html.Encode(module.DisplayName) %></h3>
|
<h3><%=Html.Encode(module.DisplayName) %></h3>
|
||||||
<div class="related">
|
<ul class="pageStatus" style="color:#666">
|
||||||
<%=Html.ActionLink(T("Edit").ToString(), "edit", new {moduleName = module.ModuleName, area = "Orchard.Modules"}) %><%=_Encoded(" | ")%>
|
<li><%=T("Version: {0}", !string.IsNullOrEmpty(module.Version) ? Html.Encode(module.Version) : T("1.0")) %></li>
|
||||||
<a href="#">Delete</a>
|
<li> | <%=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())) %></li>
|
||||||
</div>
|
<li> | <%=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]) %></li><%-- very efficient, I know --%>
|
||||||
|
<li> | <%=T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? Html.Encode(module.HomePage) : T("<a href=\"http://orchardproject.net\">http://orchardproject.net</a>"))%></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<%--<div class="related">
|
||||||
|
<%=Html.ActionLink(T("Edit").ToString(), "edit", new {moduleName = module.ModuleName, area = "Orchard.Modules"}) %><%=_Encoded(" | ")%>
|
||||||
|
<a href="#">Delete</a>
|
||||||
|
</div>--%>
|
||||||
</div><%
|
</div><%
|
||||||
if (!string.IsNullOrEmpty(module.Description)) { %>
|
if (!string.IsNullOrEmpty(module.Description)) { %>
|
||||||
<p><%=Html.Encode(module.Description) %></p><%
|
<p><%=Html.Encode(module.Description) %></p><%
|
||||||
|
Reference in New Issue
Block a user