mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Adding Version information to feed items in the Gallery feed
- Renaming to "Orchard Exntensions Gallery" --HG-- branch : dev
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
@model Orchard.Packaging.ViewModels.PackagingModulesViewModel
|
@model Orchard.Packaging.ViewModels.PackagingModulesViewModel
|
||||||
|
@using System.Linq;
|
||||||
|
|
||||||
@{ Style.Require("PackagingAdmin"); }
|
@{ Style.Require("PackagingAdmin"); }
|
||||||
|
|
||||||
<h1>@Html.TitleForPage(T("Browse Gallery - Modules").ToString())</h1>
|
<h1>@Html.TitleForPage(T("Browse Gallery - Modules").ToString())</h1>
|
||||||
@@ -23,7 +25,7 @@
|
|||||||
@foreach (var item in Model.Modules) {
|
@foreach (var item in Model.Modules) {
|
||||||
<li>
|
<li>
|
||||||
<div class="moduleName">
|
<div class="moduleName">
|
||||||
<h2>@(item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text)<span> - @T("Version: {0}", "1.0")</span></h2>
|
<h2>@(item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text)<span> - @T("Version: {0}", item.SyndicationItem.ElementExtensions.ReadElementExtensions<string>("Version", "http://orchardproject.net").FirstOrDefault() ?? T("N/A").Text)</span></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="related">
|
<div class="related">
|
||||||
|
@@ -103,6 +103,10 @@ namespace PackageIndexReferenceImplementation.Controllers {
|
|||||||
item.Summary = new TextSyndicationContent(packageProperties.Description);
|
item.Summary = new TextSyndicationContent(packageProperties.Description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !string.IsNullOrEmpty(packageProperties.Version) ) {
|
||||||
|
item.ElementExtensions.Add("Version", "http://orchardproject.net", packageProperties.Version);
|
||||||
|
}
|
||||||
|
|
||||||
var mediaIdentifier = packageProperties.Identifier + "-" + packageProperties.Version + ".zip";
|
var mediaIdentifier = packageProperties.Identifier + "-" + packageProperties.Version + ".zip";
|
||||||
|
|
||||||
var mediaUrl = Url.Action("Resource", "Media", new RouteValueDictionary { { "Id", mediaIdentifier }, { "ContentType", "application/x-package" } });
|
var mediaUrl = Url.Action("Resource", "Media", new RouteValueDictionary { { "Id", mediaIdentifier }, { "ContentType", "application/x-package" } });
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="Title" value="Orchard Modules Gallery"/>
|
<add key="Title" value="Orchard Extensions Gallery"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
|
|
||||||
<system.web>
|
<system.web>
|
||||||
|
Reference in New Issue
Block a user