[IMP] website: determine map snippet visibility based on presence of key
Before this commit both Google Map and Map snippets were always available in the block list. After this commit: - if the Google Maps API key is specified: only the Google Map snippet is available - if the Google Maps API key is not specified: only the Map snippet is available - if debug mode is activated: both snippets are available https://github.com/odoo/odoo/pull/68529
This commit is contained in:
@@ -108,8 +108,9 @@
|
||||
<div class="o_panel_header">Dynamic Content</div>
|
||||
<div class="o_panel_body">
|
||||
<t id="form_form_hook"/>
|
||||
<t t-snippet="website.s_map" t-thumbnail="/website/static/src/img/snippets_thumbs/s_map.svg"/>
|
||||
<t t-snippet="website.s_google_map" t-thumbnail="/website/static/src/img/snippets_thumbs/s_google_map.svg"/>
|
||||
<t t-set="google_maps_api_key" t-value="request.env['website'].get_current_website().google_maps_api_key"/>
|
||||
<t t-if="debug or not google_maps_api_key" t-snippet="website.s_map" t-thumbnail="/website/static/src/img/snippets_thumbs/s_map.svg"/>
|
||||
<t t-if="debug or google_maps_api_key" t-snippet="website.s_google_map" t-thumbnail="/website/static/src/img/snippets_thumbs/s_google_map.svg"/>
|
||||
<t t-if="debug" t-snippet="website.s_dynamic_snippet" t-thumbnail="/website/static/src/img/snippets_thumbs/s_dynamic_snippet.svg"/>
|
||||
<t t-if="debug" t-snippet="website.s_dynamic_snippet_carousel" t-thumbnail="/website/static/src/img/snippets_thumbs/s_dynamic_carousel.svg"/>
|
||||
<t id="sale_products_hook"/>
|
||||
|
||||
Reference in New Issue
Block a user