diff --git a/djangorota/djangorota/templates/rota/leaves_global.html b/djangorota/djangorota/templates/rota/leaves_global.html index d9b5736..3aed7e0 100644 --- a/djangorota/djangorota/templates/rota/leaves_global.html +++ b/djangorota/djangorota/templates/rota/leaves_global.html @@ -11,7 +11,15 @@ {# Rota selection is handled by route scoping; no dropdown needed here #} +
+
+ + +
+
+
+

View all leave requests across workers. Choose a rota to scope the calendar, or select "All rotas" to see everything. Click and drag to select dates to open the leave form (you'll need to choose workers in the modal).

@@ -55,6 +63,8 @@ const sel = document.getElementById('selected_rota_json'); if(sel) initialRota = JSON.parse(sel.textContent || sel.innerText || 'null'); }catch(e){ initialRota = null; } + // expose initial rota id so other scripts (list view) can access it + window._initialRota = initialRota; window.initCalendar('calendar', { leaves: leaves, leavesUrl: leavesUrlBase, rotaId: initialRota, requestUrl: '{% url "rota:request_leave" %}', mode: container.dataset.mode || 'inline' }); function refreshLegendFor(id){ const globalLegendContent = document.getElementById('global-legend-content'); @@ -86,5 +96,106 @@ })(); + + {# Consolidated legend above replaces the separate 'Workers on this rota' box #} {% endblock %}