Fixed and closed #466: page information now displayed also in Print.aspx.

This commit is contained in:
Dario Solera 2010-01-27 18:28:26 +00:00
parent 56e0ab0554
commit ab6963b3fe
2 changed files with 14 additions and 2 deletions

View file

@ -4,6 +4,7 @@ using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
@ -51,9 +52,20 @@ namespace ScrewTurn.Wiki {
string title = FormattingPipeline.PrepareTitle(content.Title, false, FormattingContext.PageContent, page);
if(Request["Discuss"] == null) {
string[] categories =
(from c in Pages.GetCategoriesForPage(page)
select NameTools.GetLocalName(c.FullName)).ToArray();
sb.Append(@"<h1 class=""pagetitle"">");
sb.Append(title);
sb.Append("</h1>");
sb.AppendFormat("<small>{0} {1} {2} {3} &mdash; {4}: {5}</small><br /><br />",
Properties.Messages.ModifiedOn,
Preferences.AlignWithTimezone(content.LastModified).ToString(Settings.DateTimeFormat),
Properties.Messages.By,
Users.GetDisplayName(Users.FindUser(content.User)),
Properties.Messages.CategorizedAs,
categories.Length == 0 ? Properties.Messages.Uncategorized : string.Join(", ", categories));
sb.Append(Content.GetFormattedPageContent(page, true));
}
else {