mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-14 14:52:16 +00:00
Add a switch for geolocation.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load waffle_tags %}
|
||||
|
||||
{% block title %}
|
||||
Stores
|
||||
@@ -11,16 +12,15 @@
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
}
|
||||
#geolocation {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
<script type="text/javascript" src="{% static "js/gmap.js" %}"></script>
|
||||
{% switch map_geolocation %}
|
||||
<script type="text/javascript" src="{% static "js/geolocation.js" %}"></script>
|
||||
{% endswitch %}
|
||||
<script type="text/javascript">
|
||||
var stores = [
|
||||
{% for store in store_list %}{% if store.address.geo_latitude %}['{{ store }}', {{ store.address.geo_latitude }}, {{ store.address.geo_longitude }}, {{ store.store_type }}, '{% url "store-detail" store.slug %}'],{% endif %}
|
||||
@@ -35,7 +35,9 @@
|
||||
<p class="lead">
|
||||
{{ site.name }} lists {{ store_count }} stores, and {{ chain_count }} chains across the world.
|
||||
</p>
|
||||
<p id="geolocation"><a class="btn btn-large">Find Stores Near Me.</a></p>
|
||||
{% switch map_geolocation %}
|
||||
<p id="geolocation" style="display: none;"><a class="btn btn-large">Find Stores Near Me.</a></p>
|
||||
{% endswitch %}
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span8 offset2">
|
||||
|
||||
Reference in New Issue
Block a user