Added quick links to user view
This commit is contained in:
parent
1a8568392f
commit
4bfe70f256
4 changed files with 45 additions and 3 deletions
3
TODO
3
TODO
|
@ -30,9 +30,6 @@ everything related to posts:
|
|||
(move post snapshot factory methods to PostService)
|
||||
|
||||
everything related to users:
|
||||
- show link to user's uploads
|
||||
- show link to user's favs
|
||||
- show link to user's liked posts
|
||||
- better avatar loading
|
||||
|
||||
everything related to tags:
|
||||
|
|
|
@ -22,6 +22,16 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
#user-view ul.links {
|
||||
list-style-type: disc;
|
||||
list-style-position: inside;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#user-view ul.links li a {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#user-view ul a {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
@ -44,4 +54,5 @@
|
|||
}
|
||||
#user-view .tab.basic-info td {
|
||||
padding: 0.2em 0.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ App.Presenters.UserPresenter = function(
|
|||
function render() {
|
||||
$el.html(template({
|
||||
user: user,
|
||||
isLoggedIn: auth.isLoggedIn(user.name),
|
||||
formatRelativeTime: util.formatRelativeTime,
|
||||
canChangeBrowsingSettings: userBrowsingSettingsPresenter.getPrivileges().canChangeBrowsingSettings,
|
||||
canChangeAccountSettings: _.any(userAccountSettingsPresenter.getPrivileges()),
|
||||
|
|
|
@ -58,6 +58,39 @@
|
|||
<td>Seen:</td>
|
||||
<td><%= formatRelativeTime(user.lastLoginTime) %></td>
|
||||
</tr>
|
||||
|
||||
<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>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue