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

View file

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

View file

@ -445,7 +445,7 @@
<value>{user} - {space} - Web Site IP Addresses</value> <value>{user} - {space} - Web Site IP Addresses</value>
</data> </data>
<data name="PageTitle.SpaceWebApplicationsGallery" xml:space="preserve"> <data name="PageTitle.SpaceWebApplicationsGallery" xml:space="preserve">
<value>{user} - {space} - Microsoft Web Application Gallery</value> <value>{user} - {space} - Web Application Gallery</value>
</data> </data>
<data name="PageName.SpaceWeb" xml:space="preserve"> <data name="PageName.SpaceWeb" xml:space="preserve">
<value>Web</value> <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()) %>' <asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'> runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'>
<asp:Image runat="server" ID="Image1" Width="120" Height="120" <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") %>'> AlternateText='<%# Eval("Title") %>'>
</asp:Image> </asp:Image>
</asp:hyperlink> </asp:hyperlink>

View file

@ -178,5 +178,15 @@ namespace WebsitePanel.Portal
} }
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang); 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);
}
} }
} }