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']};}));
|
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')
|
@computed('model.type')
|
||||||
showGroupOptions(modelType) {
|
showGroupOptions(modelType) {
|
||||||
return modelType === "visits" || modelType === "signups" || modelType === "profile_views";
|
return modelType === "visits" || modelType === "signups" || modelType === "profile_views";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<h3>{{model.title}}</h3>
|
<h3>{{model.title}}</h3>
|
||||||
|
|
||||||
<div class="admin-reports-filter">
|
<div class="admin-reports-filter">
|
||||||
|
{{#if showFilterOptions}}
|
||||||
{{i18n 'admin.dashboard.reports.start_date'}} {{date-picker-past value=startDate}}
|
{{i18n 'admin.dashboard.reports.start_date'}} {{date-picker-past value=startDate}}
|
||||||
{{i18n 'admin.dashboard.reports.end_date'}} {{date-picker-past value=endDate}}
|
{{i18n 'admin.dashboard.reports.end_date'}} {{date-picker-past value=endDate}}
|
||||||
{{combo-box valueAttribute="value" content=categoryOptions value=categoryId}}
|
{{combo-box valueAttribute="value" content=categoryOptions value=categoryId}}
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
{{combo-box valueAttribute="value" content=groupOptions value=groupId}}
|
{{combo-box valueAttribute="value" content=groupOptions value=groupId}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
|
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
|
||||||
|
{{/if}}
|
||||||
{{d-button action="exportCsv" label="admin.export_csv.button_text" icon="download"}}
|
{{d-button action="exportCsv" label="admin.export_csv.button_text" icon="download"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue