Ghost/ghost/admin/app/components/dashboard/latest-member-activity.hbs

49 lines
2.5 KiB
Handlebars
Raw Normal View History

{{#if this.shouldDisplay}}
<div class="gh-dashboard-box grey activity-feed" data-test-dashboard-member-activity>
<h4 class="gh-dashboard-header">Activity feed</h4>
<div class="content">
{{#if this.eventsLoading}}
Loading...
{{else}}
{{#if this.eventsError}}
<p class="error">
There was an error loading events
<code>{{this.eventsError.message}}</code>
</p>
{{else}}
<GhMemberActivityEventParser @events={{this.eventsData}} as |parsedEvents|>
<div class="gh-event-timeline">
{{#if parsedEvents}}
<ul class="gh-dashboard-activity-feed">
{{#each parsedEvents as |event|}}
<li data-test-dashboard-member-activity-item>
<LinkTo class="member-details" @route="member" @model="{{event.member_id}}">
<div class="activity">
<div>
<span class="member">{{event.subject}}</span> {{event.action}} {{event.object}} <span class="highlight">{{event.info}}</span>
</div>
</div>
</LinkTo>
<span class="time">{{event.timestamp}}</span>
</li>
{{/each}}
</ul>
{{else}}
<div class="gh-no-data-list" data-test-no-member-activities>
{{svg-jar "no-data-list"}}
<span>No member activity available.</span>
</div>
{{/if}}
</div>
</GhMemberActivityEventParser>
{{#if (feature "membersActivityFeed")}}
<div class="gh-dashboard-top-members-footer">
<LinkTo @route="members-activity">See all activity {{svg-jar "arrow-right"}}</LinkTo>
</div>
{{/if}}
{{/if}}
{{/if}}
</div>
</div>
{{/if}}