--HG--
branch : 1.x
This commit is contained in:
Renaud Paquay
2011-01-08 10:58:08 -08:00
4 changed files with 16 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -93,6 +93,8 @@
<Compile Include="ViewModels\PackagingSourcesViewModel.cs" /> <Compile Include="ViewModels\PackagingSourcesViewModel.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Content\Images\imagePlaceholder.png" />
<Content Include="Content\Images\moduleDefaultIcon.png" />
<Content Include="Module.txt" /> <Content Include="Module.txt" />
<Content Include="Service References\GalleryServer\Reference.datasvcmap"> <Content Include="Service References\GalleryServer\Reference.datasvcmap">
<Generator>DataServiceClientGenerator</Generator> <Generator>DataServiceClientGenerator</Generator>
@@ -145,9 +147,6 @@
<ItemGroup> <ItemGroup>
<Content Include="Service References\GalleryServer\service.edmx" /> <Content Include="Service References\GalleryServer\service.edmx" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Content\Images\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.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

@@ -65,6 +65,19 @@ namespace Orchard.Packaging.Services {
private static PackagingEntry CreatePackageEntry(PublishedPackage package, PackagingSource source, Uri downloadUri) { private static PackagingEntry CreatePackageEntry(PublishedPackage package, PackagingSource source, Uri downloadUri) {
PublishedScreenshot firstScreenshot = package.Screenshots.FirstOrDefault(); PublishedScreenshot firstScreenshot = package.Screenshots.FirstOrDefault();
Uri iconUrl = null;
if (!string.IsNullOrEmpty(package.IconUrl)) {
if (!Uri.TryCreate(package.IconUrl, UriKind.Absolute, out iconUrl)) {
Uri.TryCreate(
new Uri(string.Format("{0}://{1}:{2}/",
downloadUri.Scheme,
downloadUri.Host,
downloadUri.Port)),
package.IconUrl,
out iconUrl);
}
}
return new PackagingEntry { return new PackagingEntry {
Title = string.IsNullOrWhiteSpace(package.Title) ? package.Id : package.Title, Title = string.IsNullOrWhiteSpace(package.Title) ? package.Id : package.Title,
PackageId = package.Id, PackageId = package.Id,
@@ -75,7 +88,7 @@ namespace Orchard.Packaging.Services {
Description = package.Description, Description = package.Description,
Authors = package.Authors, Authors = package.Authors,
LastUpdated = package.LastUpdated, LastUpdated = package.LastUpdated,
IconUrl = package.IconUrl, IconUrl = iconUrl != null ? iconUrl.ToString() : string.Empty,
FirstScreenshot = firstScreenshot != null ? firstScreenshot.ScreenshotUri : string.Empty, FirstScreenshot = firstScreenshot != null ? firstScreenshot.ScreenshotUri : string.Empty,
Rating = package.Rating, Rating = package.Rating,
RatingsCount = package.RatingsCount RatingsCount = package.RatingsCount