discourse/app/assets/javascripts/admin/addon/templates/dashboard_moderation.hbs
Arpit Jalan b39f823fd3
FEATURE: add custom date range filter for admin dashboard reports (#23702)
* FEATURE: add custom date range filter for admin dashboard reports

* Improvements per David's review
2023-09-29 14:44:17 +05:30

69 lines
1.7 KiB
Handlebars

<div class="sections">
<span>
<PluginOutlet
@name="admin-dashboard-moderation-top"
@connectorTagName="div"
/>
</span>
{{#if this.isModeratorsActivityVisible}}
<div class="moderators-activity section">
<div class="section-title">
<h2>
<a href={{get-url "/admin/reports/moderators_activity"}}>
{{i18n "admin.dashboard.moderators_activity"}}
</a>
</h2>
<span>
<PeriodChooser
@period={{this.period}}
@action={{action "changePeriod"}}
@content={{this.availablePeriods}}
@fullDay={{false}}
/>
<DButton
@icon="cog"
class="custom-date-range-button"
@action={{this.openCustomDateRangeModal}}
@title="admin.dashboard.custom_date_range"
/>
</span>
</div>
<div class="section-body">
<AdminReport
@filters={{this.filters}}
@showHeader={{false}}
@dataSourceName="moderators_activity"
/>
</div>
</div>
{{/if}}
<div class="main-section">
<AdminReport
@dataSourceName="flags_status"
@reportOptions={{this.flagsStatusOptions}}
@filters={{this.lastWeekfilters}}
/>
<AdminReport
@dataSourceName="post_edits"
@filters={{this.lastWeekfilters}}
/>
<AdminReport
@dataSourceName="user_flagging_ratio"
@filters={{this.lastWeekfilters}}
@reportOptions={{this.userFlaggingRatioOptions}}
/>
<span>
<PluginOutlet
@name="admin-dashboard-moderation-bottom"
@connectorTagName="div"
@outletArgs={{hash filters=this.lastWeekfilters}}
/>
</span>
</div>
</div>