diff --git a/app/components/explore/side-bar.js b/app/components/explore/side-bar.js index d037ef61e2d..1d35f45eb50 100644 --- a/app/components/explore/side-bar.js +++ b/app/components/explore/side-bar.js @@ -18,9 +18,9 @@ export default class SideBar extends Component { isMapVisible = true; eventLocationType = null; - @computed('category', 'sub_category', 'event_type', 'startDate', 'endDate', 'location', 'ticket_type', 'cfs', 'event_name', 'is_online') + @computed('category', 'sub_category', 'event_type', 'startDate', 'endDate', 'location', 'ticket_type', 'cfs', 'event_name', 'is_online', 'has_logo', 'has_image') get hideClearFilters() { - return !(this.category || this.sub_category || this.event_type || this.startDate || this.endDate || this.location || this.ticket_type || this.cfs || this.event_name || this.is_online); + return !(this.category || this.sub_category || this.event_type || this.startDate || this.endDate || this.location || this.ticket_type || this.cfs || this.event_name || this.is_online || this.has_logo || this.has_image); } @computed('category', 'sub_category') @@ -39,6 +39,16 @@ export default class SideBar extends Component { return (!this.device.isMobile || this.showFilters); } + @action + selectLogos(val) { + this.set('has_logo', this.has_logo === val ? null : val); + } + + @action + selectImages(val) { + this.set('has_image', this.has_image === val ? null : val); + } + @action onLocationChangeHandler(lat, lng) { this.setProperties({ @@ -172,6 +182,8 @@ export default class SideBar extends Component { cfs : null, event_name : null, is_online : null, + has_logo : null, + has_image : null, eventLocationType : null }); } diff --git a/app/controllers/explore.js b/app/controllers/explore.js index b522bdbdc6b..11364df3c29 100644 --- a/app/controllers/explore.js +++ b/app/controllers/explore.js @@ -4,9 +4,11 @@ import Controller from '@ember/controller'; @classic export default class ExploreController extends Controller { - queryParams = ['category', 'sub_category', 'event_type', 'start_date', 'end_date', 'location', 'ticket_type', 'cfs', 'event_name', 'is_online']; + queryParams = ['category', 'sub_category', 'event_type', 'start_date', 'end_date', 'location', 'ticket_type', 'cfs', 'event_name', 'is_online', 'has_logo', 'has_image']; event_name = null; is_online = null; + has_logo = null; + has_image = null; category = null; sub_category = null; event_type = null; @@ -30,6 +32,12 @@ export default class ExploreController extends Controller { if (filterType === 'is_online') { this.set('is_online', null); } + if (filterType === 'has_logo') { + this.set('has_logo', null); + } + if (filterType === 'has_image') { + this.set('has_image', null); + } if (filterType === 'start_date') { this.set('startDate', null); } diff --git a/app/routes/explore.js b/app/routes/explore.js index 6600fa5fcd1..963eccb20f1 100644 --- a/app/routes/explore.js +++ b/app/routes/explore.js @@ -79,6 +79,20 @@ export default class ExploreRoute extends Route { val : params.is_online }); } + if (params.has_image) { + filterOptions.push({ + name : 'original-image-url', + op : 'ne', + val : null + }); + } + if (params.has_logo) { + filterOptions.push({ + name : 'logo-url', + op : 'ne', + val : null + }); + } if (params.location) { filterOptions.push({ name : 'location_name', diff --git a/app/templates/components/explore/side-bar.hbs b/app/templates/components/explore/side-bar.hbs index b8643a5ffc2..c6246f441eb 100644 --- a/app/templates/components/explore/side-bar.hbs +++ b/app/templates/components/explore/side-bar.hbs @@ -194,34 +194,61 @@ -{{/if}} -
- - - - {{t 'Event Call For Speakers' }} - -