Migrating Orchard.Modules and Orchard.Packaging

--HG--
branch : theming
This commit is contained in:
Sebastien Ros
2010-09-10 13:14:07 -07:00
parent 2c19ba8ed2
commit f9de6ec621
32 changed files with 283 additions and 270 deletions

View File

@@ -81,8 +81,8 @@
</ItemGroup>
<ItemGroup>
<Content Include="Module.txt" />
<Content Include="Views\Admin\Add.ascx" />
<Content Include="Views\Admin\Index.ascx" />
<None Include="Views\Admin\Add.cshtml" />
<None Include="Views\Admin\Index.cshtml" />
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
@@ -90,12 +90,16 @@
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
<Name>Orchard.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\Orchard.Packaging\Orchard.Packaging.csproj">
<Project>{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}</Project>
<Name>Orchard.Packaging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Content\Admin\images\disabled.gif" />
<Content Include="Content\Admin\images\enabled.gif" />
<Content Include="styles\admin.css" />
<Content Include="Views\Admin\Features.ascx" />
<None Include="Views\Admin\Features.cshtml" />
<Content Include="Views\Web.config" />
</ItemGroup>
<ItemGroup />

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using Orchard.Mvc.ViewModels;
namespace Orchard.Modules.ViewModels {
public class FeaturesViewModel : BaseViewModel {
public class FeaturesViewModel {
public IEnumerable<IModuleFeature> Features { get; set; }
public IEnumerable<string> FeaturesThatNeedUpdate { get; set; }
}

View File

@@ -1,6 +1,4 @@
using Orchard.Mvc.ViewModels;
namespace Orchard.Modules.ViewModels {
public class ModuleAddViewModel : BaseViewModel {
namespace Orchard.Modules.ViewModels {
public class ModuleAddViewModel {
}
}

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using Orchard.Mvc.ViewModels;
namespace Orchard.Modules.ViewModels {
public class ModulesIndexViewModel : BaseViewModel {
public class ModulesIndexViewModel {
public IEnumerable<IModule> Modules { get; set; }
}
}

View File

@@ -1,11 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ModuleAddViewModel>" %>
<%@ Import Namespace="Orchard.Modules.ViewModels" %>
<h1><%: Html.TitleForPage(T("Install a Module").ToString()) %></h1><%
using (Html.BeginFormAntiForgeryPost(Url.Action("add", new { area = "Orchard.Modules" }), FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
<%: Html.ValidationSummary()
%><fieldset>
<label for="ModulePackage"><%:T("Module Package") %></label>
<input type="file" id="ModulePackage" size="64" name="ModulePackage" />
</fieldset>
<button type="submit" class="button primaryAction"><%:T("Install") %></button><%
} %>

View File

@@ -0,0 +1,14 @@
@model ModuleAddViewModel
@using Orchard.Modules.ViewModels
@{
<h1>@Html.TitleForPage(T("Install a Module").ToString())</h1>
using (Html.BeginFormAntiForgeryPost(Url.Action("add", new { area = "Orchard.Modules" }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
Html.ValidationSummary();
<fieldset>
<label for="ModulePackage">@T("Module Package")</label>
<input type="file" id="ModulePackage" size="64" name="ModulePackage" />
</fieldset>
<button type="submit" class="button primaryAction">@T("Install")</button>
}
}

View File

@@ -1,84 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<FeaturesViewModel>" %>
<%@ Import Namespace="Orchard.Localization" %>
<%@ Import Namespace="Orchard.Modules.Extensions" %>
<%@ Import Namespace="Orchard.Modules.ViewModels"%>
<%@ Import Namespace="Orchard.Utility.Extensions" %>
<%@ Import Namespace="Orchard.Modules.Models" %><%
Html.RegisterStyle("admin.css"); %>
<h1><%: Html.TitleForPage(T("Manage Features").ToString()) %></h1>
<% if (Model.Features.Count() > 0) { %>
<ul class="<% Html.RenderPartial("UI/Switchable", "features summary-view"); %>"><%
var featureGroups = Model.Features.OrderBy(f => f.Descriptor.Category, new DoghouseComparer("Core")).GroupBy(f => f.Descriptor.Category);
foreach (var featureGroup in featureGroups) {
var categoryName = LocalizedString.TextOrDefault(featureGroup.First().Descriptor.Category, T("Uncategorized"));
var categoryClassName = string.Format("category {0}", Html.Encode(categoryName.ToString().HtmlClassify()));
if (featureGroup == featureGroups.First())
categoryClassName += " first";
if (featureGroup == featureGroups.Last())
categoryClassName += " last";
//temporarily "disable" actions on core features
var showActions = categoryName.ToString() != "Core"; %>
<li class="<%=categoryClassName %>">
<h2><%: categoryName %></h2>
<ul><%
var features = featureGroup.OrderBy(f => f.Descriptor.Name);
foreach (var feature in features) {
//hmmm...I feel like I've done this before...
var featureId = feature.Descriptor.Name.AsFeatureId(n => T(n));
var featureState = feature.IsEnabled ? "enabled" : "disabled";
var featureClassName = string.Format("feature {0}", featureState + (Model.FeaturesThatNeedUpdate.Contains(feature.Descriptor.Name) ? " update" : String.Empty));
if (feature == features.First())
featureClassName += " first";
if (feature == features.Last())
featureClassName += " last";%>
<li class="<%:featureClassName%>" id="<%:featureId%>" title="<%:T("{0} is {1}", Html.AttributeEncode(feature.Descriptor.Name), featureState)%>">
<div class="summary">
<div class="properties">
<h3><%=string.Join(".&#8203;", feature.Descriptor.Name.Split('.').Select(s => Html.Encode(s)))%></h3>
<p class="description"><%:feature.Descriptor.Description%></p><%
if (feature.Descriptor.Dependencies != null && feature.Descriptor.Dependencies.Any()) {%>
<div class="dependencies">
<h4><%:T("Depends on:")%></h4>
<%:Html.UnorderedList(
feature.Descriptor.Dependencies.OrderBy(s => s),
(s, i) => Html.Link(s, string.Format("#{0}", s.AsFeatureId(n => T(n)))),
"",
"dependency",
"")%>
</div><%
}%>
</div>
<div class="actions">
<%
if (showActions) {
if (feature.IsEnabled) {
using (Html.BeginFormAntiForgeryPost(string.Format("{0}", Url.Action("Disable", new { area = "Orchard.Modules" })), FormMethod.Post, new {@class = "inline link"})) { %>
<%:Html.Hidden("id", feature.Descriptor.Name, new {id = ""})%>
<%:Html.Hidden("force", true)%>
<button type="submit"><%:T("Disable")%></button><%
}
}
else {
using (Html.BeginFormAntiForgeryPost(string.Format("{0}", Url.Action("Enable", new { area = "Orchard.Modules" })), FormMethod.Post, new {@class = "inline link"})) { %>
<%: Html.Hidden("id", feature.Descriptor.Name, new { id = "" })%>
<%: Html.Hidden("force", true)%>
<button type="submit"><%: T("Enable") %></button><%
}
}
}
if(Model.FeaturesThatNeedUpdate.Contains(feature.Descriptor.Name)){
using (Html.BeginFormAntiForgeryPost(string.Format("{0}", Url.Action("Update", new { area = "Orchard.Modules" })), FormMethod.Post, new {@class = "inline link"})) { %>
<%: Html.Hidden("id", feature.Descriptor.Name, new { id = "" })%>
<button type="submit" class="update"><%: T("Update") %></button><%
}
}%>
</div>
</div>
</li><%
} %>
</ul>
</li><%
} %>
</ul><%
} %>

View File

@@ -0,0 +1,83 @@
@model FeaturesViewModel
@using Orchard.Localization
@using Orchard.Modules.Extensions
@using Orchard.Modules.ViewModels
@using Orchard.Utility.Extensions
@using Orchard.Modules.Models
<h1>@Html.TitleForPage(T("Manage Features").ToString()).</h1>
@if (Model.Features.Count() > 0) {
<ul class="features summary-view">@{
var featureGroups = Model.Features.OrderBy(f => f.Descriptor.Category, new DoghouseComparer("Core")).GroupBy(f => f.Descriptor.Category);
foreach (var featureGroup in featureGroups) {
var categoryName = LocalizedString.TextOrDefault(featureGroup.First().Descriptor.Category, T("Uncategorized"));
var categoryClassName = string.Format("category {0}", Html.Encode(categoryName.ToString().HtmlClassify()));
if (featureGroup == featureGroups.First()) {
categoryClassName += " first";
}
if (featureGroup == featureGroups.Last()) {
categoryClassName += " last";
}
//temporarily "disable" actions on core features
var showActions = categoryName.ToString() != "Core";
<li class="@categoryClassName">
<h2>@categoryName</h2>
<ul>@{
var features = featureGroup.OrderBy(f => f.Descriptor.Name);
foreach (var feature in features) {
//hmmm...I feel like I've done this before...
var featureId = feature.Descriptor.Name.AsFeatureId(n => T(n));
var featureState = feature.IsEnabled ? "enabled" : "disabled";
var featureClassName = string.Format("feature {0}", featureState + (Model.FeaturesThatNeedUpdate.Contains(feature.Descriptor.Name) ? " update" : String.Empty));
if (feature == features.First()) {
featureClassName += " first";
}
if (feature == features.Last()) {
featureClassName += " last";
}
<li class="@featureClassName" id="@featureId" title="@T("{0} is {1}", Html.AttributeEncode(feature.Descriptor.Name), featureState)">
<div class="summary">
<div class="properties">
<h3>@feature.Descriptor.Name</h3>
<p class="description">@feature.Descriptor.Description</p>@if (feature.Descriptor.Dependencies != null && feature.Descriptor.Dependencies.Any()) {
<div class="dependencies">
<h4>@T("Depends on:")</h4>
@Html.UnorderedList(
feature.Descriptor.Dependencies.OrderBy(s => s),
(s, i) => Html.Link(s, string.Format("#{0}", s.AsFeatureId(n => T(n)))),
"",
"dependency",
"")
</div>}
</div>
<div class="actions">
@if (showActions) {
if (feature.IsEnabled) {
using (Html.BeginFormAntiForgeryPost(string.Format("{0}", Url.Action("Disable", new { area = "Orchard.Modules" })), FormMethod.Post, new {@class = "inline link"})) {
@Html.Hidden("id", feature.Descriptor.Name, new {id = ""})
@Html.Hidden("force", true)
<button type="submit">@T("Disable")</button>
}
}
else {
using (Html.BeginFormAntiForgeryPost(string.Format("{0}", Url.Action("Enable", new { area = "Orchard.Modules" })), FormMethod.Post, new {@class = "inline link"})) {
@Html.Hidden("id", feature.Descriptor.Name, new { id = "" })
@Html.Hidden("force", true)
<button type="submit">@T("Enable")</button>
}
}
}
@if(Model.FeaturesThatNeedUpdate.Contains(feature.Descriptor.Name)){
using (Html.BeginFormAntiForgeryPost(string.Format("{0}", Url.Action("Update", new { area = "Orchard.Modules" })), FormMethod.Post, new {@class = "inline link"})) {
@Html.Hidden("id", feature.Descriptor.Name, new { id = "" })
<button type="submit" class="update">@T("Update")</button>
}
}
</div>
</div>
</li>}
}</ul>
</li>}
}</ul>}

View File

@@ -1,27 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ModulesIndexViewModel>" %>
<%@ Import Namespace="Orchard.Modules.Extensions" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Modules.ViewModels"%>
<h1><%: Html.TitleForPage(T("Installed Modules").ToString()) %></h1>
<div class="manage"><%: Html.ActionLink(T("Install a module").ToString(), "Add", null, new { @class = "button primaryAction" })%></div>
<% if (Model.Modules.Count() > 0) { %>
<ul class="contentItems"><%
foreach (var module in Model.Modules.OrderBy(m => m.DisplayName)) { %>
<li>
<div class="summary">
<div class="properties">
<h2><%: module.DisplayName %><span> - <%: T("Version: {0}", !string.IsNullOrEmpty(module.Version) ? module.Version : T("1.0").ToString()) %></span></h2><%
if (!string.IsNullOrEmpty(module.Description)) { %>
<p><%: module.Description %></p><%
} %>
<ul class="pageStatus" style="color:#666; margin:.6em 0 0 0;">
<li><%:T("Features: {0}", MvcHtmlString.Create(string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n)))).ToString()).OrderBy(s => s).ToArray()))) %></li>
<li>&nbsp;&#124;&nbsp;<%: T("Author: {0}", !string.IsNullOrEmpty(module.Author) ? 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) ? module.HomePage : "http://orchardproject.net")%></li>
</ul>
</div>
</div>
</li><%
} %>
</ul><%
} %>

View File

@@ -0,0 +1,24 @@
@model ModulesIndexViewModel
@using Orchard.Modules.Extensions
@using Orchard.Mvc.Html
@using Orchard.Modules.ViewModels
<h1>@Html.TitleForPage(T("Installed Modules").ToString())</h1>
<div class="manage">@Html.ActionLink(T("Install a module").ToString(), "Add", null, new { @class = "button primaryAction" })</div>
@if (Model.Modules.Count() > 0) {
<ul class="contentItems">
@foreach (var module in Model.Modules.OrderBy(m => m.DisplayName)) {
<li>
<div class="summary">
<div class="properties">
<h2>@module.DisplayName<span> - @T("Version: {0}", !string.IsNullOrEmpty(module.Version) ? module.Version : T("1.0").ToString())</span></h2>
@if (!string.IsNullOrEmpty(module.Description)) {
<p>@module.Description</p>}
<ul class="pageStatus" style="color:#666; margin:.6em 0 0 0;">
<li>@T("Features: {0}", MvcHtmlString.Create(string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n)))).ToString()).OrderBy(s => s).ToArray())))</li>
<li>&nbsp;&#124;&nbsp;@T("Author: {0}", !string.IsNullOrEmpty(module.Author) ? module.Author : (new []{"Bradley", "Bertrand", "Renaud", "Suha", "Sebastien", "Jon", "Nathan", "Erik"})[(module.DisplayName.Length + (new Random()).Next()) % 7])</li>
<li>&nbsp;&#124;&nbsp;@T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? module.HomePage : "http://orchardproject.net")</li>
</ul>
</div>
</div>
</li>}
</ul>}

