discourse/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs

90 lines
3.9 KiB
Handlebars
Raw Normal View History

2013-08-10 04:58:57 +08:00
<div class="staff-action-logs-controls">
{{#if filtersExists}}
<div class='staff-action-logs-filters'>
<a {{action "clearAllFilters"}} class="clear-filters filter">
<span class="label">{{i18n 'admin.logs.staff_actions.clear_filters'}}</span>
2013-08-10 04:58:57 +08:00
</a>
{{#if actionFilter}}
<a {{action "clearFilter" "actionFilter"}} class="filter">
<span class="label">{{i18n 'admin.logs.action'}}</span>: {{actionFilter}}
{{d-icon "times-circle"}}
</a>
{{/if}}
{{#if filters.acting_user}}
<a {{action "clearFilter" "acting_user"}} class="filter">
<span class="label">{{i18n 'admin.logs.staff_actions.staff_user'}}</span>: {{filters.acting_user}}
{{d-icon "times-circle"}}
</a>
{{/if}}
{{#if filters.target_user}}
<a {{action "clearFilter" "target_user"}} class="filter">
<span class="label">{{i18n 'admin.logs.staff_actions.target_user'}}</span>: {{filters.target_user}}
{{d-icon "times-circle"}}
</a>
{{/if}}
{{#if filters.subject}}
<a {{action "clearFilter" "subject"}} class="filter">
<span class="label">{{i18n 'admin.logs.staff_actions.subject'}}</span>: {{filters.subject}}
{{d-icon "times-circle"}}
</a>
{{/if}}
</div>
{{else}}
2017-10-20 03:51:08 +08:00
{{i18n "admin.logs.staff_actions.filter"}} {{combo-box content=userHistoryActions value=filterActionId none="admin.logs.staff_actions.all"}}
2013-08-10 04:58:57 +08:00
{{/if}}
2014-12-07 12:15:22 +08:00
<div class="pull-right">
{{d-button action="exportStaffActionLogs" label="admin.export_csv.button_text" icon="download"}}
</div>
</div>
<div class="clearfix"></div>
<div class='table staff-actions'>
<div class="heading-container">
<div class="col heading first staff_user">{{i18n 'admin.logs.staff_actions.staff_user'}}</div>
<div class="col heading action">{{i18n 'admin.logs.action'}}</div>
<div class="col heading subject">{{i18n 'admin.logs.staff_actions.subject'}}</div>
<div class="col heading created_at">{{i18n 'admin.logs.staff_actions.when'}}</div>
<div class="col heading details">{{i18n 'admin.logs.staff_actions.details'}}</div>
<div class="col heading context">{{i18n 'admin.logs.staff_actions.context'}}</div>
<div class="clearfix"></div>
</div>
2015-04-29 05:05:06 +08:00
{{#conditional-loading-spinner condition=loading}}
{{#each model as |item|}}
<div class='admin-list-item'>
<div class="col value first staff_user">
{{#link-to 'adminUser' item.acting_user}}{{avatar item.acting_user imageSize="tiny"}}{{/link-to}}
<a {{action "filterByStaffUser" item.acting_user}} class="btn btn-small">{{item.acting_user.username}}</a>
</div>
<div class="col value action">
<a {{action "filterByAction" item}} class="btn btn-small">{{item.actionName}}</a>
</div>
<div class="col value subject">
{{#if item.target_user}}
{{#link-to 'adminUser' item.target_user}}{{avatar item.target_user imageSize="tiny"}}{{/link-to}}
<a {{action "filterByTargetUser" item.target_user}} class="btn btn-small">{{item.target_user.username}}</a>
{{/if}}
{{#if item.subject}}
<a {{action "filterBySubject" item.subject}} title={{item.subject}} class="btn btn-small">{{item.subject}}</a>
{{/if}}
</div>
<div class="col value created_at">{{age-with-tooltip item.created_at}}</div>
<div class="col value details">
{{{item.formattedDetails}}}
{{#if item.useCustomModalForDetails}}
<a {{action "showCustomDetailsModal" item}}>{{i18n 'admin.logs.staff_actions.show'}}</a>
{{/if}}
{{#if item.useModalForDetails}}
<a {{action "showDetailsModal" item}}>{{i18n 'admin.logs.staff_actions.show'}}</a>
{{/if}}
</div>
<div class="col value context">{{item.context}}</div>
<div class="clearfix"></div>
</div>
{{else}}
{{i18n 'search.no_results'}}
{{/each}}
2015-04-29 05:05:06 +08:00
{{/conditional-loading-spinner}}
</div>