#17171: Adding gallery link to module/theme details page.

--HG--
branch : 1.x
This commit is contained in:
andrerod
2011-01-10 23:18:04 -08:00
parent 09939c18b9
commit fa162c7ac8
7 changed files with 148 additions and 93 deletions

View File

@@ -9,7 +9,7 @@
//------------------------------------------------------------------------------
// Original file name:
// Generation date: 12/16/2010 1:21:46 AM
// Generation date: 1/10/2011 10:36:55 PM
namespace Orchard.Packaging.GalleryServer
{
@@ -128,17 +128,17 @@ namespace Orchard.Packaging.GalleryServer
/// <param name="price">Initial value of Price.</param>
/// <param name="requireLicenseAcceptance">Initial value of RequireLicenseAcceptance.</param>
/// <param name="isLatestVersion">Initial value of IsLatestVersion.</param>
/// <param name="rating">Initial value of Rating.</param>
/// <param name="ratingsCount">Initial value of RatingsCount.</param>
/// <param name="downloadCount">Initial value of DownloadCount.</param>
/// <param name="versionRating">Initial value of VersionRating.</param>
/// <param name="versionRatingsCount">Initial value of VersionRatingsCount.</param>
/// <param name="versionDownloadCount">Initial value of VersionDownloadCount.</param>
/// <param name="created">Initial value of Created.</param>
/// <param name="lastUpdated">Initial value of LastUpdated.</param>
/// <param name="published">Initial value of Published.</param>
/// <param name="rating">Initial value of Rating.</param>
/// <param name="ratingsCount">Initial value of RatingsCount.</param>
/// <param name="downloadCount">Initial value of DownloadCount.</param>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public static PublishedPackage CreatePublishedPackage(string ID, string version, long packageSize, decimal price, bool requireLicenseAcceptance, bool isLatestVersion, double rating, int ratingsCount, int downloadCount, double versionRating, int versionRatingsCount, int versionDownloadCount, global::System.DateTime created, global::System.DateTime lastUpdated, global::System.DateTime published)
public static PublishedPackage CreatePublishedPackage(string ID, string version, long packageSize, decimal price, bool requireLicenseAcceptance, bool isLatestVersion, double versionRating, int versionRatingsCount, int versionDownloadCount, global::System.DateTime created, global::System.DateTime lastUpdated, global::System.DateTime published, double rating, int ratingsCount, int downloadCount)
{
PublishedPackage publishedPackage = new PublishedPackage();
publishedPackage.Id = ID;
@@ -147,15 +147,15 @@ namespace Orchard.Packaging.GalleryServer
publishedPackage.Price = price;
publishedPackage.RequireLicenseAcceptance = requireLicenseAcceptance;
publishedPackage.IsLatestVersion = isLatestVersion;
publishedPackage.Rating = rating;
publishedPackage.RatingsCount = ratingsCount;
publishedPackage.DownloadCount = downloadCount;
publishedPackage.VersionRating = versionRating;
publishedPackage.VersionRatingsCount = versionRatingsCount;
publishedPackage.VersionDownloadCount = versionDownloadCount;
publishedPackage.Created = created;
publishedPackage.LastUpdated = lastUpdated;
publishedPackage.Published = published;
publishedPackage.Rating = rating;
publishedPackage.RatingsCount = ratingsCount;
publishedPackage.DownloadCount = downloadCount;
return publishedPackage;
}
/// <summary>
@@ -453,69 +453,6 @@ namespace Orchard.Packaging.GalleryServer
partial void OnIsLatestVersionChanging(bool value);
partial void OnIsLatestVersionChanged();
/// <summary>
/// There are no comments for Property Rating in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public double Rating
{
get
{
return this._Rating;
}
set
{
this.OnRatingChanging(value);
this._Rating = value;
this.OnRatingChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private double _Rating;
partial void OnRatingChanging(double value);
partial void OnRatingChanged();
/// <summary>
/// There are no comments for Property RatingsCount in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public int RatingsCount
{
get
{
return this._RatingsCount;
}
set
{
this.OnRatingsCountChanging(value);
this._RatingsCount = value;
this.OnRatingsCountChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private int _RatingsCount;
partial void OnRatingsCountChanging(int value);
partial void OnRatingsCountChanged();
/// <summary>
/// There are no comments for Property DownloadCount in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public int DownloadCount
{
get
{
return this._DownloadCount;
}
set
{
this.OnDownloadCountChanging(value);
this._DownloadCount = value;
this.OnDownloadCountChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private int _DownloadCount;
partial void OnDownloadCountChanging(int value);
partial void OnDownloadCountChanged();
/// <summary>
/// There are no comments for Property VersionRating in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
@@ -726,26 +663,68 @@ namespace Orchard.Packaging.GalleryServer
partial void OnIconUrlChanging(string value);
partial void OnIconUrlChanged();
/// <summary>
/// There are no comments for Property ReportAbuseUrl in the schema.
/// There are no comments for Property Rating in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public string ReportAbuseUrl
public double Rating
{
get
{
return this._ReportAbuseUrl;
return this._Rating;
}
set
{
this.OnReportAbuseUrlChanging(value);
this._ReportAbuseUrl = value;
this.OnReportAbuseUrlChanged();
this.OnRatingChanging(value);
this._Rating = value;
this.OnRatingChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private string _ReportAbuseUrl;
partial void OnReportAbuseUrlChanging(string value);
partial void OnReportAbuseUrlChanged();
private double _Rating;
partial void OnRatingChanging(double value);
partial void OnRatingChanged();
/// <summary>
/// There are no comments for Property RatingsCount in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public int RatingsCount
{
get
{
return this._RatingsCount;
}
set
{
this.OnRatingsCountChanging(value);
this._RatingsCount = value;
this.OnRatingsCountChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private int _RatingsCount;
partial void OnRatingsCountChanging(int value);
partial void OnRatingsCountChanged();
/// <summary>
/// There are no comments for Property DownloadCount in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public int DownloadCount
{
get
{
return this._DownloadCount;
}
set
{
this.OnDownloadCountChanging(value);
this._DownloadCount = value;
this.OnDownloadCountChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private int _DownloadCount;
partial void OnDownloadCountChanging(int value);
partial void OnDownloadCountChanged();
/// <summary>
/// There are no comments for Property Categories in the schema.
/// </summary>
@@ -810,6 +789,48 @@ namespace Orchard.Packaging.GalleryServer
partial void OnDependenciesChanging(string value);
partial void OnDependenciesChanged();
/// <summary>
/// There are no comments for Property ReportAbuseUrl in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public string ReportAbuseUrl
{
get
{
return this._ReportAbuseUrl;
}
set
{
this.OnReportAbuseUrlChanging(value);
this._ReportAbuseUrl = value;
this.OnReportAbuseUrlChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private string _ReportAbuseUrl;
partial void OnReportAbuseUrlChanging(string value);
partial void OnReportAbuseUrlChanged();
/// <summary>
/// There are no comments for Property GalleryDetailsUrl in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
public string GalleryDetailsUrl
{
get
{
return this._GalleryDetailsUrl;
}
set
{
this.OnGalleryDetailsUrlChanging(value);
this._GalleryDetailsUrl = value;
this.OnGalleryDetailsUrlChanged();
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
private string _GalleryDetailsUrl;
partial void OnGalleryDetailsUrlChanging(string value);
partial void OnGalleryDetailsUrlChanged();
/// <summary>
/// There are no comments for Screenshots in the schema.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="bf634e7d-1d71-45cd-b4d8-f06f74cb7bc7" xmlns="urn:schemas-microsoft-com:xml-dataservicemap">
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="680b6c18-74a9-42fd-978e-d9d9c1c396d2" xmlns="urn:schemas-microsoft-com:xml-dataservicemap">
<MetadataSources>
<MetadataSource Address="http://orchardproject.net:777/GalleryServer/FeedService.svc/" Protocol="http" SourceId="1" />
<MetadataSource Address="http://orchardproject.net/gallery/server/FeedService.svc" Protocol="http" SourceId="1" />
</MetadataSources>
<Metadata>
<MetadataFile FileName="service.edmx" MetadataType="Edmx" ID="ed52956e-0709-4cc7-a9ba-74cca2274614" SourceId="1" SourceUrl="http://orchardproject.net:777/GalleryServer/FeedService.svc/" />
<MetadataFile FileName="service.edmx" MetadataType="Edmx" ID="0ee65dc8-3919-409c-a84e-c78cc88d0597" SourceId="1" SourceUrl="http://orchardproject.net/gallery/server/FeedService.svc" />
</Metadata>
<Extensions />
</ReferenceGroup>

View File

@@ -8,10 +8,10 @@
</Key>
<Property Name="Id" Type="Edm.String" Nullable="false" />
<Property Name="Version" Type="Edm.String" Nullable="false" />
<Property Name="Title" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Authors" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationAuthorName" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Title" Type="Edm.String" Nullable="true" />
<Property Name="Authors" Type="Edm.String" Nullable="true" />
<Property Name="PackageType" Type="Edm.String" Nullable="true" />
<Property Name="Summary" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="Summary" Type="Edm.String" Nullable="true" />
<Property Name="Description" Type="Edm.String" Nullable="true" />
<Property Name="Copyright" Type="Edm.String" Nullable="true" />
<Property Name="PackageHashAlgorithm" Type="Edm.String" Nullable="true" />
@@ -20,24 +20,25 @@
<Property Name="Price" Type="Edm.Decimal" Nullable="false" />
<Property Name="RequireLicenseAcceptance" Type="Edm.Boolean" Nullable="false" />
<Property Name="IsLatestVersion" Type="Edm.Boolean" Nullable="false" />
<Property Name="Rating" Type="Edm.Double" Nullable="false" />
<Property Name="RatingsCount" Type="Edm.Int32" Nullable="false" />
<Property Name="DownloadCount" Type="Edm.Int32" Nullable="false" />
<Property Name="VersionRating" Type="Edm.Double" Nullable="false" />
<Property Name="VersionRatingsCount" Type="Edm.Int32" Nullable="false" />
<Property Name="VersionDownloadCount" Type="Edm.Int32" Nullable="false" />
<Property Name="Created" Type="Edm.DateTime" Nullable="false" />
<Property Name="LastUpdated" Type="Edm.DateTime" Nullable="false" m:FC_TargetPath="SyndicationUpdated" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
<Property Name="LastUpdated" Type="Edm.DateTime" Nullable="false" />
<Property Name="Published" Type="Edm.DateTime" Nullable="false" />
<Property Name="ExternalPackageUrl" Type="Edm.String" Nullable="true" />
<Property Name="ProjectUrl" Type="Edm.String" Nullable="true" />
<Property Name="LicenseUrl" Type="Edm.String" Nullable="true" />
<Property Name="IconUrl" Type="Edm.String" Nullable="true" />
<Property Name="ReportAbuseUrl" Type="Edm.String" Nullable="true" />
<Property Name="Rating" Type="Edm.Double" Nullable="false" />
<Property Name="RatingsCount" Type="Edm.Int32" Nullable="false" />
<Property Name="DownloadCount" Type="Edm.Int32" Nullable="false" />
<NavigationProperty Name="Screenshots" Relationship="Gallery.Infrastructure.FeedModels.PublishedPackage_Screenshots" FromRole="PublishedPackage" ToRole="Screenshots" />
<Property Name="Categories" Type="Edm.String" Nullable="true" />
<Property Name="Tags" Type="Edm.String" Nullable="true" />
<Property Name="Dependencies" Type="Edm.String" Nullable="true" />
<Property Name="ReportAbuseUrl" Type="Edm.String" Nullable="true" />
<Property Name="GalleryDetailsUrl" Type="Edm.String" Nullable="true" />
</EntityType>
<EntityType Name="PublishedScreenshot">
<Key>

View File

@@ -9,6 +9,7 @@ namespace Orchard.Packaging.Services {
public string Version { get; set; }
public string PackageStreamUri { get; set; }
public string ProjectUrl { get; set; }
public string GalleryDetailsUrl { get; set; }
public DateTime LastUpdated { get; set; }
public string Authors { get; set; }
public string Description { get; set; }

View File

@@ -83,6 +83,7 @@ namespace Orchard.Packaging.Services {
PackageId = package.Id,
PackageStreamUri = downloadUri.ToString(),
ProjectUrl = package.ProjectUrl,
GalleryDetailsUrl = package.GalleryDetailsUrl,
Source = source,
Version = package.Version ?? string.Empty,
Description = package.Description,

View File

@@ -31,7 +31,32 @@
<div class="iconThumbnail">
<div class="extensionDetails column">
<div class="extensionName">
<div class="extensionName">
@if (!string.IsNullOrWhiteSpace(item.GalleryDetailsUrl)) {
<a href="@item.GalleryDetailsUrl">
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
</a>
} else {
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
}
</div>
<div class="related">
@Html.ActionLink(T("Install").ToString(), "Install", new RouteValueDictionary { { "packageId", item.PackageId }, { "version", item.Version }, { "sourceId", item.Source.Id }, { "redirectTo", "Modules" } })@T(" | ")
<a href="@item.PackageStreamUri">@T("Download")</a>
</div>
<div class="properties">
<p>@(item.Description == null ? T("(No description").Text : item.Description)</p>
<ul class="pageStatus">
<li>@T("Last Updated: {0}", DateTime.Now.ToLocalTime())</li>
<li>&nbsp;&#124;&nbsp;@T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())</li>
<li>&nbsp;&#124;&nbsp;@T("Rating: {0}", item.Rating)</li>
<li>&nbsp;&#124;&nbsp;@T("Ratings Count: {0}", item.RatingsCount)</li>
<li>&nbsp;&#124;&nbsp;@T("Website: ")
@if (!string.IsNullOrEmpty(item.ProjectUrl)) { <a href="@item.ProjectUrl">@item.ProjectUrl</a> } else { @T("Unknown").ToString() }
</li>
</ul>
</div>
</div>

View File

@@ -38,7 +38,13 @@
<div class="@extensionClass">
<div class="extensionDetails column">
<div class="extensionName">
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
@if (!string.IsNullOrWhiteSpace(item.GalleryDetailsUrl)) {
<a href="@item.GalleryDetailsUrl">
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
</a>
} else {
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
}
</div>
<div class="related">