Gallery: publish, browse, install, and download themes. Gallery displays theme thumbnail.

--HG--
branch : dev
This commit is contained in:
Dave Reed
2010-10-05 21:04:17 -07:00
parent 16feca6be1
commit a599596d44
13 changed files with 183 additions and 42 deletions

View File

@@ -53,7 +53,7 @@ namespace Orchard.Packaging.Services {
}
public IEnumerable<PackagingEntry> GetModuleList(PackagingSource packagingSource = null) {
IEnumerable<PackagingEntry> packageInfos = ( packagingSource == null ? GetSources() : new[] { packagingSource } )
return (packagingSource == null ? GetSources() : new[] {packagingSource})
.SelectMany(
source =>
Bind(ParseFeed(GetModuleListForSource(source)),
@@ -64,11 +64,8 @@ namespace Orchard.Packaging.Services {
Source = source,
SyndicationFeed = feed,
SyndicationItem = item,
PackageStreamUri = item.Links.Single().GetAbsoluteUri().AbsoluteUri,
}))));
return packageInfos.ToArray();
PackageStreamUri = item.Links.Where(l => String.IsNullOrEmpty(l.RelationshipType)).FirstOrDefault().GetAbsoluteUri().AbsoluteUri,
})))).ToArray();
}
private string GetModuleListForSource(PackagingSource source) {