szurubooru/public_html/templates/user-list-item.tpl
Marcin Kurczewski 6a751ed0b2 Fixed user list presenter disrespecting privileges
If user had no right to view user accounts, the list presenter ignored
that and linked to pages that shown privilege errors. Now it shows the
links only if user has right to view user accounts.
2014-11-17 22:16:30 +01:00

29 lines
713 B
Smarty

<div class="user">
<div class="avatar">
<% if (canViewUsers) { %>
<a href="#/user/<%= user.name %>">
<% } %>
<img width="80" height="80" src="/data/thumbnails/80x80/avatars/<%= user.name %>" alt="<%= user.name %>"/>
<% if (canViewUsers) { %>
</a>
<% } %>
</div>
<div class="details">
<h1>
<% if (canViewUsers) { %>
<a href="#/user/<%= user.name %>">
<%= user.name %>
</a>
<% } else { %>
<%= user.name %>
<% } %>
</h1>
<div class="date-joined" title="<%= user.registrationTime %>">
Joined: <%= formatRelativeTime(user.registrationTime) %>
</div>
<div class="date-seen">
Last seen: <%= formatRelativeTime(user.lastLoginTime) %>
</div>
</div>
</div>