This allows users who are privacy conscious to disable the presence features of the forum as well as their public profile.
232 lines
9.6 KiB
Handlebars
232 lines
9.6 KiB
Handlebars
<div class="container {{if viewingSelf 'viewing-self'}}">
|
|
{{#d-section class="user-main"}}
|
|
|
|
<section class="{{if collapsedInfo 'collapsed-info'}} about {{if hasProfileBackground 'has-background' 'no-background'}}" style={{model.profileBackground}}>
|
|
{{#unless collapsedInfo}}
|
|
{{#if showStaffCounters}}
|
|
<div class='staff-counters'>
|
|
{{#if model.number_of_flags_given}}
|
|
<div><span class="helpful-flags">{{model.number_of_flags_given}}</span>{{i18n 'user.staff_counters.flags_given'}}</div>
|
|
{{/if}}
|
|
{{#if model.number_of_flagged_posts}}
|
|
<div>
|
|
{{#link-to 'user.flaggedPosts' model}}
|
|
<span class="flagged-posts">{{model.number_of_flagged_posts}}</span>{{i18n 'user.staff_counters.flagged_posts'}}
|
|
{{/link-to}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if model.number_of_deleted_posts}}
|
|
<div>
|
|
{{#link-to 'user.deletedPosts' model}}
|
|
<span class="deleted-posts">{{model.number_of_deleted_posts}}</span>{{i18n 'user.staff_counters.deleted_posts'}}
|
|
{{/link-to}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if model.number_of_suspensions}}
|
|
<div>
|
|
<a {{action "showSuspensions"}}>
|
|
<span class="suspensions">{{model.number_of_suspensions}}</span>{{i18n 'user.staff_counters.suspensions'}}
|
|
</a>
|
|
</div>
|
|
{{/if}}
|
|
{{#if model.warnings_received_count}}
|
|
<div><span class="warnings-received">{{model.warnings_received_count}}</span>{{i18n 'user.staff_counters.warnings_received'}}</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
{{/unless}}
|
|
|
|
<div class='profile-image'></div>
|
|
<div class='details'>
|
|
<div class='primary'>
|
|
{{user-profile-avatar user=model}}
|
|
<section class='controls'>
|
|
<ul>
|
|
{{#if model.can_send_private_message_to_user}}
|
|
<li>
|
|
<a class='btn btn-primary compose-pm' {{action "composePrivateMessage" model}}>
|
|
{{d-icon "envelope"}}
|
|
{{i18n 'user.private_message'}}
|
|
</a>
|
|
</li>
|
|
{{/if}}
|
|
{{#if currentUser.staff}}
|
|
<li><a href={{model.adminPath}} class="btn">{{d-icon "wrench"}}{{i18n 'admin.user.show_admin_profile'}}</a></li>
|
|
{{/if}}
|
|
{{plugin-outlet name="user-profile-controls"
|
|
connectorTagName="li"
|
|
args=(hash model=model)}}
|
|
|
|
{{#if canExpandProfile}}
|
|
<li>
|
|
{{#if collapsedInfo}}
|
|
<a {{action "expandProfile"}} href class="btn">
|
|
{{d-icon "angle-double-down"}} {{i18n 'user.expand_profile'}}
|
|
</a>
|
|
{{else}}
|
|
<a {{action "collapseProfile"}} href class="btn">
|
|
{{d-icon "angle-double-up"}} {{i18n 'user.collapse_profile'}}
|
|
</a>
|
|
{{/if}}
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</section>
|
|
|
|
<div class="primary-textual">
|
|
<h1 class="{{if nameFirst "full-name" "username"}}">{{if nameFirst model.name (format-username model.username)}} {{user-status model currentUser=currentUser}}</h1>
|
|
<h2 class="{{if nameFirst "username" "full-name"}}">{{#if nameFirst}}{{model.username}}{{else}}{{model.name}}{{/if}}</h2>
|
|
{{#if model.staged}}
|
|
<h2 class="staged">{{i18n 'user.staged'}}</h2>
|
|
{{/if}}
|
|
{{#if model.title}}
|
|
<h3>{{model.title}}</h3>
|
|
{{/if}}
|
|
{{plugin-outlet name="user-post-names" args=(hash model=model)}}
|
|
<h3 class="location-and-website">
|
|
{{#if model.location}}{{d-icon "map-marker"}} {{model.location}}{{/if}}
|
|
{{#if model.website_name}}
|
|
{{d-icon "globe"}}
|
|
{{#if linkWebsite}}
|
|
<a href={{model.website}} rel={{unless removeNoFollow 'nofollow noopener'}} target="_blank">{{model.website_name}}</a>
|
|
{{else}}
|
|
<span title={{model.website}}>{{model.website_name}}</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{plugin-outlet name="user-location-and-website" args=(hash model=model)}}
|
|
</h3>
|
|
|
|
<div class='bio'>
|
|
{{#if model.suspended}}
|
|
<div class='suspended'>
|
|
{{d-icon "ban"}}
|
|
<b>
|
|
{{#if model.suspendedForever}}
|
|
{{i18n 'user.suspended_permanently'}}
|
|
{{else}}
|
|
{{i18n 'user.suspended_notice' date=model.suspendedTillDate}}
|
|
{{/if}}
|
|
</b><br>
|
|
{{#if model.suspend_reason}}
|
|
<b>{{i18n 'user.suspended_reason'}}</b> {{model.suspend_reason}}
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if isNotSuspendedOrIsStaff}}
|
|
{{{model.bio_cooked}}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#if publicUserFields}}
|
|
<div class="public-user-fields">
|
|
{{#each publicUserFields as |uf|}}
|
|
{{#if uf.value}}
|
|
<div class="public-user-field {{uf.field.dasherized_name}}">
|
|
<span class="user-field-name">{{uf.field.name}}</span>:
|
|
<span class="user-field-value">{{uf.value}}</span>
|
|
</div>
|
|
{{/if}}
|
|
{{/each}}
|
|
|
|
{{plugin-outlet name="user-profile-public-fields"
|
|
args=(hash publicUserFields=publicUserFields
|
|
model=model)}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{plugin-outlet name="user-profile-primary" args=(hash model=model)}}
|
|
</div>
|
|
</div>
|
|
<div style='clear: both'></div>
|
|
</div>
|
|
|
|
{{#unless collapsedInfo}}
|
|
<div class='secondary'>
|
|
<dl>
|
|
{{#if model.created_at}}
|
|
<div><dt>{{i18n 'user.created'}}</dt><dd>{{bound-date model.created_at}}</dd></div>
|
|
{{/if}}
|
|
{{#if model.last_posted_at}}
|
|
<div><dt>{{i18n 'user.last_posted'}}</dt><dd>{{bound-date model.last_posted_at}}</dd></div>
|
|
{{/if}}
|
|
{{#if model.last_seen_at}}
|
|
<div><dt>{{i18n 'user.last_seen'}}</dt><dd>{{bound-date model.last_seen_at}}</dd></div>
|
|
{{/if}}
|
|
<div><dt>{{i18n 'views'}}</dt><dd>{{model.profile_view_count}}</dd></div>
|
|
{{#if model.invited_by}}
|
|
<div><dt class="invited-by">{{i18n 'user.invited_by'}}</dt><dd class="invited-by">{{#link-to 'user' model.invited_by}}{{model.invited_by.username}}{{/link-to}}</dd></div>
|
|
{{/if}}
|
|
{{#if model.trust_level}}
|
|
<div><dt class="trust-level">{{i18n 'user.trust_level'}}</dt><dd class="trust-level">{{model.trustLevel.name}}</dd></div>
|
|
{{/if}}
|
|
{{#if canCheckEmails}}
|
|
<div><dt>{{i18n 'user.email.title'}}</dt>
|
|
<dd title={{model.email}}>
|
|
{{#if model.email}}
|
|
{{model.email}}
|
|
{{else}}
|
|
{{d-button action="checkEmail" actionParam=model icon="envelope-o" label="admin.users.check_email.text" class="btn-primary"}}
|
|
{{/if}}
|
|
</dd>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if model.displayGroups}}
|
|
<div><dt class="groups">{{i18n 'groups.title' count=model.displayGroups.length}}</dt>
|
|
<dd class='groups'>
|
|
{{#each model.displayGroups as |group|}}
|
|
<span>{{#link-to 'group' group.name class="group-link"}}{{group.name}}{{/link-to}}</span>
|
|
{{/each}}
|
|
|
|
{{#link-to "groups" (query-params username=model.username)}}
|
|
...
|
|
{{/link-to}}
|
|
</dd>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if canDeleteUser}}
|
|
<div>{{d-button action="adminDelete" icon="exclamation-triangle" label="user.admin_delete" class="btn-danger"}}</div>
|
|
{{/if}}
|
|
</dl>
|
|
{{plugin-outlet name="user-profile-secondary" args=(hash model=model)}}
|
|
</div>
|
|
{{/unless}}
|
|
</section>
|
|
|
|
{{#mobile-nav class='main-nav' desktopClass="nav nav-pills user-nav" currentPath=currentPath}}
|
|
{{#unless model.profile_hidden}}
|
|
<li>{{#link-to 'user.summary'}}{{i18n 'user.summary.title'}}{{/link-to}}</li>
|
|
<li>{{#link-to 'userActivity'}}{{i18n 'user.activity_stream'}}{{/link-to}}</li>
|
|
{{/unless}}
|
|
{{#if showNotificationsTab}}
|
|
<li>
|
|
{{#link-to 'userNotifications'}}
|
|
{{d-icon "comment" class="glyph"}}{{i18n 'user.notifications'}}
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
{{#if showPrivateMessages}}
|
|
<li>{{#link-to 'userPrivateMessages'}}{{d-icon "envelope-o"}}{{i18n 'user.private_messages'}}{{/link-to}}</li>
|
|
{{/if}}
|
|
{{#if canInviteToForum}}
|
|
<li>{{#link-to 'userInvited'}}{{d-icon "user-plus"}}{{i18n 'user.invited.title'}}{{/link-to}}</li>
|
|
{{/if}}
|
|
{{#if showBadges}}
|
|
<li>{{#link-to 'user.badges'}}{{d-icon "certificate"}}{{i18n 'badges.title'}}{{/link-to}}</li>
|
|
{{/if}}
|
|
{{plugin-outlet name="user-main-nav" tagName='' connectorTagName='li' args=(hash model=model)}}
|
|
{{#if model.can_edit}}
|
|
<li>{{#link-to 'preferences'}}{{d-icon "cog"}}{{i18n 'user.preferences'}}{{/link-to}}</li>
|
|
{{/if}}
|
|
{{/mobile-nav}}
|
|
|
|
<div class='user-table'>
|
|
<div class='wrapper'>
|
|
{{outlet}}
|
|
</div>
|
|
</div>
|
|
|
|
{{/d-section}}
|
|
</div>
|