View File

@@ -99,10 +99,10 @@
<ItemGroup>
<Content Include="Module.txt" />
<Content Include="Styles\admin.css" />
<Content Include="Views\Gallery\AddSource.ascx" />
<Content Include="Views\Gallery\Harvest.ascx" />
<Content Include="Views\Gallery\Modules.ascx" />
<Content Include="Views\Gallery\Sources.ascx" />
<None Include="Views\Gallery\AddSource.cshtml" />
<None Include="Views\Gallery\Harvest.cshtml" />
<None Include="Views\Gallery\Modules.cshtml" />
<None Include="Views\Gallery\Sources.cshtml" />
<Content Include="Views\Gallery\_Subnav.ascx" />
<Content Include="Views\Web.config" />
</ItemGroup>

View File

@@ -1,14 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Packaging.ViewModels.PackagingAddSourceViewModel>" %>
<h1>
<%: Html.TitleForPage(T("Add a Feed").ToString())%></h1>
<%using ( Html.BeginFormAntiForgeryPost(Url.Action("AddSource")) ) { %>
<%: Html.ValidationSummary() %>
<fieldset>
<label for="Url"><%: T("Feed Url") %></label>
<input id="Url" class="textMedium" name="Url" type="text" value="<%: Model.Url %>"/>
</fieldset>
<fieldset>
<input type="submit" class="button primaryAction" value="<%: T("Add Feed") %>" />
</fieldset>
<% } %>

