--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-04-29 19:09:09 -07:00
6 changed files with 20 additions and 23 deletions

View File

@@ -6,7 +6,7 @@
Scenario: Installed modules are listed Scenario: Installed modules are listed
Given I have installed Orchard Given I have installed Orchard
When I go to "admin/modules" When I go to "admin/modules"
Then I should see "<h2>Installed Modules</h2>" Then I should see "<h1>Installed Modules</h1>"
And I should see "<h3>Themes</h3>" And I should see "<h3>Themes</h3>"
And the status should be 200 OK And the status should be 200 OK

View File

@@ -62,7 +62,7 @@ this.ScenarioSetup(scenarioInfo);
#line 8 #line 8
testRunner.When("I go to \"admin/modules\""); testRunner.When("I go to \"admin/modules\"");
#line 9 #line 9
testRunner.Then("I should see \"<h2>Installed Modules</h2>\""); testRunner.Then("I should see \"<h1>Installed Modules</h1>\"");
#line 10 #line 10
testRunner.And("I should see \"<h3>Themes</h3>\""); testRunner.And("I should see \"<h3>Themes</h3>\"");
#line 11 #line 11

View File

@@ -9,7 +9,7 @@ namespace Orchard.Modules {
menu => menu menu => menu
.Add("Manage Features", "1.0", item => item.Action("Features", "Admin", new { area = "Orchard.Modules" }) .Add("Manage Features", "1.0", item => item.Action("Features", "Admin", new { area = "Orchard.Modules" })
.Permission(Permissions.ManageFeatures)) .Permission(Permissions.ManageFeatures))
.Add("Manage Modules", "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Modules" }) .Add("Installed Modules", "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Modules" })
.Permission(Permissions.ManageModules))); .Permission(Permissions.ManageModules)));
} }
} }

View File

@@ -94,10 +94,6 @@
<Content Include="Views\Admin\Edit.ascx" /> <Content Include="Views\Admin\Edit.ascx" />
<Content Include="Views\Web.config" /> <Content Include="Views\Web.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Views\DisplayTemplates\Items\" />
<Folder Include="Views\DisplayTemplates\Parts\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -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>&nbsp;&#124;&nbsp;<%=_Encoded("Depends on: ") %><% <li>&nbsp;&#124;&nbsp;<%=T("Depends on: {0}", string.Join(", ", feature.Descriptor.Dependencies.Select(s => Html.Link(Html.Encode(s), string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), 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>

View File

@@ -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">
<li><%=T("Version: {0}", !string.IsNullOrEmpty(module.Version) ? Html.Encode(module.Version) : T("1.0")) %></li>
<li>&nbsp;&#124;&nbsp;<%=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>
<li>&nbsp;&#124;&nbsp;<%=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>&nbsp;&#124;&nbsp;<%=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 class="related">
<%=Html.ActionLink(T("Edit").ToString(), "edit", new {moduleName = module.ModuleName, area = "Orchard.Modules"}) %><%=_Encoded(" | ")%> <%=Html.ActionLink(T("Edit").ToString(), "edit", new {moduleName = module.ModuleName, area = "Orchard.Modules"}) %><%=_Encoded(" | ")%>
<a href="#">Delete</a> <a href="#">Delete</a>
</div> </div>--%>
</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><%