2014-09-07 09:57:01 +02:00
|
|
|
<div id="user-view" class="tab-wrapper">
|
2014-09-04 19:07:57 +02:00
|
|
|
<div class="messages"></div>
|
2014-09-07 00:33:46 +02:00
|
|
|
|
2014-09-07 09:57:01 +02:00
|
|
|
<div class="top">
|
|
|
|
<div class="side">
|
2014-10-05 11:05:34 +02:00
|
|
|
<img width="100" height="100" src="/data/thumbnails/100x100/avatars/<%= user.name %>" alt="Avatar"/>
|
2014-09-07 09:57:01 +02:00
|
|
|
<br/>
|
|
|
|
<%= user.name %>
|
|
|
|
</div>
|
|
|
|
|
2014-09-16 19:12:20 +02:00
|
|
|
<% if ((canChangeBrowsingSettings || canChangeAccountSettings || canDeleteAccount)) { %>
|
|
|
|
|
2014-09-07 09:57:01 +02:00
|
|
|
<ul>
|
|
|
|
<li>
|
2014-09-17 11:48:10 +02:00
|
|
|
<a class="big-button" href="#/user/<%= user.name %>" data-tab="basic-info">
|
|
|
|
Basic information
|
|
|
|
</a>
|
2014-09-07 09:57:01 +02:00
|
|
|
</li>
|
|
|
|
|
|
|
|
<% if (canChangeBrowsingSettings) { %>
|
|
|
|
<li>
|
2014-09-17 11:48:10 +02:00
|
|
|
<a class="big-button" href="#/user/<%= user.name %>/browsing-settings" data-tab="browsing-settings">
|
|
|
|
Browsing settings
|
|
|
|
</a>
|
2014-09-07 09:57:01 +02:00
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<% if (canChangeAccountSettings) { %>
|
|
|
|
<li>
|
2014-09-17 11:48:10 +02:00
|
|
|
<a class="big-button" href="#/user/<%= user.name %>/account-settings" data-tab="account-settings">
|
|
|
|
Account settings
|
|
|
|
</a>
|
2014-09-07 09:57:01 +02:00
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<% if (canDeleteAccount) { %>
|
|
|
|
<li>
|
2014-09-17 11:48:10 +02:00
|
|
|
<a class="big-button" href="#/user/<%= user.name %>/account-removal" data-tab="account-removal">
|
|
|
|
Account removal
|
|
|
|
</a>
|
2014-09-07 09:57:01 +02:00
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
</ul>
|
2014-09-16 19:12:20 +02:00
|
|
|
|
|
|
|
<% } %>
|
2014-09-07 09:57:01 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab basic-info" data-tab="basic-info">
|
|
|
|
<h2>Basic information</h2>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Registered:</td>
|
2014-12-20 10:30:10 +01:00
|
|
|
<td title="<%= util.formatAbsoluteTime(user.registrationTime) %>">
|
|
|
|
<%= util.formatRelativeTime(user.registrationTime) %>
|
2014-11-27 10:34:45 +01:00
|
|
|
</td>
|
2014-09-07 09:57:01 +02:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Seen:</td>
|
2014-12-20 10:30:10 +01:00
|
|
|
<td title="<%= util.formatAbsoluteTime(user.lastLoginTime) %>">
|
|
|
|
<%= util.formatRelativeTime(user.lastLoginTime) %>
|
2014-11-27 10:34:45 +01:00
|
|
|
</td>
|
2014-09-07 09:57:01 +02:00
|
|
|
</tr>
|
2014-10-04 20:43:37 +02:00
|
|
|
|
2014-10-12 11:45:09 +02:00
|
|
|
<% if (user.accessRank) { %>
|
|
|
|
<tr>
|
|
|
|
<td>Access rank:</td>
|
|
|
|
<%
|
|
|
|
var accessRanks = {
|
|
|
|
anonymous: 'anonymous',
|
|
|
|
restrictedUser: 'restricted user',
|
|
|
|
regularUser: 'regular user',
|
|
|
|
powerUser: 'power user',
|
|
|
|
moderator: 'moderator',
|
|
|
|
administrator: 'administrator'
|
|
|
|
};
|
|
|
|
%>
|
|
|
|
<td><%= accessRanks[user.accessRank] %></td>
|
|
|
|
</tr>
|
|
|
|
<% } %>
|
|
|
|
|
2014-10-04 20:43:37 +02:00
|
|
|
<tr>
|
|
|
|
<td>Quick links:</td>
|
|
|
|
<td>
|
|
|
|
<ul class="links">
|
|
|
|
<li>
|
|
|
|
<a href="#/posts/query=fav:<%= user.name %>">
|
|
|
|
Favorites
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="#/posts/query=uploader:<%= user.name %>">
|
|
|
|
Uploads
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% if (isLoggedIn) { %>
|
|
|
|
<li>
|
|
|
|
<a href="#/posts/query=special:liked">
|
|
|
|
Upvoted posts
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="#/posts/query=special:disliked">
|
|
|
|
Downvoted posts
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-09-07 09:57:01 +02:00
|
|
|
</table>
|
|
|
|
</div>
|
2014-09-04 19:07:57 +02:00
|
|
|
|
2014-09-07 00:33:46 +02:00
|
|
|
<% if (canChangeBrowsingSettings) { %>
|
2014-09-07 09:57:01 +02:00
|
|
|
<div class="tab" data-tab="browsing-settings">
|
|
|
|
<h2>Browsing settings</h2>
|
|
|
|
<div id="browsing-settings-target"></div>
|
|
|
|
</div>
|
2014-09-07 00:33:46 +02:00
|
|
|
<% } %>
|
2014-09-04 19:07:57 +02:00
|
|
|
|
2014-09-07 00:33:46 +02:00
|
|
|
<% if (canChangeAccountSettings) { %>
|
2014-09-07 09:57:01 +02:00
|
|
|
<div class="tab" data-tab="account-settings">
|
|
|
|
<h2>Account settings</h2>
|
|
|
|
<div id="account-settings-target"></div>
|
|
|
|
</div>
|
2014-09-07 00:33:46 +02:00
|
|
|
<% } %>
|
2014-09-04 19:07:57 +02:00
|
|
|
|
2014-09-05 13:50:51 +02:00
|
|
|
<% if (canDeleteAccount) { %>
|
2014-09-07 09:57:01 +02:00
|
|
|
<div class="tab" data-tab="account-removal">
|
|
|
|
<h2>Account removal</h2>
|
|
|
|
<div id="account-removal-target"></div>
|
|
|
|
</div>
|
2014-09-05 13:50:51 +02:00
|
|
|
<% } %>
|
|
|
|
|
2014-09-04 19:07:57 +02:00
|
|
|
</div>
|