View File

@@ -0,0 +1,14 @@
@model Orchard.Packaging.ViewModels.PackagingAddSourceViewModel
<h1>
@Html.TitleForPage(T("Add a Feed").ToString())</h1>
@using ( Html.BeginFormAntiForgeryPost(Url.Action("AddSource")) ) {
@Html.ValidationSummary()
<fieldset>
<label for="Url">@T("Feed Url")</label>
<input id="Url" class="textMedium" name="Url" type="text" value="@Model.Url"/>
</fieldset>
<fieldset>
<input type="submit" class="button primaryAction" value="@T("Add Feed")" />
</fieldset>
}

View File

@@ -1,28 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Packaging.ViewModels.PackagingHarvestViewModel>" %>
<h1>
<%: Html.TitleForPage(T("Packaging").ToString(), T("Harvest Packages").ToString())%></h1>
<%: Html.Partial("_Subnav", Model) %>
<%using (Html.BeginFormAntiForgeryPost()) {%>
<%: Html.ValidationSummary(T("Package creation was unsuccessful. Please correct the errors and try again.").ToString()) %>
<%foreach (var group in Model.Extensions.Where(x => !x.Location.StartsWith("~/Core")).GroupBy(x => x.ExtensionType)) {%>
<fieldset>
<legend><%: T("Harvest") %>
<%:group.Key %></legend>
<ul>
<%foreach (var item in group) {%>
<li>
<label>
<%:Html.RadioButtonFor(m=>m.ExtensionName, item.Name, new Dictionary<string, object>{{"id",item.Name}}) %>
<%:item.DisplayName%></label></li><%
}%></ul>
<%} %>
<%: Html.ValidationMessageFor(m => m.ExtensionName)%>
</fieldset>
<fieldset>
<%: Html.LabelFor(m=>m.FeedUrl)%>
<%: Html.DropDownListFor(m => m.FeedUrl, new[]{new SelectListItem{Text=T("Download").ToString(),Value="Download"}}.Concat( Model.Sources.Select(x => new SelectListItem { Text = T("Push to {0}", x.FeedUrl).ToString(), Value = x.FeedUrl })))%>
<%: Html.ValidationMessageFor(m=>m.FeedUrl) %>
</fieldset>
<input type="submit" value="Harvest" />
<%} %>

