38 lines
2.4 KiB
Handlebars
38 lines
2.4 KiB
Handlebars
|
{{#let (members-event-fetcher filter=(concat "data.member_id:" @member.id) pageSize=5) as |eventsFetcher|}}
|
||
|
{{#if eventsFetcher.data}}<h4 class="gh-main-section-header small bn">Member activity</h4>{{/if}}
|
||
|
<div class="gh-main-section-content bordered {{if eventsFetcher.data "" "mt8"}}">
|
||
|
<div class="gh-member-feed" ...attributes>
|
||
|
<div class="flex-auto flex flex-column items-stretch {{if eventsFetcher.data "justify-between" "h-100 justify-center"}}">
|
||
|
<div>
|
||
|
{{#if eventsFetcher.isLoading}}
|
||
|
<div class="relative h17"><GhLoadingSpinner class="h30" /></div>
|
||
|
{{else if eventsFetcher.data}}
|
||
|
{{#each eventsFetcher.data as |rawEvent|}}
|
||
|
{{#let (parse-member-event rawEvent) as |event|}}
|
||
|
<div class="gh-member-feed-row">
|
||
|
<span class="gh-member-feed-activity midgrey" data-tooltip={{capitalize (concat event.action " " event.object)}}>{{svg-jar event.icon class=event.iconClass}}</span>
|
||
|
{{#if event.email}}
|
||
|
<GhEmailPreviewLink @data={{event.email}} class="gh-member-feed-title" />
|
||
|
{{else}}
|
||
|
<span class="gh-member-feed-title">{{event.action}} {{event.object}}</span>
|
||
|
{{/if}}
|
||
|
<span class="gh-member-feed-date">{{moment-format event.timestamp "D MMM YYYY"}}</span>
|
||
|
</div>
|
||
|
{{/let}}
|
||
|
{{/each}}
|
||
|
|
||
|
<LinkTo class="gh-btn gh-member-btn-expandfeed" @route="members-activity" @query={{hash excludedEvents=null member=@member.id}}><span>View all activity</span></LinkTo>
|
||
|
{{else}}
|
||
|
<div class="gh-members-no-data gh-members-no-list">
|
||
|
<div class="lightgrey">{{svg-jar "no-data-list"}}</div>
|
||
|
<h4>Member activity</h4>
|
||
|
<p>
|
||
|
All events related to this member will be shown here.
|
||
|
</p>
|
||
|
</div>
|
||
|
{{/if}}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{{/let}}
|