forked from fossasia/open-event-frontend
/
side-bar.hbs
125 lines (125 loc) · 4.53 KB
/
side-bar.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<div class="map item">
{{#g-map lat=37.7833 lng=-122.4167 zoom=2 address=location class='google-maps' as |context|}}
{{g-map-address-marker context address=location onLocationChange=(action 'onLocationChangeHandler')}}
{{/g-map}}
</div>
<div class="item">
<div class="ui input">
{{widgets/forms/places-autocomplete
name='location'
value=location
type='text'
placeholder=(t 'Enter Location')}}
</div>
</div>
{{#if showFiltersOnMobile}}
<div class="item">
{{#ui-accordion}}
<span class="title">
<i class="right floated dropdown icon"></i>
{{t 'Categories'}}
</span>
<div class="content menu">
{{#each model.eventTopics as |Category| }}
<a href="#"
class="link item {{if (eq category Category.name) 'active'}}" {{action 'selectCategory' Category.name}}>
<i class="caret {{if (eq category Category.name) 'down' 'right'}} icon"></i>
{{Category.name}}
</a>
{{#if (eq category Category.name)}}
{{#each Category.subTopics as |subCategory|}}
<a href="#"
class="link inner item {{if (eq sub_category subCategory.slug) 'active'}}"
{{action 'selectCategory' Category.name subCategory.slug}}>
{{subCategory.name}}
</a>
{{/each}}
{{/if}}
{{/each}}
</div>
{{/ui-accordion}}
</div>
<div class="item">
{{#ui-accordion}}
<span class="title">
<i class="dropdown icon"></i>
{{t 'Event Type' }}
</span>
<div class="content menu">
{{#each model.eventTypes as |eventType|}}
<a href="#"
class="link item {{if (eq event_type eventType.name) 'active'}}"
{{action 'selectEventType' eventType.name}}>
{{eventType.name}}
</a>
{{/each}}
</div>
{{/ui-accordion}}
</div>
<div class="item">
{{#ui-accordion}}
<span class="title">
<i class="dropdown icon"></i>
{{t 'Date'}}
</span>
<div class="content menu">
{{#each dateRanges as |dateRange|}}
<a href="#" class="link item {{if (eq dateType dateRange.key) 'active'}}" {{action 'selectDateFilter'
dateRange.key}}>
{{dateRange.name}}
{{#if (and (eq dateRange.key 'custom_dates') (eq dateType 'custom_dates'))}}
<div class="explore sub menu">
<div class="ui form">
<div class="grouped fields">
<div class="item field">
<label class="required" for="start_date">{{t 'Starts'}}</label>
{{widgets/forms/date-picker type='text'
value=customStartDate
rangePosition='start'
onChange=(action 'dateValidate')
}}
</div>
<div class="item field">
<label class="required" for="end_date">{{t 'Ends'}}</label>
{{widgets/forms/date-picker type='text'
value=customEndDate
rangePosition='end'
onChange=(action 'onDateChange')
}}
</div>
</div>
</div>
</div>
{{/if}}
</a>
{{/each}}
</div>
{{/ui-accordion}}
</div>
<div class="item">
{{#ui-accordion}}
<span class="title">
<i class="dropdown icon"></i>
{{t 'Ticket Type' }}
</span>
<div class="content menu">
<a href="#"
class="link item {{if (eq ticket_type 'free') 'active'}}"
{{action 'selectTicketType' 'free'}}>
{{t 'Free'}}
</a>
<a href="#"
class="link item {{if (eq ticket_type 'paid') 'active'}}"
{{action 'selectTicketType' 'paid'}}>
{{t 'Paid'}}
</a>
</div>
{{/ui-accordion}}
</div>
{{/if}}
<div class="item">
<button class="ui red button {{if hideClearFilters 'disabled'}}" {{action 'clearFilters'}}>{{t 'Clear Filters'}}</button>
{{#if device.isMobile}}
<button class="ui blue button" {{action 'toggleFilters'}}>{{if showFiltersOnMobile 'Hide Filters' 'Show Filters'}}</button>
{{/if}}
</div>