pretix-map 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,67 @@
1
- {% extends "pretixcontrol/event/settings_base.html" %} {# Use Pretix base template #}
1
+ {% extends "pretixcontrol/event/settings_base.html" %}
2
2
  {% load i18n %}
3
- {% load static %} {# To load static files like CSS/JS later #}
4
- {% load eventurl %} {# Needed for the url template tag #}
3
+ {% load static %}
4
+ {% load eventurl %}
5
5
 
6
6
  {% block title %}{% trans "Ticket Sales Map" %}{% endblock %}
7
7
 
8
8
  {% block inside %}
9
9
  <h1>{% trans "Ticket Sales Map" %}</h1>
10
10
 
11
- <div class="form-group">
12
- <button id="view-toggle-btn" class="btn btn-default">Switch to Heatmap View</button>
11
+ {# -- Controls Row -- #}
12
+ <div class="form-inline" style="margin-bottom: 1em;">
13
+ <div class="form-group" style="margin-right: 10px;">
14
+ <button id="view-toggle-btn" class="btn btn-default">Switch to Heatmap View</button>
15
+ </div>
16
+ {# -- NEW Cluster Toggle Button -- #}
17
+ <div class="form-group" style="margin-right: 10px;">
18
+ <button id="cluster-toggle-btn" class="btn btn-default" disabled>Disable Clustering</button>
19
+ </div>
20
+ {# -- End Cluster Toggle Button -- #}
21
+ </div>
22
+ {# -- End Controls Row -- #}
23
+
24
+ {# -- NEW Heatmap Options Panel (Initially hidden for pins view) -- #}
25
+ <div id="heatmap-options-panel" class="panel panel-default"
26
+ style="display: none; padding: 15px; margin-bottom: 1em; max-width: 400px;">
27
+ <h4>{% trans "Heatmap Options" %}</h4>
28
+ <div class="form-group">
29
+ <label for="heatmap-radius">Radius: <span id="radius-value">25</span></label>
30
+ <input type="range" id="heatmap-radius" class="form-control" min="1" max="100" value="25" step="1" disabled>
31
+ </div>
32
+ <div class="form-group">
33
+ <label for="heatmap-blur">Blur: <span id="blur-value">15</span></label>
34
+ <input type="range" id="heatmap-blur" class="form-control" min="1" max="50" value="15" step="1" disabled>
35
+ </div>
36
+ <div class="form-group">
37
+ <label for="heatmap-maxZoom">Max Zoom: <span id="maxzoom-value">18</span></label>
38
+ <input type="range" id="heatmap-maxZoom" class="form-control" min="1" max="18" value="18" step="1" disabled>
39
+ </div>
40
+ {# Add more options like gradient if desired later #}
13
41
  </div>
42
+ {# -- End Heatmap Options Panel -- #}
14
43
 
15
- {# --- Container for Map and Status Overlay --- #}
16
- <div style="position: relative; border: 1px solid #ccc;"> {# Wrapper for positioning #}
17
44
 
18
- {# The container where the map will be rendered #}
19
- {# Ensure this has height/width via CSS #}
45
+ {# -- Map Area -- #}
46
+ <div style="position: relative; border: 1px solid #ccc;">
20
47
  <div id="sales-map-container"
21
48
  data-data-url="{% url 'plugins:pretix_mapplugin:event.settings.salesmap.data' organizer=request.organizer.slug event=request.event.slug %}">
22
- {# Content inside here will be managed by Leaflet #}
23
49
  </div>
24
-
25
- {# --- Status Overlay Element --- #}
26
- {# Initially visible, hidden by JS when map loads/errors occur #}
27
50
  <div id="map-status-overlay"
28
51
  style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 1000; display: flex; justify-content: center; align-items: center; text-align: center;">
29
52
  <p>Loading map data...</p>
30
53
  </div>
31
- {# --- End Status Overlay --- #}
32
-
33
54
  </div>
34
- {# --- End Container Wrapper --- #}
55
+ {# -- End Map Area -- #}
56
+
35
57
 
36
- {# === LEAFLET PLUGINS (Loaded via staticfiles) === #}
58
+ {# === Leaflet & Plugins (Keep as is) === #}
37
59
  <script src="{% static 'pretix_mapplugin/libs/leaflet-sales-map/leaflet-heat.js' %}"></script>
38
60
  <link rel="stylesheet" href="{% static 'pretix_mapplugin/libs/leaflet-sales-map/MarkerCluster.css' %}"/>
39
61
  <link rel="stylesheet" href="{% static 'pretix_mapplugin/libs/leaflet-sales-map/MarkerCluster.Default.css' %}"/>
40
62
  <script src="{% static 'pretix_mapplugin/libs/leaflet-sales-map/leaflet.markercluster.js' %}"></script>
41
63
 
64
+ {# === Your JS/CSS (Keep as is) === #}
42
65
  <script src="{% static 'pretix_mapplugin/js/salesmap.js' %}"></script>
43
66
  <link rel="stylesheet" href="{% static 'pretix_mapplugin/css/salesmap.css' %}"/>
44
67