summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page
diff options
context:
space:
mode:
authorxue <>2007-06-29 17:41:20 +0000
committerxue <>2007-06-29 17:41:20 +0000
commit4a9dd5c8513ed96d1e0cf43e370b170dc38fb502 (patch)
treef41bbf25ac5bbc8d0b656c3e7c087e40b09b38b1 /demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page
parent2d266a7994c57e9a13cccecacf8940e11263614f (diff)
finished blog-tutorial.
Diffstat (limited to 'demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page')
-rw-r--r--demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page25
1 files changed, 25 insertions, 0 deletions
diff --git a/demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page b/demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page
new file mode 100644
index 00000000..60a8cf1e
--- /dev/null
+++ b/demos/blog-tutorial/samples/day5/blog/protected/pages/posts/ReadPost.page
@@ -0,0 +1,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> \ No newline at end of file