- new "show-footer" mixins - converted most of the routes to ES6 - FIX: handling of "indexStream" in user pages There will now be a footer on all the following pages - /exception - /about - /latest - /new - /unread - /starred - /top - /categories - /c/:category - /c/:category/l/latest - /c/:category/l/new - /c/:category/l/unread - /c/:category/l/top - /t/:topic/:id - /groups/:name/members - /user/activity - /user/activity/topics - /user/activity/posts - /user/activity/replies - /user/activity/likes-given - /user/activity/likes-received - /user/activity/bookmarks - /user/activity/starred - /user/badges - /user/notifications - /user/flagged-posts - /user/deleted-posts - /user/private-messages - /user/private-messages/mine - /user/private-messages/unread - /user/invited - /user/:username/preferences - /faq (static pages) - /badges - /badges/:id/:badge
197 lines
7.8 KiB
Handlebars
197 lines
7.8 KiB
Handlebars
<div class='container'>
|
|
{{custom-html "top"}}
|
|
{{global-notice}}
|
|
</div>
|
|
|
|
<div class="container">
|
|
<section class='user-main'>
|
|
<section {{bind-attr class="collapsedInfo :about profileBackground:has-background:no-background"}}>
|
|
<div class='staff-counters'>
|
|
{{#if number_of_flags_given}}
|
|
<div><span class="helpful-flags">{{number_of_flags_given}}</span> {{i18n user.staff_counters.flags_given}}</div>
|
|
{{/if}}
|
|
{{#if number_of_flagged_posts}}
|
|
<div>
|
|
{{#link-to 'user.flaggedPosts' this}}
|
|
<span class="flagged-posts">{{number_of_flagged_posts}}</span> {{i18n user.staff_counters.flagged_posts}}
|
|
{{/link-to}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if number_of_deleted_posts}}
|
|
<div>
|
|
{{#link-to 'user.deletedPosts' this}}
|
|
<span class="deleted-posts">{{number_of_deleted_posts}}</span> {{i18n user.staff_counters.deleted_posts}}
|
|
{{/link-to}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if number_of_suspensions}}
|
|
<div><span class="suspensions">{{number_of_suspensions}}</span> {{i18n user.staff_counters.suspensions}}</div>
|
|
{{/if}}
|
|
{{#if number_of_warnings}}
|
|
<div><span class="warnings-received">{{number_of_warnings}}</span> {{i18n user.staff_counters.warnings_received}}</div>
|
|
{{/if}}
|
|
</div>
|
|
<div class='profile-image' {{bind-attr style="profileBackground"}}></div>
|
|
<div class='details'>
|
|
<div class='primary'>
|
|
{{bound-avatar model "huge"}}
|
|
<section class='controls'>
|
|
<ul>
|
|
{{#if can_send_private_message_to_user}}
|
|
<li>
|
|
<a class='btn btn-primary right' {{action "composePrivateMessage"}}>
|
|
{{fa-icon "envelope"}}
|
|
{{i18n user.private_message}}
|
|
</a>
|
|
</li>
|
|
{{/if}}
|
|
{{#if viewingSelf}}
|
|
<li><a {{action "logout"}} class='btn btn-danger right'>{{fa-icon "sign-out"}}{{i18n user.log_out}}</a></li>
|
|
{{/if}}
|
|
{{#if currentUser.staff}}
|
|
<li><a {{bind-attr href="adminPath"}} class='btn right'>{{fa-icon "wrench"}}{{i18n admin.user.show_admin_profile}}</a></li>
|
|
{{/if}}
|
|
{{#if can_edit}}
|
|
<li>{{#link-to 'preferences' class="btn right"}}{{fa-icon "cog"}}{{i18n user.preferences}}{{/link-to}}</li>
|
|
{{/if}}
|
|
{{#if canInviteToForum}}
|
|
<li>{{#link-to 'user.invited' class="btn right"}}{{fa-icon "envelope-o"}}{{i18n user.invited.title}}{{/link-to}}</li>
|
|
{{/if}}
|
|
</ul>
|
|
</section>
|
|
|
|
<div class="primary-textual">
|
|
<h1>{{username}} {{{statusIcon}}}</h1>
|
|
<h2>{{name}}</h2>
|
|
<h3>
|
|
{{#if location}}{{fa-icon "map-maker"}}{{location}}{{/if}}
|
|
{{#if websiteName}}
|
|
{{fa-icon "globe"}}
|
|
{{#if linkWebsite}}
|
|
<a {{bind-attr href="website"}} rel="nofollow" target="_blank">{{websiteName}}</a>
|
|
{{else}}
|
|
<span {{bind-attr title="website"}}>{{websiteName}}</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
</h3>
|
|
|
|
<div class='bio'>
|
|
{{#if isSuspended}}
|
|
<div class='suspended'>
|
|
{{fa-icon "ban"}}
|
|
<b>{{i18n user.suspended_notice date="suspendedTillDate"}}</b><br/>
|
|
<b>{{i18n user.suspended_reason}}</b> {{suspend_reason}}
|
|
</div>
|
|
{{/if}}
|
|
{{{bio_cooked}}}
|
|
</div>
|
|
|
|
{{plugin-outlet "user-profile-primary"}}
|
|
|
|
</div>
|
|
</div>
|
|
<div style='clear: both'></div>
|
|
</div>
|
|
|
|
<div class='secondary'>
|
|
<dl>
|
|
{{#if created_at}}
|
|
<dt>{{i18n user.created}}</dt><dd>{{bound-date created_at}}</dd>
|
|
{{/if}}
|
|
{{#if last_posted_at}}
|
|
<dt>{{i18n user.last_posted}}</dt><dd>{{bound-date last_posted_at}}</dd>
|
|
{{/if}}
|
|
{{#if last_seen_at}}
|
|
<dt>{{i18n user.last_seen}}</dt><dd>{{bound-date last_seen_at}}</dd>
|
|
{{/if}}
|
|
{{#if invited_by}}
|
|
<dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'user' invited_by}}{{invited_by.username}}{{/link-to}}</dd>
|
|
{{/if}}
|
|
<dt>{{i18n user.trust_level}}</dt><dd>{{trustLevel.name}}</dd>
|
|
{{#if canCheckEmails}}
|
|
<dt>{{i18n user.email.title}}</dt>
|
|
<dd {{bind-attr title="email"}}>
|
|
{{#if email}}
|
|
{{email}}
|
|
{{else}}
|
|
<button class="btn btn-primary" title="{{i18n admin.users.check_email.title}}" {{action "checkEmail" this}}>{{fa-icon "envelope-o"}} {{i18n admin.users.check_email.text}}</button>
|
|
{{/if}}
|
|
</dd>
|
|
{{/if}}
|
|
{{#if custom_groups}}
|
|
<dt>{{i18n groups.title count=custom_groups.length}}</dt>
|
|
<dd class='groups'>
|
|
{{#each custom_groups}}
|
|
<span>{{#link-to 'group' this class="group-link"}}{{name}}{{/link-to}}</span>
|
|
{{/each}}
|
|
</dd>
|
|
{{/if}}
|
|
{{#if canDeleteUser}}
|
|
<button class="btn btn-danger" {{action "adminDelete"}}>
|
|
<i class="fa fa-exclamation-triangle"></i>
|
|
{{i18n user.admin_delete}}
|
|
</button>
|
|
{{/if}}
|
|
</dl>
|
|
{{plugin-outlet "user-profile-secondary"}}
|
|
</div>
|
|
</section>
|
|
|
|
<section class='user-navigation'>
|
|
<ul class='action-list nav-stacked'>
|
|
{{activity-filter count=statsCountNonPM user=model userActionType=userActionType indexStream=indexStream}}
|
|
{{#each stat in statsExcludingPms}}
|
|
{{activity-filter content=stat user=model userActionType=userActionType indexStream=indexStream}}
|
|
{{/each}}
|
|
{{#if showBadges}}
|
|
{{#link-to 'user.badges' tagName="li"}}
|
|
{{#link-to 'user.badges'}}
|
|
<i class='glyph fa fa-certificate'></i>
|
|
{{i18n badges.title}}
|
|
<span class='count'>({{badge_count}})</span>
|
|
{{/link-to}}
|
|
{{/link-to}}
|
|
{{/if}}
|
|
{{#if canSeeNotificationHistory}}
|
|
{{#link-to 'user.notifications' tagName="li"}}
|
|
{{#link-to 'user.notifications'}}
|
|
<i class='glyph fa fa-comment'></i>
|
|
{{i18n user.notifications}}
|
|
<span class='count'>({{notification_count}})</span>
|
|
{{/link-to}}
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</ul>
|
|
|
|
{{#if canSeePrivateMessages}}
|
|
<h3>{{fa-icon "envelope"}} {{i18n user.private_messages}}</h3>
|
|
<ul class='action-list nav-stacked'>
|
|
<li {{bind-attr class=":noGlyph privateMessagesActive:active"}}>
|
|
{{#link-to 'userPrivateMessages.index' model}}
|
|
{{i18n user.messages.all}}
|
|
{{#if hasPMs}}<span class='count'>({{private_messages_stats.all}})</span>{{/if}}
|
|
{{/link-to}}
|
|
</li>
|
|
<li {{bind-attr class=":noGlyph privateMessagesMineActive:active"}}>
|
|
{{#link-to 'userPrivateMessages.mine' model}}
|
|
{{i18n user.messages.mine}}
|
|
{{#if hasStartedPMs}}<span class='count'>({{private_messages_stats.mine}})</span>{{/if}}
|
|
{{/link-to}}
|
|
</li>
|
|
<li {{bind-attr class=":noGlyph privateMessagesUnreadActive:active"}}>
|
|
{{#link-to 'userPrivateMessages.unread' model}}
|
|
{{i18n user.messages.unread}}
|
|
{{#if hasUnreadPMs}}<span class='badge-notification unread-private-messages'>{{private_messages_stats.unread}}</span>{{/if}}
|
|
{{/link-to}}
|
|
</li>
|
|
</ul>
|
|
{{/if}}
|
|
</section>
|
|
|
|
<section class='user-right'>
|
|
{{outlet}}
|
|
</section>
|
|
|
|
</section>
|
|
</div>
|