Vulcan/client/views/users/user_profile.html

161 lines
3.7 KiB
HTML
Raw Normal View History

2012-09-24 22:27:29 +02:00
<template name="user_profile">
{{#with user}}
<div class="user-profile grid grid-module">
2012-09-24 22:27:29 +02:00
<table>
<tr>
<td colspan="2">{{> avatar user=this size="large" shape="circle"}}</td>
2012-09-24 22:27:29 +02:00
</tr>
{{#if isAdmin}}
<tr>
<td>{{_ "id"}}: </td>
<td>{{_id}}</td>
</tr>
{{/if}}
2012-09-24 22:27:29 +02:00
<tr>
<td>{{_ "name"}}</td>
2013-10-09 20:50:26 +09:00
<td>{{profile.name}}</td>
2012-09-24 22:27:29 +02:00
</tr>
<tr>
<td>{{_ "member_since"}}:</td>
2012-10-11 08:23:52 +09:00
<td>{{createdAtFormatted}}</td>
2012-09-24 22:27:29 +02:00
</tr>
<tr>
<td>{{_ "bio"}}</td>
2012-09-24 22:27:29 +02:00
<td>{{profile.bio}}</td>
</tr>
2013-11-08 11:42:00 +09:00
{{#if getTwitterName}}
<tr>
<td>Twitter: </td>
<td><a href="http://twitter.com/{{getTwitterName}}">{{getTwitterName}}</a></td>
</tr>
{{/if}}
{{#if getGitHubName}}
<tr>
<td>{{_ "github"}}:</td>
2013-11-08 11:42:00 +09:00
<td><a href="http://github.com/{{getGitHubName}}">{{getGitHubName}}</a></td>
</tr>
{{/if}}
{{#if profile.site}}
2013-11-08 11:42:00 +09:00
<tr>
<td>{{_ "site"}}:</td>
2013-11-08 11:42:00 +09:00
<td><a href="{{profile.site}}">{{profile.site}}</a></td>
</tr>
2014-09-26 22:48:09 +03:00
{{/if}}
2012-09-24 22:27:29 +02:00
</table>
2013-10-09 20:50:26 +09:00
{{#if canEditProfile}}
<a class="button inline" href="/users/{{slug}}/edit">{{_ "edit_profile"}}</a>
2013-10-23 19:43:42 +09:00
{{/if}}
{{#if canInvite}}
{{#if inviteCount}}
<a class="button inline invite-link" href="#">{{_ "invite"}} ({{inviteCount}} {{_ "left"}})</a>
2013-10-23 19:43:42 +09:00
{{else}}
<a class="button inline disabled" href="#">{{_ "invite_none_left"}}</a>
2013-10-23 19:43:42 +09:00
{{/if}}
2012-09-24 22:27:29 +02:00
{{/if}}
</div>
<div class="user-profile-posts grid grid-module">
<h3>{{_ "posts"}}</h3>
<table>
<thead>
<tr>
<td>Post</td>
<td>Created At</td>
</tr>
</thead>
{{#each posts}}
<tr>
<td><a href="/posts/{{_id}}/">{{title}}</a></td>
<td>{{formatDate createdAt "MM/DD/YYYY, HH:mm"}}</td>
</tr>
{{/each}}
2014-09-03 09:46:39 +09:00
{{#if hasMorePosts}}
<tr>
<td colspan="2">
<a class="posts-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
2014-09-03 09:46:39 +09:00
</td>
</tr>
{{/if}}
</table>
</div>
<div class="user-profile-votes grid grid-module">
<h3>{{_ "upvoted_posts"}}</h3>
<table>
<thead>
<tr>
<td>Post</td>
<td>Upvoted At</td>
</tr>
</thead>
{{#each upvotedPosts}}
<tr>
<td><a href="/posts/{{_id}}/">{{title}}</a></td>
<td>{{formatDate votedAt "MM/DD/YYYY, HH:mm"}}</td>
</tr>
{{/each}}
2014-09-03 09:46:39 +09:00
{{#if hasMoreUpvotedPosts}}
<tr>
<td colspan="2">
<a class="upvotedposts-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
2014-09-03 09:46:39 +09:00
</td>
</tr>
{{/if}}
</table>
</div>
<div class="user-profile-votes grid grid-module">
<h3>{{_ "downvoted_posts"}}</h3>
<table>
<thead>
<tr>
<td>Post</td>
<td>Downvoted At</td>
</tr>
</thead>
{{#each downvoted}}
<tr>
<td><a href="/posts/{{_id}}/">{{title}}</a></td>
<td>{{formatDate votedAt "MM/DD/YYYY, HH:mm"}}</td>
</tr>
{{/each}}
2014-09-03 09:46:39 +09:00
{{#if hasMoreDownvotedPosts}}
<tr>
<td colspan="2">
<a class="downvoted-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
2014-09-03 09:46:39 +09:00
</td>
</tr>
{{/if}}
</table>
</div>
<div class="user-profile-comments grid grid-module">
<h3>{{_ "comments_"}}</h3>
<table>
<thead>
<tr>
<td>Post</td>
<td>Comment</td>
<td>Commented At</td>
</tr>
</thead>
{{#each comments}}
<tr>
<td><a href="/posts/{{postId}}/">{{postTitle}}</a></td>
2014-09-01 09:52:40 +09:00
<td>{{{htmlBody}}}</td>
<td>{{formatDate createdAt "MM/DD/YYYY, HH:mm"}}</td>
</tr>
{{/each}}
2014-09-03 09:46:39 +09:00
{{#if hasMoreComments}}
<tr>
<td colspan="2">
<a class="comments-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
2014-09-03 09:46:39 +09:00
</td>
</tr>
{{/if}}
</table>
</div>
{{/with}}
</template>