summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/samples/day4/blog/protected/pages/posts/ReadPost.page
blob: 60a8cf1e7d51b378623207b228efb62b85188e36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<com:TContent ID="Main">

<h2>
<com:TLiteral Text="<%= $this->Post->title %>" />
</h2>

<com:TControl Visible="<%= $this->canEdit() %>">
	<a href="<%= $this->Service->constructUrl('posts.EditPost',array('id'=>$this->Post->post_id))%>">Edit</a> |
	<com:TLinkButton Text="Delete"
		OnClick="deletePost"
		Attributes.onclick="javascript:if(!confirm('Are you sure?')) return false;" />
</com:TControl>

<p>
Author:
<com:TLiteral Text="<%= $this->Post->author->username %>" /><br/>
Time:
<com:TLiteral Text="<%= date('m/d/Y h:m:sa', $this->Post->create_time) %>" />
</p>

<p>
<com:TLiteral Text="<%= $this->Post->content %>" />
</p>

</com:TContent>