2d5c9ff5d7
refs https://github.com/TryGhost/Team/issues/1731 - Includes the post title and url in the activity feed - For now only implemented on the member page (not yet in remaining 2 activity feeds) - No styling added
63 lines
3.7 KiB
Handlebars
63 lines
3.7 KiB
Handlebars
<h4 class="gh-main-section-header small bn">Activity</h4>
|
|
{{#if @member.isNew}}
|
|
<div class="gh-main-section-content grey">
|
|
<div class="gh-member-feed gh-member-feed-no-data">
|
|
<Member::ActivityFeedEmpty />
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
{{#let (members-event-fetcher filter=(members-event-filter member=@member.id) pageSize=5) as |eventsFetcher|}}
|
|
<div class="gh-main-section-content grey {{if eventsFetcher.data "" "mt8"}}">
|
|
<div class="gh-member-feed {{if eventsFetcher.data "" "gh-member-feed-no-data"}}" ...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 eventsFetcher.hasMultipleNewsletters) as |event|}}
|
|
<div class="gh-member-feed-row">
|
|
<div class="gh-member-feed-container">
|
|
<div class="gh-member-feed-icon">
|
|
{{svg-jar event.icon class=event.iconClass}}
|
|
</div>
|
|
<div class="gh-member-feed-detail">
|
|
<div class="gh-member-feed-event">
|
|
<div>
|
|
<span class="gh-members-activity-description">
|
|
{{capitalize-first-letter event.action}}
|
|
{{event.object}}
|
|
</span>
|
|
{{#if event.email}}
|
|
"<GhEmailPreviewLink @data={{event.email}} />"
|
|
{{/if}}
|
|
{{event.info}}
|
|
</div>
|
|
{{#if event.subtitle}}
|
|
<a class="ghost-memebrs-activity-subtitle" href="{{event.url}}">
|
|
{{event.subtitle}}
|
|
</a>
|
|
{{/if}}
|
|
</div>
|
|
<div class="gh-member-feed-time">
|
|
{{moment-from-now event.timestamp}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/let}}
|
|
{{/each}}
|
|
|
|
<div class="gh-member-feed-footer">
|
|
<LinkTo @route="members-activity" @query={{hash excludedEvents=null member=@member.id}}>See all activity →</LinkTo>
|
|
</div>
|
|
{{else}}
|
|
<Member::ActivityFeedEmpty />
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/let}}
|
|
{{/if}}
|