This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from QwantResearch/panel-no-results
QMAPS-806 - Implemented the 'no results' panel
- Loading branch information
Showing
3 changed files
with
140 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,101 @@ | ||
{{? this.pois && this.pois.length }} | ||
{{? this.pois && this.active }} | ||
|
||
{{? this.pois.length }} | ||
<div class="category__panel"> | ||
<div class="category__panel__head"> | ||
<span class="category__panel__logo_pj"></span> | ||
<span class="category__panel__title">{{= _('PAGES JAUNES', 'categories') }}</span> | ||
<span class="category__panel__close icon-x" {{= click(this.closeAction) }}></span> | ||
<span class="category__panel__partnership">{{= _('Partnership', 'categories') }}</span> | ||
<span class="category__panel__partnership_icon">i</span> | ||
</div> | ||
<div class="category__panel__scroll"> | ||
{{~ this.pois:poi:i }} | ||
|
||
<div class="category__panel{{= this.active ? '' : ' category__panel--hidden' }}"> | ||
<div class="category__panel__head"> | ||
<span class="category__panel__logo_pj"></span> | ||
<span class="category__panel__title">{{= _('PAGES JAUNES', 'categories') }}</span> | ||
<span class="category__panel__close icon-x" {{= click(this.closeAction) }}></span> | ||
<span class="category__panel__partnership">{{= _('Partnership', 'categories') }}</span> | ||
<span class="category__panel__partnership_icon">i</span> | ||
</div> | ||
<div class="category__panel__scroll"> | ||
{{~ this.pois:poi:i }} | ||
{{ | ||
let phoneBlock = poi.blocks.find((block) => block.type === 'phone'); | ||
let phoneNumber = null; | ||
if(phoneBlock) { | ||
phoneNumber = phoneBlock.international_format; | ||
} | ||
|
||
{{ | ||
let phoneBlock = poi.blocks.find((block) => block.type === 'phone'); | ||
let phoneNumber = null; | ||
if(phoneBlock) { | ||
phoneNumber = phoneBlock.international_format; | ||
} | ||
let imagesBlock = poi.blocks.find((block) => block.type === 'images'); | ||
let image = null; | ||
if(imagesBlock) { | ||
image = imagesBlock.images[0].url; | ||
} | ||
|
||
let imagesBlock = poi.blocks.find((block) => block.type === 'images'); | ||
let image = null; | ||
if(imagesBlock) { | ||
image = imagesBlock.images[0].url; | ||
} | ||
let ico = IconManager.get(poi); | ||
|
||
let ico = IconManager.get(poi); | ||
}} | ||
|
||
}} | ||
<div class="category__panel__item" {{= click(this.selectPoi, this, poi) }} {{= mouseover(this.highlightPoiMarker, this, poi) }} {{= mouseout(this.unhighlightPoiMarker, this, poi) }}> | ||
<div class="category__panel__item_inner"> | ||
|
||
<div class="category__panel__item" {{= click(this.selectPoi, this, poi) }} {{= mouseover(this.highlightPoiMarker, this, poi) }} {{= mouseout(this.unhighlightPoiMarker, this, poi) }}> | ||
<div class="category__panel__item_inner"> | ||
<div class="category__panel__image" {{? image}}style="background-image:url('{{= image}}')"{{?}}> | ||
|
||
<div class="category__panel__image" {{? image}}style="background-image:url('{{= image}}')"{{?}}> | ||
{{? !image && ico }} | ||
<div class="poi_panel__title__symbol icon icon-{{= ico.iconClass }}" style="color:{{= ico.color ? ico.color : '#444648' }}"></div> | ||
{{?}} | ||
|
||
{{? !image && ico }} | ||
<div class="poi_panel__title__symbol icon icon-{{= ico.iconClass }}" style="color:{{= ico.color ? ico.color : '#444648' }}"></div> | ||
{{?}} | ||
</div> | ||
|
||
</div> | ||
<h3 class="category__panel__name"> | ||
{{= poi.getInputValue() }} | ||
</h3> | ||
|
||
<h3 class="category__panel__name"> | ||
{{= poi.getInputValue() }} | ||
</h3> | ||
|
||
{{? poi.subClassName }} | ||
<p class="category__panel__type"> | ||
{{= this.poiSubClass(poi.subClassName) }} | ||
</p> | ||
{{?}} | ||
|
||
{{? poi.address && poi.address.label }} | ||
<p class="category__panel__address"> | ||
{{= this.htmlEncode(poi.address.label) }} | ||
</p> | ||
{{?}} | ||
|
||
<!-- <div class="category__panel__note"> | ||
<span class="icon-icon_star-filled"></span> | ||
<span class="icon-icon_star"></span> | ||
<span class="icon-icon_star"></span> | ||
<span class="icon-icon_star"></span> | ||
<span class="icon-icon_star"></span> | ||
??? | ||
{{= _('reviews', 'categories') }} | ||
</div--> | ||
|
||
{{= this.minimalHourPanel.set(poi).render() }} | ||
|
||
{{? phoneNumber }} | ||
|
||
<div class="category__panel__phone" {{= click(this.showPhoneNumber, this, {poi, i}) }}> | ||
<span class="icon-icon_phone"></span> | ||
<span id="category__panel__phone_hidden_{{= i}}">{{= _('See the phone number', 'categories') }}</span> | ||
<span id="category__panel__phone_revealed_{{= i}}" style="display: none">{{= phoneNumber }}</span> | ||
</div> | ||
{{? poi.subClassName }} | ||
<p class="category__panel__type"> | ||
{{= this.poiSubClass(poi.subClassName) }} | ||
</p> | ||
{{?}} | ||
|
||
{{?}} | ||
{{? poi.address && poi.address.label }} | ||
<p class="category__panel__address"> | ||
{{= this.htmlEncode(poi.address.label) }} | ||
</p> | ||
{{?}} | ||
|
||
</div> | ||
</div> | ||
{{~}} | ||
</div> | ||
</div> | ||
<!-- <div class="category__panel__note"> | ||
<span class="icon-icon_star-filled"></span> | ||
<span class="icon-icon_star"></span> | ||
<span class="icon-icon_star"></span> | ||
<span class="icon-icon_star"></span> | ||
<span class="icon-icon_star"></span> | ||
??? | ||
{{= _('reviews', 'categories') }} | ||
</div--> | ||
|
||
{{= this.minimalHourPanel.set(poi).render() }} | ||
|
||
{{? phoneNumber }} | ||
|
||
<div class="category__panel__phone" {{= click(this.showPhoneNumber, this, {poi, i}) }}> | ||
<span class="icon-icon_phone"></span> | ||
<span id="category__panel__phone_hidden_{{= i}}">{{= _('See the phone number', 'categories') }}</span> | ||
<span id="category__panel__phone_revealed_{{= i}}" style="display: none">{{= phoneNumber }}</span> | ||
</div> | ||
|
||
{{?}} | ||
{{?}} | ||
|
||
</div> | ||
</div> | ||
{{~}} | ||
</div> | ||
</div> | ||
|
||
{{?? !this.loading }} | ||
<div class="category__panel__notfound"> | ||
<button class="category__panel__close icon-x" {{= click(this.closeAction) }}> | ||
</button> | ||
<div class="category__panel__warning icon-alert-triangle"></div> | ||
<div class="category__panel__close_text"> | ||
{{= _('Qwant Maps found no results, please rephrase your query or zoom out of the map.', 'categories') }} | ||
</div> | ||
<div class="category__panel__back" {{= click(this.closeAction) }}> | ||
<span class="category__panel__back_icon icon-chevron-left"></span> | ||
{{= _('return') }} | ||
</div> | ||
</div> | ||
{{?}} | ||
{{?}} |