View File

@@ -0,0 +1,30 @@
@model Orchard.Packaging.ViewModels.PackagingHarvestViewModel
<h1>
@Html.TitleForPage(T("Packaging").ToString(), T("Harvest Packages").ToString())</h1>
@Html.Partial("_Subnav", Model)
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary(T("Package creation was unsuccessful. Please correct the errors and try again.").ToString())
@foreach (var group in Model.Extensions.Where(x => !x.Location.StartsWith("~/Core")).GroupBy(x => x.ExtensionType)) {
<fieldset>
<legend>@T("Harvest") @group.Key</legend>
<ul>
@foreach (var item in group) {
<li>
<label>
@Html.RadioButtonFor(m=>m.ExtensionName, item.Name, new Dictionary<string, object>{{"id",item.Name}})
@item.DisplayName
</label>
</li>
}
</ul>
}
@Html.ValidationMessageFor(m => m.ExtensionName)
</fieldset>
<fieldset>
@Html.LabelFor(m=>m.FeedUrl)
@Html.DropDownListFor(m => m.FeedUrl, new[]{new SelectListItem{Text=T("Download").ToString(),Value="Download"}}.Concat( Model.Sources.Select(x => new SelectListItem { Text = T("Push to {0}", x.FeedUrl).ToString(), Value = x.FeedUrl })))
@Html.ValidationMessageFor(m=>m.FeedUrl)
</fieldset>
<input type="submit" value="Harvest" />
}

