mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: initial implementation of generic filters for reports
This commit is contained in:
@@ -149,38 +149,17 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if showCategoryOptions}}
|
||||
{{#each model.available_filters as |filter|}}
|
||||
<div class="control">
|
||||
<div class="input">
|
||||
{{search-advanced-category-chooser
|
||||
filterable=true
|
||||
value=category
|
||||
castInteger=true}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<span class="label">
|
||||
{{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}}
|
||||
</span>
|
||||
|
||||
{{#if showGroupOptions}}
|
||||
<div class="control">
|
||||
<div class="input">
|
||||
{{combo-box
|
||||
castInteger=true
|
||||
filterable=true
|
||||
valueAttribute="value"
|
||||
content=groupOptions
|
||||
value=groupId}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#each filterOptions as |filterOption|}}
|
||||
<div class="control">
|
||||
<div class="input">
|
||||
{{combo-box content=filterOption.choices
|
||||
filterable=true
|
||||
allowAny=true
|
||||
value=filterOption.selected
|
||||
onSelect=(action "filter" filterOption.id)}}
|
||||
{{component
|
||||
(concat "report-filters/" filter.id)
|
||||
filter=filter
|
||||
applyFilter=(action "applyFilter")}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
Reference in New Issue
Block a user