summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Users/ViewUser.page
diff options
context:
space:
mode:
Diffstat (limited to 'demos/blog/protected/Pages/Users/ViewUser.page')
-rw-r--r--demos/blog/protected/Pages/Users/ViewUser.page47
1 files changed, 33 insertions, 14 deletions
diff --git a/demos/blog/protected/Pages/Users/ViewUser.page b/demos/blog/protected/Pages/Users/ViewUser.page
index 2dba6b77..faae720b 100644
--- a/demos/blog/protected/Pages/Users/ViewUser.page
+++ b/demos/blog/protected/Pages/Users/ViewUser.page
@@ -1,21 +1,40 @@
+<%@ Title="View User Profile" %>
+
<com:TContent ID="Main">
<h2>User Profile</h2>
-Username: <%= $this->CurrentUser->Name %>
-<br/>
-
-Full name: <%= $this->CurrentUser->FullName %>
-<br/>
-
-Email: <%= $this->CurrentUser->Email %>
+<table class="profile-table">
+<tr>
+ <td class="profile-table-label">Username</td>
+ <td class="profile-table-value"><%= $this->Profile->Name %></td>
+</tr>
+<tr>
+ <td class="profile-table-label">Full name</td>
+ <td class="profile-table-value"><%= htmlentities($this->Profile->FullName,ENT_QUOTES,'UTF-8') %></td>
+</tr>
+<tr>
+ <td class="profile-table-label">Email</td>
+ <td class="profile-table-value"><%= $this->Profile->Email %></td>
+</tr>
+<tr>
+ <td class="profile-table-label">Role</td>
+ <td class="profile-table-value"><%= $this->Profile->Role===0? 'Normal user':'Administrator' %></td>
+</tr>
+<tr>
+ <td class="profile-table-label">Website</td>
+ <td class="profile-table-value"><%= htmlentities($this->Profile->Website,ENT_QUOTES,'UTF-8') %></td>
+</tr>
+<tr>
+ <td class="profile-table-label">Member since</td>
+ <td class="profile-table-value"><%= date('l, F j, Y',$this->Profile->CreateTime) %></td>
+</tr>
+</table>
<br/>
-
-Privilege: <%= $this->CurrentUser->Role===0? 'User':'Administrator' %>
-<br/>
-
-Personal website: <%= $this->CurrentUser->Website %>
-<br/>
-
+<com:THyperLink
+ Text="Update"
+ NavigateUrl=<%= $this->Service->constructUrl('Users.EditUser',array('id'=>$this->Profile->ID)) %>
+ Visible=<%= $this->User->IsAdmin || $this->Profile->ID===$this->User->ID %>
+ CssClass="link-button" />
</com:TContent> \ No newline at end of file