mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00

Using {{pathFor}}, path(), and url() where possible. Passing in path to Meteor.absoluteUrl() where the IronRouter functions didn't make sense. Also deleting some random unused code.
160 lines
3.8 KiB
HTML
160 lines
3.8 KiB
HTML
<template name="user_profile">
|
|
{{#with user}}
|
|
<div class="user-profile grid grid-module">
|
|
<table>
|
|
<tr>
|
|
<td colspan="2">{{> avatar user=this size="large" shape="circle"}}</td>
|
|
</tr>
|
|
{{#if isAdmin}}
|
|
<tr>
|
|
<td>{{_ "id"}}: </td>
|
|
<td>{{_id}}</td>
|
|
</tr>
|
|
{{/if}}
|
|
<tr>
|
|
<td>{{_ "name"}}</td>
|
|
<td>{{profile.name}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{_ "member_since"}}:</td>
|
|
<td>{{createdAtFormatted}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{_ "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>{{_ "github"}}:</td>
|
|
<td><a href="http://github.com/{{getGitHubName}}">{{getGitHubName}}</a></td>
|
|
</tr>
|
|
{{/if}}
|
|
{{#if profile.site}}
|
|
<tr>
|
|
<td>{{_ "site"}}:</td>
|
|
<td><a href="{{profile.site}}">{{profile.site}}</a></td>
|
|
</tr>
|
|
{{/if}}
|
|
</table>
|
|
{{#if canEditProfile}}
|
|
<a class="button inline" href="{{pathFor route='user_edit' slug=slug}}">{{_ "edit_profile"}}</a>
|
|
{{/if}}
|
|
{{#if canInvite}}
|
|
{{#if inviteCount}}
|
|
<a class="button inline invite-link" href="#">{{_ "invite"}} ({{inviteCount}} {{_ "left"}})</a>
|
|
{{else}}
|
|
<a class="button inline disabled" href="#">{{_ "invite_none_left"}}</a>
|
|
{{/if}}
|
|
{{/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="{{pathFor route='post_page' _id=_id}}">{{title}}</a></td>
|
|
<td>{{formatDate createdAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
</tr>
|
|
{{/each}}
|
|
{{#if hasMorePosts}}
|
|
<tr>
|
|
<td colspan="2">
|
|
<a class="posts-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
|
|
</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="{{pathFor route='post_page' _id=_id}}">{{title}}</a></td>
|
|
<td>{{formatDate votedAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
</tr>
|
|
{{/each}}
|
|
{{#if hasMoreUpvotedPosts}}
|
|
<tr>
|
|
<td colspan="2">
|
|
<a class="upvotedposts-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
|
|
</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="{{pathFor route='post_page' _id=_id}}">{{title}}</a></td>
|
|
<td>{{formatDate votedAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
</tr>
|
|
{{/each}}
|
|
{{#if hasMoreDownvotedPosts}}
|
|
<tr>
|
|
<td colspan="2">
|
|
<a class="downvoted-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
|
|
</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="{{pathFor route='post_page' _id=postId}}/">{{postTitle}}</a></td>
|
|
<td>{{{htmlBody}}}</td>
|
|
<td>{{formatDate createdAt "MM/DD/YYYY, HH:mm"}}</td>
|
|
</tr>
|
|
{{/each}}
|
|
{{#if hasMoreComments}}
|
|
<tr>
|
|
<td colspan="2">
|
|
<a class="comments-more more-button grid-module" href="#"><span>{{_ "load_more"}}</span></a>
|
|
</td>
|
|
</tr>
|
|
{{/if}}
|
|
</table>
|
|
</div>
|
|
|
|
{{/with}}
|
|
</template>
|