Ghost/ghost/admin/app/components/gh-member-details.hbs
Kevin Ansfield 69e7bad5d1 Added member details and hid member column on activity feed when filtered by member
refs https://github.com/TryGhost/Team/issues/1277

- extracted member details display into a `<GhMemberDetails>` component for re-use in the member details and members-activity screens
- added loading of member record from the member id query param and displayed the member details above the table when a member filter is present
- hid the member column in the events table when a member filter is present
  - it's useless/repeated info at that point
2022-01-25 16:40:51 +00:00

48 lines
2.2 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<section class="gh-member-detail-overview" ...attributes>
<div class="gh-main-section-block">
<div class="gh-main-section-content">
<div class="flex items-center">
{{#if (or @member.name @member.email)}}
<GhMemberAvatar
@member={{@member}}
@sizeClass={{if @member.name 'f-subheadline fw4 lh-zero tracked-1' 'f-subheadline fw4 lh-zero tracked-1'}}
@containerClass="w20 h20 mr4 gh-member-detail-avatar"
/>
{{else}}
<div class="flex items-center justify-center br-100 mr4 gh-new-member-avatar">
<span class="gh-member-avatar-label f-subheadline fw4 lh-zero tracked-1">N</span>
</div>
{{/if}}
<div>
<h3>
{{or @member.name @member.email}}
{{#unless (or @member.name @member.email)}}
{{#if @member.isNew}}
<span class="midgrey">New member</span>
{{/if}}
{{/unless}}
</h3>
<p>
{{#if (and @member.name @member.email)}}
<a href="mailto:{{@member.email}}">{{@member.email}}</a>
{{/if}}
</p>
{{#unless @member.isNew}}
<p class="{{if @member.name "nudge-bottom--2"}}">
{{#if @member.geolocation}}
{{#if (and (eq @member.geolocation.country_code "US") @member.geolocation.region)}}
{{@member.geolocation.region}}, US
{{else}}
{{or @member.geolocation.country "Unknown location"}}
{{/if}}
{{else}}
Unknown location
{{/if}}
Created on {{moment-format @member.createdAtUTC "D MMM YYYY"}}
</p>
{{/unless}}
</div>
</div>
</div>
</div>
</section>