Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<com:TContent ID="Main">
2
 
3
<div class="post">
4
<div class="post-title">
5
<%= htmlentities($this->CurrentPost->Title,ENT_QUOTES,'UTF-8') %>
6
</div>
7
<div class="post-time">
8
<com:TLabel
9
	ID="Status"
10
	ForeColor="red"
11
	Text=<%= $this->CurrentPost->Status===PostRecord::STATUS_DRAFT?'[Draft]':'[Pending approval]'%> />
12
<%= date('l, F j, Y \a\t h:i:s a',$this->CurrentPost->CreateTime) %>
13
by
14
<%= '<a href="' . $this->Service->constructUrl('Users.ViewUser',array('id'=>$this->CurrentPost->AuthorID)) . '">' . $this->CurrentPost->AuthorName . '</a>' %>
15
<%= $this->CanEditPost ? '| <a href="' . $this->Service->constructUrl('Posts.EditPost',array('id'=>$this->CurrentPost->ID)) . '">Edit</a> | ' : '';
16
%>
17
<com:TLinkButton
18
	Text="Delete"
19
	OnClick="deleteButtonClicked"
20
	Visible=<%= $this->CanEditPost %>
21
	Attributes.onclick="if(!confirm('Are you sure to delete this post? This will also delete all related comments.')) return false;"
22
	/>
23
</div>
24
<div class="post-content">
25
<%= $this->CurrentPost->Content %>
26
</div>
27
<div class="post-footer">
28
<com:TRepeater ID="CategoryList" EnableViewState="false">
29
	<prop:ItemTemplate>
30
	[
31
	<a href="<%# $this->Service->constructUrl('Posts.ListPost',array('cat'=>$this->DataItem->ID)) %>"><%# $this->DataItem->Name %></a>
32
	]
33
	</prop:ItemTemplate>
34
</com:TRepeater>
35
</div>
36
</div>
37
 
38
<div class="comments">
39
<a name="comments"></a>
40
<h3>Comments</h3>
41
 
42
<com:TRepeater ID="CommentList" OnItemCommand="repeaterItemCommand">
43
	<prop:ItemTemplate>
44
<div class="comment">
45
<div class="comment-header">
46
<a name="c<%# $this->DataItem->ID %>"></a>
47
<com:TLinkButton
48
	Text="Delete"
49
	Attributes.onclick="if(!confirm('Are you sure to delete this comment?')) return false;"
50
	CommandParameter=<%# $this->DataItem->ID %>
51
	Visible=<%= $this->Page->CanEditPost %> Style="float:right"/>
52
<%# date('F j, Y \a\t h:i:s a',$this->DataItem->CreateTime) %>
53
by
54
<%# $this->DataItem->AuthorWebsite==='' ?
55
		htmlentities($this->DataItem->AuthorName,ENT_QUOTES,'UTF-8') :
56
		'<a href="' . htmlentities($this->DataItem->AuthorWebsite) . '">' . htmlentities($this->DataItem->AuthorName,ENT_QUOTES,'UTF-8') . '</a>' %>
57
</div>
58
<div class="comment-content">
59
<%# nl2br(htmlentities($this->DataItem->Content,ENT_QUOTES,'UTF-8')) %>
60
</div>
61
</div>
62
	</prop:ItemTemplate>
63
</com:TRepeater>
64
 
65
<h4>Leave your comment</h4>
66
 
67
<span class="input-label">Name</span>
68
<com:TRequiredFieldValidator
69
	ControlToValidate="CommentAuthor"
70
	ValidationGroup="comment""
71
	Display="Dynamic"
72
	Text="...is required"
73
	ControlCssClass="input-error1" />
74
<br/>
75
<com:TTextBox ID="CommentAuthor" />
76
<br/>
77
 
78
<span class="input-label">Email address</span>
79
<com:TRequiredFieldValidator
80
	ControlToValidate="CommentEmail"
81
	ValidationGroup="comment""
82
	Display="Dynamic"
83
	Text="...is required"
84
	ControlCssClass="input-error1" />
85
<com:TEmailAddressValidator
86
	ControlToValidate="CommentEmail"
87
	ValidationGroup="comment"
88
	Display="Dynamic"
89
	Text="*"
90
	ErrorMessage="You entered an invalid email address."
91
	ControlCssClass="input-error2" />
92
<br/>
93
<com:TTextBox ID="CommentEmail" />
94
<br/>
95
 
96
<span class="input-label">Personal website</span>
97
<br/>
98
<com:TTextBox ID="CommentWebsite" Columns="70"/>
99
<br/>
100
 
101
<span class="input-label">Comment</span>
102
<com:TRequiredFieldValidator
103
	ControlToValidate="CommentContent"
104
	ValidationGroup="comment"
105
	Display="Dynamic"
106
	Text="...is required"
107
	ControlCssClass="input-error1" />
108
<br/>
109
<com:TTextBox ID="CommentContent" TextMode="MultiLine" Columns="55" Rows="10"/>
110
<br/>
111
<br/>
112
 
113
<com:TLinkButton
114
	Text="Submit"
115
	ValidationGroup="comment"
116
	CssClass="link-button"
117
	OnClick="submitCommentButtonClicked" />
118
 
119
</div>
120
</com:TContent>