2012-09-24 22:27:29 +02:00
|
|
|
<template name="user_profile">
|
2014-08-22 17:06:22 +09:00
|
|
|
{{#with user}}
|
|
|
|
<div class="user-profile grid grid-module">
|
2012-09-24 22:27:29 +02:00
|
|
|
<table>
|
|
|
|
<tr>
|
2013-11-07 09:57:57 +09:00
|
|
|
<td colspan="2"><img class="user-avatar" src="{{avatarUrl}}"/></td>
|
2012-09-24 22:27:29 +02:00
|
|
|
</tr>
|
2013-11-18 11:30:58 +09:00
|
|
|
{{#if isAdmin}}
|
|
|
|
<tr>
|
2013-11-21 11:41:04 +09:00
|
|
|
<td>{{i18n "ID"}}: </td>
|
2013-11-18 11:30:58 +09:00
|
|
|
<td>{{_id}}</td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|
2012-09-24 22:27:29 +02:00
|
|
|
<tr>
|
2013-11-21 11:41:04 +09:00
|
|
|
<td>{{i18n "Name:"}}</td>
|
2013-10-09 20:50:26 +09:00
|
|
|
<td>{{profile.name}}</td>
|
2012-09-24 22:27:29 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2013-11-21 11:41:04 +09:00
|
|
|
<td>{{i18n "Member since"}}:</td>
|
2012-10-11 08:23:52 +09:00
|
|
|
<td>{{createdAtFormatted}}</td>
|
2012-09-24 22:27:29 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2013-11-21 11:41:04 +09:00
|
|
|
<td>{{i18n "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>
|
2013-11-21 11:41:04 +09:00
|
|
|
<td>{{i18n "GitHub"}}:</td>
|
2013-11-08 11:42:00 +09:00
|
|
|
<td><a href="http://github.com/{{getGitHubName}}">{{getGitHubName}}</a></td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|
|
|
|
{{#if site}}
|
|
|
|
<tr>
|
2013-11-21 11:41:04 +09:00
|
|
|
<td>{{i18n "Site"}}:</td>
|
2013-11-08 11:42:00 +09:00
|
|
|
<td><a href="{{profile.site}}">{{profile.site}}</a></td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|
2012-09-24 22:27:29 +02:00
|
|
|
</table>
|
2013-10-09 20:50:26 +09:00
|
|
|
{{#if canEditProfile}}
|
2013-11-09 02:02:05 +01:00
|
|
|
<a class="button inline" href="/users/{{slug}}/edit">{{i18n "Edit profile"}}</a>
|
2013-10-23 19:43:42 +09:00
|
|
|
{{/if}}
|
|
|
|
{{#if canInvite}}
|
2013-11-14 10:49:37 +09:00
|
|
|
{{#if inviteCount}}
|
2013-11-21 11:41:04 +09:00
|
|
|
<a class="button inline invite-link" href="#">{{i18n "Invite"}} ({{inviteCount}} {{i18n "left"}})</a>
|
2013-10-23 19:43:42 +09:00
|
|
|
{{else}}
|
2013-11-09 02:02:05 +01:00
|
|
|
<a class="button inline disabled" href="#">{{i18n "Invite (none left)"}}</a>
|
2013-10-23 19:43:42 +09:00
|
|
|
{{/if}}
|
2012-09-24 22:27:29 +02:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2014-08-23 11:28:05 +09:00
|
|
|
|
|
|
|
<div class="user-profile-posts grid grid-module">
|
|
|
|
<h3>{{i18n "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}}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2014-08-22 17:06:22 +09:00
|
|
|
<div class="user-profile-votes grid grid-module">
|
|
|
|
<h3>{{i18n "Upvoted Posts"}}</h3>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td>Post</td>
|
|
|
|
<td>Upvoted At</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2014-08-23 11:28:05 +09:00
|
|
|
{{#each upvotedPosts}}
|
|
|
|
<tr>
|
|
|
|
<td><a href="/posts/{{_id}}/">{{title}}</a></td>
|
|
|
|
<td>{{formatDate votedAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="user-profile-votes grid grid-module">
|
|
|
|
<h3>{{i18n "Downvoted Posts"}}</h3>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td>Post</td>
|
|
|
|
<td>Downvoted At</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{{#each downvoted}}
|
2014-08-22 17:06:22 +09:00
|
|
|
<tr>
|
|
|
|
<td><a href="/posts/{{_id}}/">{{title}}</a></td>
|
|
|
|
<td>{{formatDate votedAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
|
|
|
</div>
|
2014-08-23 11:28:05 +09:00
|
|
|
|
2014-08-22 17:06:22 +09:00
|
|
|
<div class="user-profile-comments grid grid-module">
|
|
|
|
<h3>{{i18n "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>
|
2014-08-22 17:06:22 +09:00
|
|
|
<td>{{formatDate createdAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
2014-08-11 10:14:53 +09:00
|
|
|
</div>
|
2014-08-23 11:28:05 +09:00
|
|
|
|
2014-08-22 17:06:22 +09:00
|
|
|
{{/with}}
|
2012-09-24 22:27:29 +02:00
|
|
|
</template>
|