Skip to content

Commit

Permalink
Fixed url issue in search.
Browse files Browse the repository at this point in the history
Made page tree list in manager more compact.
  • Loading branch information
martijnboland committed Mar 3, 2010
1 parent 5c3f57b commit 2532522
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/Cuyahoga.Core/Domain/ContentItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Security.Principal;
using Castle.Components.Validator;
using Cuyahoga.Core.Service.Membership;
using Cuyahoga.Core.Util;
using Cuyahoga.Core.Validation;

namespace Cuyahoga.Core.Domain
Expand Down Expand Up @@ -271,7 +272,7 @@ protected ContentItem()
/// </summary>
public virtual string GetContentUrl()
{
string defaultUrlFormat = "{0}/section.aspx/{1}";
string defaultUrlFormat = UrlUtil.GetApplicationPath() + "{0}/section.aspx/{1}";
if (this._section == null)
{
throw new InvalidOperationException("Unable to get the url for the content because the associated section is missing.");
Expand Down
3 changes: 2 additions & 1 deletion src/Cuyahoga.Core/Domain/FileResource.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Cuyahoga.Core.Service.Search;
using Cuyahoga.Core.Util;

namespace Cuyahoga.Core.Domain
{
Expand Down Expand Up @@ -80,7 +81,7 @@ public override bool SupportsItemLevelPermissions

public override string GetContentUrl()
{
string defaultUrlFormat = "{0}/section.aspx/Download/{1}/{2}";
string defaultUrlFormat = UrlUtil.GetApplicationPath() + "{0}/section.aspx/Download/{1}/{2}";
if (this.Section == null)
{
throw new InvalidOperationException("Unable to get the url for the content because the associated section is missing.");
Expand Down
2 changes: 1 addition & 1 deletion src/Cuyahoga.Modules.Articles/Web/Articles.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected void rptArticles_ItemDataBound(object sender, RepeaterItemEventArgs e)
DisplayType displayType = (DisplayType)Enum.Parse(typeof(DisplayType), this.Module.Section.Settings["DISPLAY_TYPE"].ToString());

HyperLink hpl = e.Item.FindControl("hplTitle") as HyperLink;
string articleUrl = UrlUtil.GetApplicationPath() + article.GetContentUrl();
string articleUrl = article.GetContentUrl();
hpl.NavigateUrl = articleUrl;

Panel pnlSummary = e.Item.FindControl("pnlSummary") as Panel;
Expand Down
2 changes: 1 addition & 1 deletion src/Cuyahoga.Modules.Downloads/Web/Downloads.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private void rptFiles_ItemDataBound(object sender, RepeaterItemEventArgs e)

if (file != null && file.IsViewAllowed(base.Page.User))
{
string downloadUrl = UrlUtil.GetApplicationPath() + file.GetContentUrl();
string downloadUrl = file.GetContentUrl();
string fileDetails = file.FileName + " (" + file.Length + " bytes)";
HyperLink hplFileImg = e.Item.FindControl("hplFileImg") as HyperLink;
hplFileImg.NavigateUrl = downloadUrl;
Expand Down
5 changes: 3 additions & 2 deletions src/Cuyahoga.Web/Manager/Content/Css/manager.pagegrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ ul.pagegroup

#pagegrid .pageurl
{
padding: 1px 0;
padding: 1px 3px;
color: #369;
}

#pagegrid .pagesub
{
font-size: 90%;
color: #999;
color: #777;
}

#pagegrid .pagesub span
Expand Down
12 changes: 7 additions & 5 deletions src/Cuyahoga.Web/Manager/Views/Pages/PageListItem.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
<% } %>
</div>
<div class="pageinfo">
<div class="pagetitle">
<%= Model.Title %>
</div>
<div class="pageurl">
<%= Model.DisplayUrl %>
<div>
<span class="pagetitle">
<%= Model.Title %>
</span>
<span class="pageurl">
<%= Model.DisplayUrl %>
</span>
</div>
<div class="pagesub">
<span><%= GlobalResources.TemplateLabel %>: <%= Model.Template != null ? Model.Template.Name : String.Empty %></span>
Expand Down

0 comments on commit 2532522

Please sign in to comment.