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

@ -16,5 +16,5 @@ using System.Reflection;
// //
// You can specify all the values or you can default the Revision and Build Numbers // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.1.464")] [assembly: AssemblyVersion("3.0.1.465")]
[assembly: AssemblyFileVersion("3.0.1.464")] [assembly: AssemblyFileVersion("3.0.1.465")]

View file

@ -4,6 +4,7 @@ using System.Data;
using System.Configuration; using System.Configuration;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Web; using System.Web;
using System.Web.Security; using System.Web.Security;
using System.Web.UI; using System.Web.UI;
@ -51,9 +52,20 @@ namespace ScrewTurn.Wiki {
string title = FormattingPipeline.PrepareTitle(content.Title, false, FormattingContext.PageContent, page); string title = FormattingPipeline.PrepareTitle(content.Title, false, FormattingContext.PageContent, page);
if(Request["Discuss"] == null) { 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(@"<h1 class=""pagetitle"">");
sb.Append(title); sb.Append(title);
sb.Append("</h1>"); 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)); sb.Append(Content.GetFormattedPageContent(page, true));
} }
else { else {