mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
c82627be60
refs. https://github.com/TryGhost/Toolbox/issues/356 - The page title in Audit log didn't reset the filters and the search value - Also, the button on the empty list screen didn't work
45 lines
1.9 KiB
Handlebars
45 lines
1.9 KiB
Handlebars
<section class="gh-canvas gh-members-activity">
|
|
<GhCanvasHeader class="gh-canvas-header">
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
<LinkTo @route="settings.audit-log" @query={{reset-query-params "settings.audit-log"}} data-test-link="audit-log-back">Audit log</LinkTo>
|
|
{{#if this.userRecord}}
|
|
<span>{{svg-jar "arrow-right"}}</span>
|
|
<span class="truncate">{{or this.userRecord.name this.userRecord.email}}</span>
|
|
{{/if}}
|
|
</h2>
|
|
<div class="view-actions">
|
|
<Settings::AuditLog::EventFilter
|
|
@excludedEvents={{this.excludedEvents}}
|
|
@excludedResources={{this.excludedResources}}
|
|
@onChange={{this.changeExcludedItems}} />
|
|
|
|
<Settings::AuditLog::Search
|
|
@selected={{this.userRecord}}
|
|
@onChange={{this.changeUser}} />
|
|
</div>
|
|
</GhCanvasHeader>
|
|
<div class="view-container">
|
|
{{#let (audit-log-event-fetcher filter=(audit-log-event-filter excludedEvents=this.fullExcludedEvents excludedResources=this.fullExcludedResources user=this.user) pageSize=50) as |eventsFetcher|}}
|
|
{{#if eventsFetcher.data}}
|
|
<div class="gh-list-scrolling">
|
|
<Settings::AuditLog::Table @events={{eventsFetcher.data}} />
|
|
|
|
{{#if (not (or eventsFetcher.isLoading eventsFetcher.hasReachedEnd))}}
|
|
<GhScrollTrigger @enter={{eventsFetcher.loadNextPage}} @triggerOffset={{250}} />
|
|
{{/if}}
|
|
</div>
|
|
{{else}}
|
|
{{#unless eventsFetcher.isLoading}}
|
|
<Settings::AuditLog::NoEvents @filter={{or this.user this.excludedResources}} />
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
<div class="no-posts-box"><GhLoadingSpinner /></div>
|
|
{{/if}}
|
|
{{/let}}
|
|
</div>
|
|
</section>
|
|
|
|
{{outlet}}
|