Web App Gallery filtering/searching fixed

This commit is contained in:
ruslan 2012-08-14 17:39:35 +03:00
parent 14db21e39c
commit 40ba3f65de
5 changed files with 23 additions and 6 deletions

View file

@ -187,9 +187,16 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
List<Product> products = wpi.GetApplications(categoryId);
List<GalleryApplication> applications = new List<GalleryApplication>();
foreach (Product product in products)
try
{
applications.Add(MakeGalleryApplicationFromProduct(product));
foreach (Product product in products)
{
applications.Add(MakeGalleryApplicationFromProduct(product));
}
}
catch(Exception ex)
{
//
}
return applications;
@ -374,7 +381,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
Id = product.ProductId,
Title = product.Title,
Author = new Author {Name = product.Author, Uri = product.AuthorUri.ToString()},
IconUrl = product.IconUrl.ToString(),
IconUrl = null == product.IconUrl ? "" : product.IconUrl.ToString(),
Version = product.Version,
Description = product.LongDescription,
Summary = product.Summary,

View file

@ -187,7 +187,7 @@
<value>Applications Installer</value>
</data>
<data name="ModuleTitle.WebApplicationsGallery" xml:space="preserve">
<value>Microsoft Web Application Gallery</value>
<value>Web Application Gallery</value>
</data>
<data name="ModuleTitle.AuditLog" xml:space="preserve">
<value>Audit Log</value>

View file

@ -445,7 +445,7 @@
<value>{user} - {space} - Web Site IP Addresses</value>
</data>
<data name="PageTitle.SpaceWebApplicationsGallery" xml:space="preserve">
<value>{user} - {space} - Microsoft Web Application Gallery</value>
<value>{user} - {space} - Web Application Gallery</value>
</data>
<data name="PageName.SpaceWeb" xml:space="preserve">
<value>Web</value>

View file

@ -123,7 +123,7 @@ ul.WPIKeywordList>li {
<asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'>
<asp:Image runat="server" ID="Image1" Width="120" Height="120"
ImageUrl='<%# "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode((string)Eval("IconUrl")) %>'
ImageUrl='<%# GetIconUrlOrDefault((string)Eval("IconUrl")) %>'
AlternateText='<%# Eval("Title") %>'>
</asp:Image>
</asp:hyperlink>

View file

@ -178,5 +178,15 @@ namespace WebsitePanel.Portal
}
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang);
}
protected string GetIconUrlOrDefault(string url)
{
if (string.IsNullOrEmpty(url))
{
return "/App_Themes/Default/icons/sphere_128.png";
}
return "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode(url);
}
}
}