View File

@@ -1,50 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Packaging.ViewModels.PackagingModulesViewModel>" %>
<% Html.RegisterStyle("admin.css"); %>
<h1>
<%: Html.TitleForPage(T("Browse Gallery").ToString())%></h1>
<div class="manage">
<%:Html.ActionLink(T("Refresh").ToString(), "Update", new object{}, new { @class = "button primaryAction" }) %>
</div>
<% using ( Html.BeginFormAntiForgeryPost(Url.Action("Modules", "Gallery")) ) {%>
<fieldset class="bulk-actions">
<label for="filterResults" class="bulk-filter"><%:T("Feed:")%></label>
<select id="sourceId" name="sourceId">
<%:Html.SelectOption("", Model.SelectedSource == null, T("Any (show all feeds)").ToString())%>
<%
foreach (var source in Model.Sources) {%>
<%:Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle)%><%
}%>
</select>
<button type="submit"><%:T("Apply")%></button>
</fieldset>
<%
} %>
<% if (Model.Modules.Count() > 0) { %>
<ul class="contentItems">
<%foreach (var item in Model.Modules) {%>
<li>
<div class="moduleName">
<h2><%: (item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text)%><span> - <%: T("Version: {0}", "1.0")%></span></h2>
</div>
<div class="related">
<%:Html.ActionLink(T("Install").ToString(), "Install", new RouteValueDictionary {{"SyndicationId",item.SyndicationItem.Id}})%><%:T(" | ") %>
<a href="<%:item.PackageStreamUri%>"><%: T("Download") %></a>
</div>
<div class="properties">
<p><%: (item.SyndicationItem.Summary == null ? T("(No description").Text : item.SyndicationItem.Summary.Text) %></p>
<ul class="pageStatus">
<li><%: T("Last Updated: {0}", item.SyndicationItem.LastUpdatedTime.ToLocalTime()) %></li>
<li>&nbsp;&#124;&nbsp;<%: T("Author: {0}", item.SyndicationItem.Authors.Any() ? String.Join(", ", item.SyndicationItem.Authors.Select(a => a.Name)) : T("Unknown").Text)%></li>
</ul>
</div>
</li><%
}%>
</ul><%
}%>

