summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.tpl
blob: c70e864dafcac7820ce7d3cd1e4301ab46a11c9a (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
<div class="scaffold_list_view">
<div class="item-header">
<com:TRepeater ID="_header">
	<prop:ItemTemplate>
		<com:TLabel Text=<%# $this->DataItem %> CssClass="field field_<%# $this->ItemIndex %>"/>
	</prop:ItemTemplate>
</com:TRepeater>

<span class="sort-options">
	<com:TDropDownList ID="_sort" AutoPostBack="true"/>
</span>

</div>

<div class="item-list">
<com:TRepeater ID="_list"
	AllowPaging="true"
     AllowCustomPaging="true"
     onItemCommand="bubbleEvent"
     onItemCreated="listItemCreated"
	 PageSize="10">
	<prop:ItemTemplate>
	<div class="item item_<%# $this->ItemIndex % 2 %>">

	<com:TRepeater ID="_properties">
		<prop:ItemTemplate>
		<span class="field field_<%# $this->ItemIndex %>">
			<%# htmlspecialchars($this->DataItem) %>
		</span>
		</prop:ItemTemplate>
	</com:TRepeater>

	<span class="edit-delete-buttons">
		<com:TButton Text="Edit"
			Visible=<%# $this->NamingContainer->Parent->EditViewID !== Null %>
			CommandName="edit"
			CssClass="edit-button"
			CausesValidation="false" />
		<com:TButton Text="Delete"
			CommandName="delete"
			CssClass="delete-button"
			CausesValidation="false"
			Attributes.onclick="if(!confirm('Are you sure?')) return false;"  />
	</span>

	</div>
	</prop:ItemTemplate>
</com:TRepeater>
</div>

<com:TPager ID="_pager"
	CssClass="pager"
	ControlToPaginate="_list"
	PageButtonCount="10"
	Mode="Numeric"
	OnPageIndexChanged="pageChanged" />
</div>