pretix-map 0.1.2__py3-none-any.whl → 0.1.4__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,42 +1,85 @@
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
- <h1>{% trans "Ticket Sales Map" %}</h1>
10
9
 
11
- <div class="form-group">
12
- <button id="view-toggle-btn" class="btn btn-default">Switch to Heatmap View</button>
13
- </div>
10
+ <div class="plugin-map-content-wrapper">
14
11
 
15
- {# --- Container for Map and Status Overlay --- #}
16
- <div style="position: relative; border: 1px solid #ccc;"> {# Wrapper for positioning #}
12
+ <h1>{% trans "Ticket Sales Map" %}</h1>
13
+
14
+ <div class="form-inline map-controls-row"
15
+ style="margin-bottom: 1em; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 15px;">
17
16
 
18
- {# The container where the map will be rendered #}
19
- {# Ensure this has height/width via CSS #}
20
- <div id="sales-map-container"
21
- 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 #}
17
+ <div class="map-buttons-group" style="display: flex; flex-wrap: wrap; gap: 10px; align-items: center;">
18
+ <div class="form-group">
19
+ <button id="view-toggle-btn" class="btn btn-default" disabled>Switch to Heatmap View</button>
20
+ </div>
21
+ <div class="form-group">
22
+ <button id="cluster-toggle-btn" class="btn btn-default" disabled style="display: inline-block;">
23
+ Disable Clustering
24
+ </button>
25
+ </div>
26
+ </div>
27
+ <div id="heatmap-options-panel" class="panel panel-default"
28
+ style="display: none; padding: 10px 15px; border-radius: 4px; min-width: 350px;">
29
+ <h5 style="margin-top: 0; margin-bottom: 10px;">{% trans "Heatmap Options" %}</h5>
30
+ <div class="form-horizontal">
31
+ <div class="form-group form-group-sm" style="margin-bottom: 5px;">
32
+ <label for="heatmap-radius" class="col-sm-3 control-label"
33
+ style="padding-top: 5px;">Radius</label>
34
+ <div class="col-sm-7">
35
+ <input type="range" id="heatmap-radius" class="form-control" min="1" max="100" value="25"
36
+ step="1" disabled>
37
+ </div>
38
+ <div class="col-sm-2">
39
+ <span id="radius-value" class="form-control-static">25</span>
40
+ </div>
41
+ </div>
42
+ <div class="form-group form-group-sm" style="margin-bottom: 5px;">
43
+ <label for="heatmap-blur" class="col-sm-3 control-label" style="padding-top: 5px;">Blur</label>
44
+ <div class="col-sm-7">
45
+ <input type="range" id="heatmap-blur" class="form-control" min="1" max="50" value="15"
46
+ step="1" disabled>
47
+ </div>
48
+ <div class="col-sm-2">
49
+ <span id="blur-value" class="form-control-static">15</span>
50
+ </div>
51
+ </div>
52
+ <div class="form-group form-group-sm" style="margin-bottom: 5px;">
53
+ <label for="heatmap-maxZoom" class="col-sm-3 control-label" style="padding-top: 5px;">Max
54
+ Zoom</label>
55
+ <div class="col-sm-7">
56
+ <input type="range" id="heatmap-maxZoom" class="form-control" min="1" max="18" value="18"
57
+ step="1" disabled>
58
+ </div>
59
+ <div class="col-sm-2">
60
+ <span id="maxzoom-value" class="form-control-static">18</span>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
23
65
  </div>
24
66
 
25
- {# --- Status Overlay Element --- #}
26
- {# Initially visible, hidden by JS when map loads/errors occur #}
27
- <div id="map-status-overlay"
28
- 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
- <p>Loading map data...</p>
67
+ <div class="map-wrapper" style="position: relative; border: 1px solid #ccc; flex-grow: 1; min-height: 0;">
68
+ <div id="sales-map-container"
69
+ data-data-url="{% url 'plugins:pretix_mapplugin:event.settings.salesmap.data' organizer=request.organizer.slug event=request.event.slug %}">
70
+ </div>
71
+ <div id="map-status-overlay"
72
+ 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;">
73
+ <p>Loading map data...</p>
74
+ </div>
30
75
  </div>
31
- {# --- End Status Overlay --- #}
32
-
33
76
  </div>
34
- {# --- End Container Wrapper --- #}
35
77
 
36
- {# === LEAFLET PLUGINS (Loaded via staticfiles) === #}
37
- <script src="{% static 'pretix_mapplugin/libs/leaflet-sales-map/leaflet-heat.js' %}"></script>
78
+ <script src="
79
+ {% static 'pretix_mapplugin/libs/leaflet-sales-map/leaflet-heat.js' %}"></script>
38
80
  <link rel="stylesheet" href="{% static 'pretix_mapplugin/libs/leaflet-sales-map/MarkerCluster.css' %}"/>
39
- <link rel="stylesheet" href="{% static 'pretix_mapplugin/libs/leaflet-sales-map/MarkerCluster.Default.css' %}"/>
81
+ <link rel="stylesheet"
82
+ href="{% static 'pretix_mapplugin/libs/leaflet-sales-map/MarkerCluster.Default.css' %}"/>
40
83
  <script src="{% static 'pretix_mapplugin/libs/leaflet-sales-map/leaflet.markercluster.js' %}"></script>
41
84
 
42
85
  <script src="{% static 'pretix_mapplugin/js/salesmap.js' %}"></script>