View File

@@ -0,0 +1,44 @@
@model Orchard.Packaging.ViewModels.PackagingModulesViewModel
@Html.RegisterStyle("admin.css");
<h1>@Html.TitleForPage(T("Browse Gallery").ToString())</h1>
<div class="manage">@Html.ActionLink(T("Refresh").ToString(), "Update", new object{}, new { @class = "button primaryAction" })</div>
@using ( Html.BeginFormAntiForgeryPost(Url.Action("Modules", "Gallery")) ) {
<fieldset class="bulk-actions">
<label for="filterResults" class="bulk-filter">@T("Feed:")</label>
<select id="sourceId" name="sourceId">
@Html.SelectOption("", Model.SelectedSource == null, T("Any (show all feeds)").ToString())
@foreach (var source in Model.Sources) {
Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle);
}
</select>
<button type="submit">@T("Apply")</button>
</fieldset>
}
@if (Model.Modules.Count() > 0) {
<ul class="contentItems">
@foreach (var item in Model.Modules) {
<li>
<div class="moduleName">
<h2>@(item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text)<span> - @T("Version: {0}", "1.0")</span></h2>
</div>
<div class="related">
@Html.ActionLink(T("Install").ToString(), "Install", new RouteValueDictionary {{"SyndicationId",item.SyndicationItem.Id}})@T(" | ")
<a href="@item.PackageStreamUri">@T("Download")</a>
</div>
<div class="properties">
<p>@(item.SyndicationItem.Summary == null ? T("(No description").Text : item.SyndicationItem.Summary.Text)</p>
<ul class="pageStatus">
<li>@T("Last Updated: {0}", item.SyndicationItem.LastUpdatedTime.ToLocalTime())</li>
<li>&nbsp;&#124;&nbsp;@T("Author: {0}", item.SyndicationItem.Authors.Any() ? String.Join(", ", item.SyndicationItem.Authors.Select(a => a.Name)) : T("Unknown").Text)</li>
</ul>
</div>
</li>}
</ul>
}

