summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Posts/ViewPost.page
diff options
context:
space:
mode:
authorxue <>2006-05-30 03:26:33 +0000
committerxue <>2006-05-30 03:26:33 +0000
commit6e0338629774fffe5fbe7136dfce34ce83844a5c (patch)
tree9520eaa7c3c278b5ebf525a0d1e09f0a4cdf7779 /demos/blog/protected/Pages/Posts/ViewPost.page
parent7f508e187e4539a16cdbb1dd6a4b1133c53cf24d (diff)
Blog demo is completed.
Diffstat (limited to 'demos/blog/protected/Pages/Posts/ViewPost.page')
-rw-r--r--demos/blog/protected/Pages/Posts/ViewPost.page20
1 files changed, 13 insertions, 7 deletions
diff --git a/demos/blog/protected/Pages/Posts/ViewPost.page b/demos/blog/protected/Pages/Posts/ViewPost.page
index 4b233615..5bd80a52 100644
--- a/demos/blog/protected/Pages/Posts/ViewPost.page
+++ b/demos/blog/protected/Pages/Posts/ViewPost.page
@@ -5,6 +5,10 @@
<%= $this->CurrentPost->Title %>
</div>
<div class="post-time">
+<com:TLabel
+ ID="Status"
+ ForeColor="red"
+ Text=<%= $this->CurrentPost->Status===PostRecord::STATUS_DRAFT?'[Draft]':'[Pending approval]'%> />
<%= date('l, F j, Y \a\t h:i:s a',$this->CurrentPost->CreateTime) %>
by
<%= '<a href="' . $this->Service->constructUrl('Users.ViewUser',array('id'=>$this->CurrentPost->AuthorID)) . '">' . $this->CurrentPost->AuthorName . '</a>' %>
@@ -47,11 +51,11 @@ by
<%# date('F j, Y \a\t h:i:s a',$this->DataItem->CreateTime) %>
by
<%# $this->DataItem->AuthorWebsite==='' ?
- $this->DataItem->AuthorName :
- '<a href="' . $this->DataItem->AuthorWebsite . '">' . $this->DataItem->AuthorName . '</a>' %>
+ htmlentities($this->DataItem->AuthorName,ENT_QUOTES,'UTF-8') :
+ '<a href="' . htmlentities($this->DataItem->AuthorWebsite) . '">' . htmlentities($this->DataItem->AuthorName,ENT_QUOTES,'UTF-8') . '</a>' %>
</div>
<div class="comment-content">
-<%# $this->DataItem->Content %>
+<%# nl2br(htmlentities($this->DataItem->Content,ENT_QUOTES,'UTF-8')) %>
</div>
</div>
</prop:ItemTemplate>
@@ -65,7 +69,7 @@ by
ValidationGroup="comment""
Display="Dynamic"
Text="...is required"
- ControlCssClass="inputerror" />
+ ControlCssClass="input-error1" />
<br/>
<com:TTextBox ID="CommentAuthor" />
<br/>
@@ -76,14 +80,14 @@ by
ValidationGroup="comment""
Display="Dynamic"
Text="...is required"
- ControlCssClass="inputerror" />
+ ControlCssClass="input-error1" />
<com:TEmailAddressValidator
ControlToValidate="CommentEmail"
ValidationGroup="comment"
Display="Dynamic"
Text="*"
ErrorMessage="You entered an invalid email address."
- ControlCssClass="inputerror" />
+ ControlCssClass="input-error2" />
<br/>
<com:TTextBox ID="CommentEmail" />
<br/>
@@ -99,14 +103,16 @@ by
ValidationGroup="comment"
Display="Dynamic"
Text="...is required"
- ControlCssClass="inputerror" />
+ ControlCssClass="input-error1" />
<br/>
<com:TTextBox ID="CommentContent" TextMode="MultiLine" Columns="55" Rows="10"/>
<br/>
+<br/>
<com:TLinkButton
Text="Submit"
ValidationGroup="comment"
+ CssClass="link-button"
OnClick="submitCommentButtonClicked" />
</div>