From fc1888294399de0dd2e855865c4bf89690f62dd9 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Thu, 10 Jun 2010 21:02:35 +0000 Subject: [PATCH] Slight changes in templates --- Builder/IISMainHandler/build.txt | 2 +- Common/dataobjects/Board.cs | 17 +++++++++-- Core/Util.cs | 2 +- templates/Full/Boards.xslt | 31 ++++++++++++++----- templates/Full/elems/Header.xslt | 1 - templates/Full/elems/Main.xslt | 51 ++------------------------------ 6 files changed, 44 insertions(+), 60 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 0fd0714..c9c4108 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -103 \ No newline at end of file +114 \ No newline at end of file diff --git a/Common/dataobjects/Board.cs b/Common/dataobjects/Board.cs index 5664b2a..b1972f0 100644 --- a/Common/dataobjects/Board.cs +++ b/Common/dataobjects/Board.cs @@ -99,16 +99,29 @@ namespace FLocal.Common.dataobjects { this._description = data[TableSpec.FIELD_DESCRIPTION]; } + private bool hasNewPosts() { + return Core.Util.RandomInt(0, 1) == 0; + } + + private XElement exportLastPostInfo() { + if(!this.lastPostId.HasValue) { + return new XElement("none"); + } else { + throw new NotImplementedException(); + } + } + public XElement exportToXmlForMainPage() { return new XElement("board", new XElement("id", this.id), new XElement("sortOrder", this.sortOrder), new XElement("categoryId", this.categoryId), - new XElement("lastPostId", this.lastPostId), new XElement("totalPosts", this.totalPosts), new XElement("totalThreads", this.totalThreads), new XElement("name", this.name), - new XElement("description", this.description) + new XElement("description", this.description), + new XElement("hasNewPosts", this.hasNewPosts() ? "true" : "false"), + new XElement("lastPostInfo", this.exportLastPostInfo()) ); } diff --git a/Core/Util.cs b/Core/Util.cs index ba9cf52..c3649cc 100644 --- a/Core/Util.cs +++ b/Core/Util.cs @@ -5,7 +5,7 @@ using System.Text; namespace FLocal.Core { - class Util { + public class Util { private static bool? _isRunningOnMono; diff --git a/templates/Full/Boards.xslt b/templates/Full/Boards.xslt index 160c24f..e8a07ad 100644 --- a/templates/Full/Boards.xslt +++ b/templates/Full/Boards.xslt @@ -1,7 +1,6 @@ - @@ -79,7 +78,14 @@ + + + + +
+ + /Thread/NOTIMPLEMENTED/p/ + от + +
+ + N/A + +
+
\ No newline at end of file diff --git a/templates/Full/elems/Header.xslt b/templates/Full/elems/Header.xslt index d672993..a488eae 100644 --- a/templates/Full/elems/Header.xslt +++ b/templates/Full/elems/Header.xslt @@ -1,6 +1,5 @@ -
if(!confirm('Пометить все сообщения как прочитанные?')) {event.returnValue=false; return false;} else { alert("Not implemented yet"); } - + + + + + + + + @@ -105,11 +111,7 @@ - 08.06.2010 14:03
- - /Thread/NOTIMPLEMENTED/p/ - от igor - +
Sash, @@ -117,4 +119,19 @@
diff --git a/templates/Full/elems/Main.xslt b/templates/Full/elems/Main.xslt index 8ab4c0b..143e3c0 100644 --- a/templates/Full/elems/Main.xslt +++ b/templates/Full/elems/Main.xslt @@ -1,7 +1,7 @@ - + @@ -14,57 +14,12 @@
+Data used for authoring this XHTML document: +<xsl:copy-of select="/"/>
- -
- - - - - - - - -
ТемыСообщенийПоследнееМодератор
-
- - - - - - if (!confirm('Пометить все сообщения как прочитанные?')) {event.returnValue=false; return false;} - - - - - - - -
- - - - - -
- A   -
- - 373 - 128648 - - 08.06.2010 14:03
- от igor - - -  Sash, - DeadmoroZ - - -