summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Posts/MyPost.page
blob: ca1531660700a62631adebd2115e6839b33a23ed (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
<com:TContent ID="Main">

<h2>My Posts</h2>

<com:TDataGrid ID="PostGrid"
	AutoGenerateColumns="false"
	CssClass="grid"
	HeaderStyle.CssClass="grid-header"
	ItemStyle.CssClass="grid-row1"
	AlternatingItemStyle.CssClass="grid-row2"
	AllowPaging="true"
	AllowCustomPaging="true"
	PageSize="20"
	PagerStyle.CssClass="grid-pager"
	PagerStyle.Mode="Numeric"
	OnPageIndexChanged="changePage"
	OnPagerCreated="pagerCreated"
	>
	<com:THyperLinkColumn
		HeaderText="Title"
		DataNavigateUrlField="ID"
		DataNavigateUrlFormatString="#$this->Service->constructUrl('Posts.ViewPost',array('id'=>{0}))"
		DataTextField="Title"
		/>
	<com:TBoundColumn
		HeaderText="Status"
		DataField="Status"
		DataFormatString="#{0}===0?'Published':({0}===1?'Draft':'Pending')"
		ItemStyle.Width="70px"
		/>
	<com:TBoundColumn
		HeaderText="Comments"
		DataField="CommentCount"
		ItemStyle.HorizontalAlign="Center"
		ItemStyle.Width="80px"
		/>
	<com:TBoundColumn
		HeaderText="Time"
		DataField="CreateTime"
		DataFormatString="#date('M j, Y',{0})"
		ItemStyle.Wrap="false"
		ItemStyle.Width="90px"
		/>
</com:TDataGrid>

</com:TContent>