View File

@@ -1,39 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Packaging.ViewModels.PackagingSourcesViewModel>" %>
<h1>
<%: Html.TitleForPage(T("Gallery Feeds").ToString())%></h1>
<div class="manage">
<%:Html.ActionLink(T("Add Feed").Text, "AddSource", new { }, new { @class = "button primaryAction" }) %>
</div>
<fieldset>
<table class="items" summary="<%: T("This is a table of the gallery feeds in your application") %>">
<colgroup>
<col id="Col1" />
<col id="Col2" />
<col id="Col3" />
</colgroup>
<thead>
<tr>
<th scope="col"><%: T("Title")%></th>
<th scope="col"><%: T("Url")%></th>
<th scope="col"></th>
</tr>
</thead>
<%
foreach ( var item in Model.Sources ) {
%>
<tr>
<td>
<%: item.FeedTitle %>
</td>
<td>
<%:Html.Link(item.FeedUrl, item.FeedUrl)%>
</td>
<td>
<%: Html.ActionLink(T("Remove").ToString(), "Remove", new { id = item.Id })%>
</td>
</tr>
<% } %>
</table>
</fieldset>

View File

@@ -0,0 +1,31 @@
@model Orchard.Packaging.ViewModels.PackagingSourcesViewModel
<h1>
@Html.TitleForPage(T("Gallery Feeds").ToString())</h1>
<div class="manage">
@Html.ActionLink(T("Add Feed").Text, "AddSource", new { }, new { @class = "button primaryAction" })
</div>
<fieldset>
<table class="items" summary="@T("This is a table of the gallery feeds in your application")">
<colgroup>
<col id="Col1" />
<col id="Col2" />
<col id="Col3" />
</colgroup>
<thead>
<tr>
<th scope="col">@T("Title")</th>
<th scope="col">@T("Url")</th>
<th scope="col"></th>
</tr>
</thead>
@foreach ( var item in Model.Sources ) {
<tr>
<td>@item.FeedTitle</td>
<td>@Html.Link(item.FeedUrl, item.FeedUrl)</td>
<td>@Html.ActionLink(T("Remove").ToString(), "Remove", new { id = item.Id })</td>
</tr>
}
</table>
</fieldset>

View File

@@ -83,8 +83,8 @@ namespace Orchard.Setup.Services {
"Orchard.Users",
"Orchard.Roles",
//"TinyMce",
//"PackagingServices",
//"Orchard.Modules",
"PackagingServices",
"Orchard.Modules",
"Orchard.Themes",
//"Orchard.Blogs",
//"Orchard.Comments",

View File

@@ -58,6 +58,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{8A49DB
Shapes.txt = Shapes.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Modules", "Orchard.Web\Modules\Orchard.Modules\Orchard.Modules.csproj", "{17F86780-9A1F-4AA1-86F1-875EEC2730C7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Packaging", "Orchard.Web\Modules\Orchard.Packaging\Orchard.Packaging.csproj", "{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CodeCoverage|Any CPU = CodeCoverage|Any CPU
@@ -277,6 +281,26 @@ Global
{10369238-A590-48BF-8D3E-E83EB6F0C931}.FxCop|Any CPU.Build.0 = Release|Any CPU
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Release|Any CPU.Build.0 = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Coverage|Any CPU.Build.0 = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.FxCop|Any CPU.Build.0 = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Release|Any CPU.Build.0 = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.Coverage|Any CPU.Build.0 = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.FxCop|Any CPU.Build.0 = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -287,6 +311,8 @@ Global
{67C1D3AF-A0EC-46B2-BAE1-DF1DA8E0B890} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{CDE24A24-01D3-403C-84B9-37722E18DFB7} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{17F86780-9A1F-4AA1-86F1-875EEC2730C7} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}