mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:55:54 +08:00
UX: do not show filter controls for PM admin reports
This commit is contained in:
parent
cd4ffccb4a
commit
89a7a90208
|
@ -26,6 +26,11 @@ export default Ember.Controller.extend({
|
|||
return arr.concat(this.site.groups.map((i) => {return {name: i['name'], value: i['id']};}));
|
||||
},
|
||||
|
||||
@computed('model.type')
|
||||
showFilterOptions(modelType) {
|
||||
return !modelType.match(/_private_messages$/);
|
||||
},
|
||||
|
||||
@computed('model.type')
|
||||
showGroupOptions(modelType) {
|
||||
return modelType === "visits" || modelType === "signups" || modelType === "profile_views";
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<h3>{{model.title}}</h3>
|
||||
|
||||
<div class="admin-reports-filter">
|
||||
{{i18n 'admin.dashboard.reports.start_date'}} {{date-picker-past value=startDate}}
|
||||
{{i18n 'admin.dashboard.reports.end_date'}} {{date-picker-past value=endDate}}
|
||||
{{combo-box valueAttribute="value" content=categoryOptions value=categoryId}}
|
||||
{{#if showGroupOptions}}
|
||||
{{combo-box valueAttribute="value" content=groupOptions value=groupId}}
|
||||
{{#if showFilterOptions}}
|
||||
{{i18n 'admin.dashboard.reports.start_date'}} {{date-picker-past value=startDate}}
|
||||
{{i18n 'admin.dashboard.reports.end_date'}} {{date-picker-past value=endDate}}
|
||||
{{combo-box valueAttribute="value" content=categoryOptions value=categoryId}}
|
||||
{{#if showGroupOptions}}
|
||||
{{combo-box valueAttribute="value" content=groupOptions value=groupId}}
|
||||
{{/if}}
|
||||
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
|
||||
{{/if}}
|
||||
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
|
||||
{{d-button action="exportCsv" label="admin.export_csv.button_text" icon="download"}}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user