mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +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
|
||||
@using System.Linq;
|
||||
|
||||
@{ Style.Require("PackagingAdmin"); }
|
||||
|
||||
<h1>@Html.TitleForPage(T("Browse Gallery - Modules").ToString())</h1>
|
||||
@@ -23,7 +25,7 @@
|
||||
@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>
|
||||
<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 class="related">
|
||||
|
@@ -103,6 +103,10 @@ namespace PackageIndexReferenceImplementation.Controllers {
|
||||
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 mediaUrl = Url.Action("Resource", "Media", new RouteValueDictionary { { "Id", mediaIdentifier }, { "ContentType", "application/x-package" } });
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="Title" value="Orchard Modules Gallery"/>
|
||||
<add key="Title" value="Orchard Extensions Gallery"/>
|
||||
</appSettings>
|
||||
|
||||
<system.web>
|
||||
|
Reference in New Issue
Block a user