FACET_DATA_FIELDS = ['components', 'projects', 'users', 'rules', 'actionPlans', 'languages']
FACETS_FROM_SERVER = ['severities', 'statuses', 'resolutions', 'actionPlans', 'projectUuids', 'rules',
'assignees', 'reporters', 'componentUuids', 'languages']
+ TRANSFORM = {
+ 'resolved': 'resolutions'
+ 'assigned': 'assignees'
+ 'createdAt': 'creationDate'
+ 'createdBefore': 'creationDate'
+ 'createdAfter': 'creationDate'
+ }
class extends Marionette.Controller
facets = @options.app.state.get 'facets'
criteria = Object.keys @options.app.state.get 'query'
facets = facets.concat criteria
+ facets = facets.map (facet) ->
+ if TRANSFORM[facet]? then TRANSFORM[facet] else facet
facets.filter (facet) -> ALL_FACETS.indexOf(facet) != -1
{{> '_issues-facet-header'}}
+<input type="hidden" name="createdAt">
+
+{{#if createdAt}}
+ <div class="issues-facet-container">
+ {{dt createdAt}}
+ </div>
+{{/if}}
+
<div class="issues-facet-container justify">
<input type="text" class="issues-facet-input" name="createdAfter" placeholder="From">
to
<input type="text" class="issues-facet-input" name="createdBefore" placeholder="To">
</div>
-
-<input type="hidden" name="createdAt">