summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Posts/ListPost.page
blob: c467190aa2fee8932dbd8cd1e515673ffcdf5e66 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<com:TContent ID="Main">

<com:TPanel ID="CategoryPanel" Visible="false" CssClass="category">

<div class="category-name">
<%= $this->Category->Name %>
<com:THyperLink
	Text="[#]"
	Tooltip="Edit this category"
	Visible=<%= $this->User->IsAdmin %>
	NavigateUrl=<%= $this->Service->constructUrl('Posts.EditCategory',array('id'=>$this->Category->ID)) %>
	/>
<com:TLinkButton
	Text="[-]"
	Tooltip="Delete this category"
	Visible=<%= $this->User->IsAdmin %>
	Attributes.onclick="if(!confirm('Are you sure to delete this category? Posts in this category will NOT be removed.')) return false;"
	OnClick="deleteButtonClicked" />
</div>
<div class="category-description">
<%= $this->Category->Description %>
</div>
</com:TPanel>

<com:TRepeater ID="PostList" EnableViewState="false">
	<prop:ItemTemplate>
<div class="post">
<div class="post-title">
<%# htmlentities($this->DataItem->Title,ENT_QUOTES,'UTF-8') %>
</div>
<div class="post-time">
<%# date('l, F j, Y \a\t h:i:s a',$this->DataItem->CreateTime) %>
</div>
<div class="post-content">
<%# $this->DataItem->Content %>
</div>
<div class="post-footer">
posted by
<%# '<a href="' . $this->Service->constructUrl('Users.ViewUser',array('id'=>$this->DataItem->AuthorID)) . '">' . $this->DataItem->AuthorName . '</a>' %>
|
<%# '<a href="' . $this->Service->constructUrl('Posts.ViewPost',array('id'=>$this->DataItem->ID)) . '">PermaLink</a>' %>
|
<%# '<a href="' . $this->Service->constructUrl('Posts.ViewPost',array('id'=>$this->DataItem->ID)) . '#comments">Comments (' . $this->DataItem->CommentCount . ')</a>' %>
</div>
</div>
	</prop:ItemTemplate>
</com:TRepeater>

<div class="postlist-pager">
<com:THyperLink
	ID="PrevPage"
	Visible="false"
	Text="&lt; Previous Page"
	/>
<com:THyperLink
	ID="NextPage"
	Visible="false"
	Text="Next Page &gt;"
	/>
</div>

</com:TContent>