Added reset functions to Audit log
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
This commit is contained in:
parent
4aecc21a45
commit
c82627be60
@ -2,12 +2,12 @@
|
||||
<div class="no-posts">
|
||||
{{svg-jar "activity-placeholder" class="gh-members-placeholder"}}
|
||||
{{#if @filter}}
|
||||
<h4>No actions match the current filter</h4>
|
||||
<LinkTo @route="settings.audit-log" @query={{reset-query-params "audit-log"}} class="gh-btn gh-btn-lg">
|
||||
<span>Show all actions</span>
|
||||
<h4>No events match the current filter</h4>
|
||||
<LinkTo @route="settings.audit-log" @query={{reset-query-params "settings.audit-log"}} class="gh-btn gh-btn-lg">
|
||||
<span>Show all events</span>
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
<h4>No actions yet</h4>
|
||||
<h4>No events yet</h4>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
@ -25,6 +25,11 @@ export const DEFAULT_QUERY_PARAMS = {
|
||||
'members-activity': {
|
||||
excludedEvents: null,
|
||||
member: null
|
||||
},
|
||||
'settings.audit-log': {
|
||||
excludedEvents: null,
|
||||
excludedResources: null,
|
||||
user: null
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<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" data-test-link="audit-log-back">Audit log</LinkTo>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user