Vulcan/client/views/users/user_profile.html

132 lines
No EOL
3 KiB
HTML

<template name="user_profile">
{{#with user}}
<div class="user-profile grid grid-module">
<table>
<tr>
<td colspan="2"><img class="user-avatar" src="{{avatarUrl}}"/></td>
</tr>
{{#if isAdmin}}
<tr>
<td>{{i18n "ID"}}: </td>
<td>{{_id}}</td>
</tr>
{{/if}}
<tr>
<td>{{i18n "Name:"}}</td>
<td>{{profile.name}}</td>
</tr>
<tr>
<td>{{i18n "Member since"}}:</td>
<td>{{createdAtFormatted}}</td>
</tr>
<tr>
<td>{{i18n "Bio:"}}</td>
<td>{{profile.bio}}</td>
</tr>
{{#if getTwitterName}}
<tr>
<td>Twitter: </td>
<td><a href="http://twitter.com/{{getTwitterName}}">{{getTwitterName}}</a></td>
</tr>
{{/if}}
{{#if getGitHubName}}
<tr>
<td>{{i18n "GitHub"}}:</td>
<td><a href="http://github.com/{{getGitHubName}}">{{getGitHubName}}</a></td>
</tr>
{{/if}}
{{#if site}}
<tr>
<td>{{i18n "Site"}}:</td>
<td><a href="{{profile.site}}">{{profile.site}}</a></td>
</tr>
{{/if}}
</table>
{{#if canEditProfile}}
<a class="button inline" href="/users/{{slug}}/edit">{{i18n "Edit profile"}}</a>
{{/if}}
{{#if canInvite}}
{{#if inviteCount}}
<a class="button inline invite-link" href="#">{{i18n "Invite"}} ({{inviteCount}} {{i18n "left"}})</a>
{{else}}
<a class="button inline disabled" href="#">{{i18n "Invite (none left)"}}</a>
{{/if}}
{{/if}}
</div>
<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>
<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>
{{#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}}
<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-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>
<td>{{body}}</td>
<td>{{formatDate createdAt "MM/DD/YYYY, HH:mm"}}</td>
</tr>
{{/each}}
</table>
</div>
{{/with}}
</template>