Move calendar blueprint to app level for correct URL routing

The calendar blueprint was nested under calendars (admin), making URLs
/{slug}/admin/{calendar_slug}/ instead of /{slug}/{calendar_slug}/.

Register calendar blueprint directly on the app and update all endpoint
references from calendars.calendar.* to calendar.* (37 in Python,
~50 in templates).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 16:50:13 +00:00
parent a8edc26a1d
commit 5957bd8941
40 changed files with 106 additions and 105 deletions

View File

@@ -9,7 +9,7 @@ from jinja2 import FileSystemLoader, ChoiceLoader
from shared.infrastructure.factory import create_base_app from shared.infrastructure.factory import create_base_app
from bp import register_all_events, register_calendars, register_markets, register_payments, register_page, register_fragments, register_actions, register_data from bp import register_all_events, register_calendar, register_calendars, register_markets, register_payments, register_page, register_fragments, register_actions, register_data
async def events_context() -> dict: async def events_context() -> dict:
@@ -90,8 +90,13 @@ def create_app() -> "Quart":
url_prefix="/<slug>", url_prefix="/<slug>",
) )
# Calendar admin under post slug: /<slug>/admin/
# Individual calendars at /<slug>/<calendar_slug>/ # Individual calendars at /<slug>/<calendar_slug>/
app.register_blueprint(
register_calendar(),
url_prefix="/<slug>",
)
# Calendar admin under post slug: /<slug>/admin/
app.register_blueprint( app.register_blueprint(
register_calendars(), register_calendars(),
url_prefix="/<slug>", url_prefix="/<slug>",

View File

@@ -1,4 +1,5 @@
from .all_events.routes import register as register_all_events from .all_events.routes import register as register_all_events
from .calendar.routes import register as register_calendar
from .calendars.routes import register as register_calendars from .calendars.routes import register as register_calendars
from .markets.routes import register as register_markets from .markets.routes import register as register_markets
from .payments.routes import register as register_payments from .payments.routes import register as register_payments

View File

@@ -12,8 +12,6 @@ from .services.calendars import (
create_calendar as svc_create_calendar, create_calendar as svc_create_calendar,
) )
from ..calendar.routes import register as register_calendar
from shared.browser.app.redis_cacher import cache_page, clear_cache from shared.browser.app.redis_cacher import cache_page, clear_cache
from shared.browser.app.authz import require_admin from shared.browser.app.authz import require_admin
@@ -22,9 +20,6 @@ from shared.browser.app.utils.htmx import is_htmx_request
def register(): def register():
bp = Blueprint("calendars", __name__, url_prefix='/admin') bp = Blueprint("calendars", __name__, url_prefix='/admin')
bp.register_blueprint(
register_calendar(),
)
@bp.context_processor @bp.context_processor
async def inject_root(): async def inject_root():
# Must always return a dict # Must always return a dict

View File

@@ -77,7 +77,7 @@ def _post_nav_html(ctx: dict) -> str:
for cal in calendars: for cal in calendars:
cal_slug = getattr(cal, "slug", "") if hasattr(cal, "slug") else cal.get("slug", "") cal_slug = getattr(cal, "slug", "") if hasattr(cal, "slug") else cal.get("slug", "")
cal_name = getattr(cal, "name", "") if hasattr(cal, "name") else cal.get("name", "") cal_name = getattr(cal, "name", "") if hasattr(cal, "name") else cal.get("name", "")
href = url_for("calendars.calendar.get", calendar_slug=cal_slug) href = url_for("calendar.get", calendar_slug=cal_slug)
is_sel = (cal_slug == current_cal_slug) is_sel = (cal_slug == current_cal_slug)
parts.append(render("nav-link", href=href, icon="fa fa-calendar", parts.append(render("nav-link", href=href, icon="fa fa-calendar",
label=cal_name, select_colours=select_colours, label=cal_name, select_colours=select_colours,
@@ -122,7 +122,7 @@ def _calendar_header_html(ctx: dict, *, oob: bool = False) -> str:
cal_name = getattr(calendar, "name", "") cal_name = getattr(calendar, "name", "")
cal_desc = getattr(calendar, "description", "") or "" cal_desc = getattr(calendar, "description", "") or ""
link_href = url_for("calendars.calendar.get", calendar_slug=cal_slug) link_href = url_for("calendar.get", calendar_slug=cal_slug)
label_html = render("events-calendar-label", label_html = render("events-calendar-label",
name=cal_name, description=cal_desc) name=cal_name, description=cal_desc)
@@ -146,11 +146,11 @@ def _calendar_nav_html(ctx: dict) -> str:
select_colours = ctx.get("select_colours", "") select_colours = ctx.get("select_colours", "")
parts = [] parts = []
slots_href = url_for("calendars.calendar.slots.get", calendar_slug=cal_slug) slots_href = url_for("calendar.slots.get", calendar_slug=cal_slug)
parts.append(render("nav-link", href=slots_href, icon="fa fa-clock", parts.append(render("nav-link", href=slots_href, icon="fa fa-clock",
label="Slots", select_colours=select_colours)) label="Slots", select_colours=select_colours))
if is_admin: if is_admin:
admin_href = url_for("calendars.calendar.admin.admin", calendar_slug=cal_slug) admin_href = url_for("calendar.admin.admin", calendar_slug=cal_slug)
parts.append(render("nav-link", href=admin_href, icon="fa fa-cog", parts.append(render("nav-link", href=admin_href, icon="fa fa-cog",
select_colours=select_colours)) select_colours=select_colours))
return "".join(parts) return "".join(parts)
@@ -172,7 +172,7 @@ def _day_header_html(ctx: dict, *, oob: bool = False) -> str:
return "" return ""
link_href = url_for( link_href = url_for(
"calendars.calendar.day.show_day", "calendar.day.show_day",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,
@@ -206,7 +206,7 @@ def _day_nav_html(ctx: dict) -> str:
entry_links = [] entry_links = []
for entry in confirmed_entries: for entry in confirmed_entries:
href = url_for( href = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.get", "calendar.day.calendar_entries.calendar_entry.get",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,
@@ -223,7 +223,7 @@ def _day_nav_html(ctx: dict) -> str:
if is_admin and day_date: if is_admin and day_date:
admin_href = url_for( admin_href = url_for(
"calendars.calendar.day.admin.admin", "calendar.day.admin.admin",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,
@@ -249,7 +249,7 @@ def _day_admin_header_html(ctx: dict, *, oob: bool = False) -> str:
return "" return ""
link_href = url_for( link_href = url_for(
"calendars.calendar.day.admin.admin", "calendar.day.admin.admin",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,
@@ -274,8 +274,8 @@ def _calendar_admin_header_html(ctx: dict, *, oob: bool = False) -> str:
nav_parts = [] nav_parts = []
if cal_slug: if cal_slug:
for endpoint, label in [ for endpoint, label in [
("calendars.calendar.slots.get", "slots"), ("calendar.slots.get", "slots"),
("calendars.calendar.admin.calendar_description_edit", "description"), ("calendar.admin.calendar_description_edit", "description"),
]: ]:
href = url_for(endpoint, calendar_slug=cal_slug) href = url_for(endpoint, calendar_slug=cal_slug)
nav_parts.append(render("nav-link", href=href, label=label, nav_parts.append(render("nav-link", href=href, label=label,
@@ -357,8 +357,8 @@ def _calendars_list_html(ctx: dict, calendars: list) -> str:
for cal in calendars: for cal in calendars:
cal_slug = getattr(cal, "slug", "") cal_slug = getattr(cal, "slug", "")
cal_name = getattr(cal, "name", "") cal_name = getattr(cal, "name", "")
href = prefix + url_for("calendars.calendar.get", calendar_slug=cal_slug) href = prefix + url_for("calendar.get", calendar_slug=cal_slug)
del_url = url_for("calendars.calendar.delete", calendar_slug=cal_slug) del_url = url_for("calendar.delete", calendar_slug=cal_slug)
csrf_hdr = f'{{"X-CSRFToken":"{csrf}"}}' csrf_hdr = f'{{"X-CSRFToken":"{csrf}"}}'
parts.append(render("events-calendars-item", parts.append(render("events-calendars-item",
href=href, cal_name=cal_name, cal_slug=cal_slug, href=href, cal_name=cal_name, cal_slug=cal_slug,
@@ -399,7 +399,7 @@ def _calendar_main_panel_html(ctx: dict) -> str:
qs = qsession if "qsession" not in ctx else ctx["qsession"] qs = qsession if "qsession" not in ctx else ctx["qsession"]
def nav_link(y, m): def nav_link(y, m):
return url_for("calendars.calendar.get", calendar_slug=cal_slug, year=y, month=m) return url_for("calendar.get", calendar_slug=cal_slug, year=y, month=m)
# Month navigation arrows # Month navigation arrows
nav_arrows = [] nav_arrows = []
@@ -449,7 +449,7 @@ def _calendar_main_panel_html(ctx: dict) -> str:
day_short_html = "" day_short_html = ""
if day_date: if day_date:
day_href = url_for( day_href = url_for(
"calendars.calendar.day.show_day", "calendar.day.show_day",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=day_date.year, month=day_date.month, day=day_date.day, year=day_date.year, month=day_date.month, day=day_date.day,
) )
@@ -519,7 +519,7 @@ def _day_main_panel_html(ctx: dict) -> str:
rows_html = render("events-day-empty-row") rows_html = render("events-day-empty-row")
add_url = url_for( add_url = url_for(
"calendars.calendar.day.calendar_entries.add_form", "calendar.day.calendar_entries.add_form",
calendar_slug=cal_slug, calendar_slug=cal_slug,
day=day, month=month, year=year, day=day, month=month, year=year,
) )
@@ -543,7 +543,7 @@ def _day_row_html(ctx: dict, entry) -> str:
tr_cls = getattr(styles, "tr", "") if hasattr(styles, "tr") else styles.get("tr", "") tr_cls = getattr(styles, "tr", "") if hasattr(styles, "tr") else styles.get("tr", "")
entry_href = url_for( entry_href = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.get", "calendar.day.calendar_entries.calendar_entry.get",
calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=entry.id, calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=entry.id,
) )
@@ -554,7 +554,7 @@ def _day_row_html(ctx: dict, entry) -> str:
# Slot/Time # Slot/Time
slot = getattr(entry, "slot", None) slot = getattr(entry, "slot", None)
if slot: if slot:
slot_href = url_for("calendars.calendar.slots.slot.get", calendar_slug=cal_slug, slot_id=slot.id) slot_href = url_for("calendar.slots.slot.get", calendar_slug=cal_slug, slot_id=slot.id)
time_start = slot.time_start.strftime("%H:%M") if slot.time_start else "" time_start = slot.time_start.strftime("%H:%M") if slot.time_start else ""
time_end = f" \u2192 {slot.time_end.strftime('%H:%M')}" if slot.time_end else "" time_end = f" \u2192 {slot.time_end.strftime('%H:%M')}" if slot.time_end else ""
slot_html = render("events-day-row-slot", slot_html = render("events-day-row-slot",
@@ -633,7 +633,7 @@ def _calendar_admin_main_panel_html(ctx: dict) -> str:
desc = getattr(calendar, "description", "") or "" desc = getattr(calendar, "description", "") or ""
hx_select = ctx.get("hx_select_search", "#main-panel") hx_select = ctx.get("hx_select_search", "#main-panel")
desc_edit_url = url_for("calendars.calendar.admin.calendar_description_edit", calendar_slug=cal_slug) desc_edit_url = url_for("calendar.admin.calendar_description_edit", calendar_slug=cal_slug)
description_html = _calendar_description_display_html(calendar, desc_edit_url) description_html = _calendar_description_display_html(calendar, desc_edit_url)
return render("events-calendar-admin-panel", return render("events-calendar-admin-panel",
@@ -1769,7 +1769,7 @@ def _entry_main_panel_html(ctx: dict) -> str:
# Options and Edit Button # Options and Edit Button
edit_url = url_for( edit_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.get_edit", "calendar.day.calendar_entries.calendar_entry.get_edit",
entry_id=eid, calendar_slug=cal_slug, entry_id=eid, calendar_slug=cal_slug,
day=day, month=month, year=year, day=day, month=month, year=year,
) )
@@ -1805,7 +1805,7 @@ def _entry_header_html(ctx: dict, *, oob: bool = False) -> str:
year = ctx.get("year") year = ctx.get("year")
link_href = url_for( link_href = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.get", "calendar.day.calendar_entries.calendar_entry.get",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=year, month=month, day=day, year=year, month=month, day=day,
entry_id=entry.id, entry_id=entry.id,
@@ -1879,7 +1879,7 @@ def _entry_nav_html(ctx: dict) -> str:
# Admin link # Admin link
if is_admin: if is_admin:
admin_url = url_for( admin_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.admin.admin", "calendar.day.calendar_entries.calendar_entry.admin.admin",
calendar_slug=cal_slug, calendar_slug=cal_slug,
day=day, month=month, year=year, day=day, month=month, year=year,
entry_id=entry.id, entry_id=entry.id,
@@ -1954,7 +1954,7 @@ def _entry_options_html(entry, calendar, day, month, year) -> str:
def _make_button(action_name, label, confirm_title, confirm_text, *, trigger_type="submit"): def _make_button(action_name, label, confirm_title, confirm_text, *, trigger_type="submit"):
url = url_for( url = url_for(
f"calendars.calendar.day.calendar_entries.calendar_entry.{action_name}", f"calendar.day.calendar_entries.calendar_entry.{action_name}",
calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=eid, calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=eid,
) )
btn_type = "button" if trigger_type == "button" else "submit" btn_type = "button" if trigger_type == "button" else "submit"
@@ -2013,7 +2013,7 @@ def render_entry_tickets_config(entry, calendar, day, month, year) -> str:
display_html = render("events-ticket-config-none", show_js=show_js) display_html = render("events-ticket-config-none", show_js=show_js)
update_url = url_for( update_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.update_tickets", "calendar.day.calendar_entries.calendar_entry.update_tickets",
entry_id=eid, calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=eid, calendar_slug=cal_slug, day=day, month=month, year=year,
) )
hidden_cls = "" if tp is None else "hidden" hidden_cls = "" if tp is None else "hidden"
@@ -2052,7 +2052,7 @@ def render_entry_posts_panel(entry_posts, entry, calendar, day, month, year) ->
if feat else render("events-post-img-placeholder")) if feat else render("events-post-img-placeholder"))
del_url = url_for( del_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.remove_post", "calendar.day.calendar_entries.calendar_entry.remove_post",
calendar_slug=cal_slug, day=day, month=month, year=year, calendar_slug=cal_slug, day=day, month=month, year=year,
entry_id=eid, post_id=ep_id, entry_id=eid, post_id=ep_id,
) )
@@ -2065,7 +2065,7 @@ def render_entry_posts_panel(entry_posts, entry, calendar, day, month, year) ->
posts_html = render("events-entry-posts-none") posts_html = render("events-entry-posts-none")
search_url = url_for( search_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.search_posts", "calendar.day.calendar_entries.calendar_entry.search_posts",
calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=eid, calendar_slug=cal_slug, day=day, month=month, year=year, entry_id=eid,
) )
@@ -2121,7 +2121,7 @@ def render_day_entries_nav_oob(confirmed_entries, calendar, day_date) -> str:
items = "" items = ""
for entry in confirmed_entries: for entry in confirmed_entries:
href = url_for( href = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.get", "calendar.day.calendar_entries.calendar_entry.get",
calendar_slug=cal_slug, calendar_slug=cal_slug,
year=day_date.year, month=day_date.month, day=day_date.day, year=day_date.year, month=day_date.month, day=day_date.day,
entry_id=entry.id, entry_id=entry.id,
@@ -2195,7 +2195,7 @@ def render_calendar_description(calendar, *, oob: bool = False) -> str:
from quart import url_for from quart import url_for
cal_slug = getattr(calendar, "slug", "") cal_slug = getattr(calendar, "slug", "")
edit_url = url_for("calendars.calendar.admin.calendar_description_edit", calendar_slug=cal_slug) edit_url = url_for("calendar.admin.calendar_description_edit", calendar_slug=cal_slug)
html = _calendar_description_display_html(calendar, edit_url) html = _calendar_description_display_html(calendar, edit_url)
if oob: if oob:
@@ -2213,8 +2213,8 @@ def render_calendar_description_edit(calendar) -> str:
cal_slug = getattr(calendar, "slug", "") cal_slug = getattr(calendar, "slug", "")
desc = getattr(calendar, "description", "") or "" desc = getattr(calendar, "description", "") or ""
save_url = url_for("calendars.calendar.admin.calendar_description_save", calendar_slug=cal_slug) save_url = url_for("calendar.admin.calendar_description_save", calendar_slug=cal_slug)
cancel_url = url_for("calendars.calendar.admin.calendar_description_view", calendar_slug=cal_slug) cancel_url = url_for("calendar.admin.calendar_description_view", calendar_slug=cal_slug)
return render("events-calendar-description-edit-form", return render("events-calendar-description-edit-form",
save_url=save_url, cancel_url=cancel_url, save_url=save_url, cancel_url=cancel_url,
@@ -2270,7 +2270,7 @@ def render_slot_main_panel(slot, calendar, *, oob: bool = False) -> str:
cost_str = f"{cost:.2f}" if cost is not None else "" cost_str = f"{cost:.2f}" if cost is not None else ""
desc = getattr(slot, "description", "") or "" desc = getattr(slot, "description", "") or ""
edit_url = url_for("calendars.calendar.slots.slot.get_edit", slot_id=slot.id, calendar_slug=cal_slug) edit_url = url_for("calendar.slots.slot.get_edit", slot_id=slot.id, calendar_slug=cal_slug)
# Days pills # Days pills
if days and days[0] != "\u2014": if days and days[0] != "\u2014":
@@ -2319,8 +2319,8 @@ def render_slots_table(slots, calendar) -> str:
rows_html = "" rows_html = ""
if slots: if slots:
for s in slots: for s in slots:
slot_href = url_for("calendars.calendar.slots.slot.get", calendar_slug=cal_slug, slot_id=s.id) slot_href = url_for("calendar.slots.slot.get", calendar_slug=cal_slug, slot_id=s.id)
del_url = url_for("calendars.calendar.slots.slot.slot_delete", calendar_slug=cal_slug, slot_id=s.id) del_url = url_for("calendar.slots.slot.slot_delete", calendar_slug=cal_slug, slot_id=s.id)
desc = getattr(s, "description", "") or "" desc = getattr(s, "description", "") or ""
days_display = getattr(s, "days_display", "\u2014") days_display = getattr(s, "days_display", "\u2014")
@@ -2351,7 +2351,7 @@ def render_slots_table(slots, calendar) -> str:
else: else:
rows_html = render("events-slots-empty-row") rows_html = render("events-slots-empty-row")
add_url = url_for("calendars.calendar.slots.add_form", calendar_slug=cal_slug) add_url = url_for("calendar.slots.add_form", calendar_slug=cal_slug)
return render("events-slots-table", return render("events-slots-table",
list_container=list_container, rows_html=rows_html, list_container=list_container, rows_html=rows_html,
@@ -2377,7 +2377,7 @@ def render_ticket_type_main_panel(ticket_type, entry, calendar, day, month, year
tid = str(ticket_type.id) tid = str(ticket_type.id)
edit_url = url_for( edit_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get_edit", "calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get_edit",
ticket_type_id=ticket_type.id, calendar_slug=cal_slug, ticket_type_id=ticket_type.id, calendar_slug=cal_slug,
year=year, month=month, day=day, entry_id=entry.id, year=year, month=month, day=day, entry_id=entry.id,
) )
@@ -2416,12 +2416,12 @@ def render_ticket_types_table(ticket_types, entry, calendar, day, month, year) -
if ticket_types: if ticket_types:
for tt in ticket_types: for tt in ticket_types:
tt_href = url_for( tt_href = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get", "calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get",
calendar_slug=cal_slug, year=year, month=month, day=day, calendar_slug=cal_slug, year=year, month=month, day=day,
entry_id=eid, ticket_type_id=tt.id, entry_id=eid, ticket_type_id=tt.id,
) )
del_url = url_for( del_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.delete", "calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.delete",
calendar_slug=cal_slug, year=year, month=month, day=day, calendar_slug=cal_slug, year=year, month=month, day=day,
entry_id=eid, ticket_type_id=tt.id, entry_id=eid, ticket_type_id=tt.id,
) )
@@ -2439,7 +2439,7 @@ def render_ticket_types_table(ticket_types, entry, calendar, day, month, year) -
rows_html = render("events-ticket-types-empty-row") rows_html = render("events-ticket-types-empty-row")
add_url = url_for( add_url = url_for(
"calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.add_form", "calendar.day.calendar_entries.calendar_entry.ticket_types.add_form",
calendar_slug=cal_slug, entry_id=eid, year=year, month=month, day=day, calendar_slug=cal_slug, entry_id=eid, year=year, month=month, day=day,
) )

View File

@@ -6,11 +6,11 @@
{# Outer left: -1 year #} {# Outer left: -1 year #}
<a <a
class="{{styles.pill}} text-xl" class="{{styles.pill}} text-xl"
href="{{ url_for('calendars.calendar.get', href="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=prev_year, year=prev_year,
month=month) }}" month=month) }}"
hx-get="{{ url_for('calendars.calendar.get', hx-get="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=prev_year, year=prev_year,
month=month) }}" month=month) }}"
@@ -25,11 +25,11 @@
{# Inner left: -1 month #} {# Inner left: -1 month #}
<a <a
class="{{styles.pill}} text-xl" class="{{styles.pill}} text-xl"
href="{{ url_for('calendars.calendar.get', href="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=prev_month_year, year=prev_month_year,
month=prev_month) }}" month=prev_month) }}"
hx-get="{{ url_for('calendars.calendar.get', hx-get="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=prev_month_year, year=prev_month_year,
month=prev_month) }}" month=prev_month) }}"
@@ -48,11 +48,11 @@
{# Inner right: +1 month #} {# Inner right: +1 month #}
<a <a
class="{{styles.pill}} text-xl" class="{{styles.pill}} text-xl"
href="{{ url_for('calendars.calendar.get', href="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=next_month_year, year=next_month_year,
month=next_month) }}" month=next_month) }}"
hx-get="{{ url_for('calendars.calendar.get', hx-get="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=next_month_year, year=next_month_year,
month=next_month) }}" month=next_month) }}"
@@ -67,11 +67,11 @@
{# Outer right: +1 year #} {# Outer right: +1 year #}
<a <a
class="{{styles.pill}} text-xl" class="{{styles.pill}} text-xl"
href="{{ url_for('calendars.calendar.get', href="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=next_year, year=next_year,
month=month) }}" month=month) }}"
hx-get="{{ url_for('calendars.calendar.get', hx-get="{{ url_for('calendar.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=next_year, year=next_year,
month=month) }}" month=month) }}"
@@ -110,12 +110,12 @@
{# Clickable day number: goes to day detail view #} {# Clickable day number: goes to day detail view #}
<a <a
class="{{styles.pill}}" class="{{styles.pill}}"
href="{{ url_for('calendars.calendar.day.show_day', href="{{ url_for('calendar.day.show_day',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day.date.year, year=day.date.year,
month=day.date.month, month=day.date.month,
day=day.date.day) }}" day=day.date.day) }}"
hx-get="{{ url_for('calendars.calendar.day.show_day', hx-get="{{ url_for('calendar.day.show_day',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day.date.year, year=day.date.year,
month=day.date.month, month=day.date.month,

View File

@@ -1,7 +1,7 @@
<!-- Desktop nav --> <!-- Desktop nav -->
{% import 'macros/links.html' as links %} {% import 'macros/links.html' as links %}
{% call links.link( {% call links.link(
url_for('calendars.calendar.slots.get', calendar_slug=calendar.slug), url_for('calendar.slots.get', calendar_slug=calendar.slug),
hx_select_search, hx_select_search,
select_colours, select_colours,
True, True,
@@ -14,5 +14,5 @@
{% endcall %} {% endcall %}
{% if g.rights.admin %} {% if g.rights.admin %}
{% from 'macros/admin_nav.html' import admin_nav_item %} {% from 'macros/admin_nav.html' import admin_nav_item %}
{{ admin_nav_item(url_for('calendars.calendar.admin.admin', calendar_slug=calendar.slug)) }} {{ admin_nav_item(url_for('calendar.admin.admin', calendar_slug=calendar.slug)) }}
{% endif %} {% endif %}

View File

@@ -13,7 +13,7 @@
type="button" type="button"
class="mt-2 text-xs underline" class="mt-2 text-xs underline"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.admin.calendar_description_edit', 'calendar.admin.calendar_description_edit',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
) }}" ) }}"
hx-target="#calendar-description" hx-target="#calendar-description"

View File

@@ -1,7 +1,7 @@
<div id="calendar-description"> <div id="calendar-description">
<form <form
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.admin.calendar_description_save', 'calendar.admin.calendar_description_save',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
) }}" ) }}"
hx-target="#calendar-description" hx-target="#calendar-description"
@@ -28,7 +28,7 @@
type="button" type="button"
class="px-3 py-1 rounded border" class="px-3 py-1 rounded border"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.admin.calendar_description_view', 'calendar.admin.calendar_description_view',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
) }}" ) }}"
hx-target="#calendar-description" hx-target="#calendar-description"

View File

@@ -1,7 +1,7 @@
{% import 'macros/links.html' as links %} {% import 'macros/links.html' as links %}
{% macro header_row(oob=False) %} {% macro header_row(oob=False) %}
{% call links.menu_row(id='calendar-row', oob=oob) %} {% call links.menu_row(id='calendar-row', oob=oob) %}
{% call links.link(url_for('calendars.calendar.get', calendar_slug=calendar.slug), hx_select_search) %} {% call links.link(url_for('calendar.get', calendar_slug=calendar.slug), hx_select_search) %}
<div class="flex flex-col md:flex-row md:gap-2 items-center min-w-0"> <div class="flex flex-col md:flex-row md:gap-2 items-center min-w-0">
<div class="flex flex-row items-center gap-2"> <div class="flex flex-row items-center gap-2">
<i class="fa fa-calendar"></i> <i class="fa fa-calendar"></i>

View File

@@ -3,7 +3,7 @@
<div class="mt-6 border rounded-lg p-4"> <div class="mt-6 border rounded-lg p-4">
<div class="flex items-center justify-between gap-3"> <div class="flex items-center justify-between gap-3">
{% set calendar_href = url_for('calendars.calendar.get', calendar_slug=cal.slug)|host %} {% set calendar_href = url_for('calendar.get', calendar_slug=cal.slug)|host %}
<a <a
class="flex items-baseline gap-3" class="flex items-baseline gap-3"
href="{{ calendar_href }}" href="{{ calendar_href }}"
@@ -27,7 +27,7 @@
data-confirm-confirm-text="Yes, delete it" data-confirm-confirm-text="Yes, delete it"
data-confirm-cancel-text="Cancel" data-confirm-cancel-text="Cancel"
data-confirm-event="confirmed" data-confirm-event="confirmed"
hx-delete="{{ url_for('calendars.calendar.delete', calendar_slug=cal.slug) }}" hx-delete="{{ url_for('calendar.delete', calendar_slug=cal.slug) }}"
hx-trigger="confirmed" hx-trigger="confirmed"
hx-target="#calendars-list" hx-target="#calendars-list"
hx-select="#calendars-list" hx-select="#calendars-list"

View File

@@ -3,7 +3,7 @@
<form <form
class="mt-4 grid grid-cols-1 md:grid-cols-4 gap-2" class="mt-4 grid grid-cols-1 md:grid-cols-4 gap-2"
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.day.calendar_entries.add_entry', 'calendar.day.calendar_entries.add_entry',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,
@@ -123,7 +123,7 @@
<button <button
type="button" type="button"
class="{{styles.cancel_button}}" class="{{styles.cancel_button}}"
hx-get="{{ url_for('calendars.calendar.day.calendar_entries.add_button', hx-get="{{ url_for('calendar.day.calendar_entries.add_button',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -3,7 +3,7 @@
type="button" type="button"
class="{{styles.pre_action_button}}" class="{{styles.pre_action_button}}"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.day.calendar_entries.add_form', 'calendar.day.calendar_entries.add_form',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -6,7 +6,7 @@
{% from 'macros/scrolling_menu.html' import scrolling_menu with context %} {% from 'macros/scrolling_menu.html' import scrolling_menu with context %}
{% call(entry) scrolling_menu('day-entries-container', confirmed_entries) %} {% call(entry) scrolling_menu('day-entries-container', confirmed_entries) %}
<a <a
href="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.get', href="{{ url_for('calendar.day.calendar_entries.calendar_entry.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,
@@ -29,7 +29,7 @@
{% from 'macros/admin_nav.html' import admin_nav_item %} {% from 'macros/admin_nav.html' import admin_nav_item %}
{{admin_nav_item( {{admin_nav_item(
url_for( url_for(
'calendars.calendar.day.admin.admin', 'calendar.day.admin.admin',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,

View File

@@ -4,7 +4,7 @@
<div class="font-medium"> <div class="font-medium">
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.get', 'calendar.day.calendar_entries.calendar_entry.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,
@@ -23,7 +23,7 @@
<div class="text-xs font-medium"> <div class="text-xs font-medium">
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.slots.slot.get', 'calendar.slots.slot.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
slot_id=entry.slot.id slot_id=entry.slot.id
), ),

View File

@@ -9,7 +9,7 @@
{% from 'macros/scrolling_menu.html' import scrolling_menu with context %} {% from 'macros/scrolling_menu.html' import scrolling_menu with context %}
{% call(entry) scrolling_menu('day-entries-container', confirmed_entries) %} {% call(entry) scrolling_menu('day-entries-container', confirmed_entries) %}
<a <a
href="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.get', href="{{ url_for('calendar.day.calendar_entries.calendar_entry.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,

View File

@@ -3,7 +3,7 @@
{% call links.menu_row(id='day-admin-row', oob=oob) %} {% call links.menu_row(id='day-admin-row', oob=oob) %}
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.admin.admin', 'calendar.day.admin.admin',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,

View File

@@ -3,7 +3,7 @@
{% call links.menu_row(id='day-row', oob=oob) %} {% call links.menu_row(id='day-row', oob=oob) %}
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.show_day', 'calendar.day.show_day',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=day_date.year, year=day_date.year,
month=day_date.month, month=day_date.month,

View File

@@ -7,7 +7,7 @@
<form <form
class="space-y-3 mt-4" class="space-y-3 mt-4"
hx-put="{{ url_for( hx-put="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.put', 'calendar.day.calendar_entries.calendar_entry.put',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, month=month, year=year, day=day, month=month, year=year,
entry_id=entry.id entry_id=entry.id
@@ -162,7 +162,7 @@
type="button" type="button"
class="{{ styles.cancel_button }}" class="{{ styles.cancel_button }}"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.get', 'calendar.day.calendar_entries.calendar_entry.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, month=month, year=year, day=day, month=month, year=year,
entry_id=entry.id entry_id=entry.id

View File

@@ -111,7 +111,7 @@
type="button" type="button"
class="{{styles.pre_action_button}}" class="{{styles.pre_action_button}}"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.get_edit', 'calendar.day.calendar_entries.calendar_entry.get_edit',
entry_id=entry.id, entry_id=entry.id,
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,

View File

@@ -28,7 +28,7 @@
{% from 'macros/admin_nav.html' import admin_nav_item %} {% from 'macros/admin_nav.html' import admin_nav_item %}
{{admin_nav_item( {{admin_nav_item(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.admin.admin', 'calendar.day.calendar_entries.calendar_entry.admin.admin',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -2,7 +2,7 @@
{% if entry.state == 'provisional' %} {% if entry.state == 'provisional' %}
<form <form
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.confirm_entry', 'calendar.day.calendar_entries.calendar_entry.confirm_entry',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,
@@ -31,7 +31,7 @@
</form> </form>
<form <form
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.decline_entry', 'calendar.day.calendar_entries.calendar_entry.decline_entry',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,
@@ -62,7 +62,7 @@
{% if entry.state == 'confirmed' %} {% if entry.state == 'confirmed' %}
<form <form
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.provisional_entry', 'calendar.day.calendar_entries.calendar_entry.provisional_entry',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -1,7 +1,7 @@
{% for search_post in search_posts %} {% for search_post in search_posts %}
<form <form
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.add_post', 'calendar.day.calendar_entries.calendar_entry.add_post',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,
@@ -41,7 +41,7 @@
<div <div
id="post-search-sentinel-{{ page }}" id="post-search-sentinel-{{ page }}"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.search_posts', 'calendar.day.calendar_entries.calendar_entry.search_posts',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -23,7 +23,7 @@
data-confirm-cancel-text="Cancel" data-confirm-cancel-text="Cancel"
data-confirm-event="confirmed" data-confirm-event="confirmed"
hx-delete="{{ url_for( hx-delete="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.remove_post', 'calendar.day.calendar_entries.calendar_entry.remove_post',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,
@@ -55,7 +55,7 @@
placeholder="Search posts..." placeholder="Search posts..."
class="w-full px-3 py-2 border rounded text-sm" class="w-full px-3 py-2 border rounded text-sm"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.search_posts', 'calendar.day.calendar_entries.calendar_entry.search_posts',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -44,7 +44,7 @@
id="ticket-form-{{entry.id}}" id="ticket-form-{{entry.id}}"
class="{% if entry.ticket_price is not none %}hidden{% endif %} space-y-3 mt-2 p-3 border rounded bg-stone-50" class="{% if entry.ticket_price is not none %}hidden{% endif %} space-y-3 mt-2 p-3 border rounded bg-stone-50"
hx-post="{{ url_for( hx-post="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.update_tickets', 'calendar.day.calendar_entries.calendar_entry.update_tickets',
entry_id=entry.id, entry_id=entry.id,
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,

View File

@@ -1,7 +1,7 @@
{% import 'macros/links.html' as links %} {% import 'macros/links.html' as links %}
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.get', 'calendar.day.calendar_entries.calendar_entry.ticket_types.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
entry_id=entry.id, entry_id=entry.id,
year=year, year=year,

View File

@@ -3,7 +3,7 @@
{% call links.menu_row(id='entry-admin-row', oob=oob) %} {% call links.menu_row(id='entry-admin-row', oob=oob) %}
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.admin.admin', 'calendar.day.calendar_entries.calendar_entry.admin.admin',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -3,7 +3,7 @@
{% call links.menu_row(id='entry-row', oob=oob) %} {% call links.menu_row(id='entry-row', oob=oob) %}
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.get', 'calendar.day.calendar_entries.calendar_entry.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
day=day, day=day,
month=month, month=month,

View File

@@ -1,7 +1,7 @@
{% import 'macros/links.html' as links %} {% import 'macros/links.html' as links %}
{% if calendars %} {% if calendars %}
{% for calendar in calendars %} {% for calendar in calendars %}
{% call links.link(url_for('calendars.calendar.get', calendar_slug=calendar.slug), hx_select_search, select_colours, True, aclass=styles.nav_button_less_pad) %} {% call links.link(url_for('calendar.get', calendar_slug=calendar.slug), hx_select_search, select_colours, True, aclass=styles.nav_button_less_pad) %}
<i class="fa fa-calendar" aria-hidden="true"></i> <i class="fa fa-calendar" aria-hidden="true"></i>
<div>{{ calendar.name }}</div> <div>{{ calendar.name }}</div>
{% endcall %} {% endcall %}

View File

@@ -3,7 +3,7 @@
<div id="slot-errors" class="mt-2 text-sm text-red-600"></div> <div id="slot-errors" class="mt-2 text-sm text-red-600"></div>
<form <form
class="space-y-3 mt-4" class="space-y-3 mt-4"
hx-put="{{ url_for('calendars.calendar.slots.slot.put', hx-put="{{ url_for('calendar.slots.slot.put',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
slot_id=slot.id) }}" slot_id=slot.id) }}"
hx-target="#slot-{{ slot.id }}" hx-target="#slot-{{ slot.id }}"
@@ -153,7 +153,7 @@
<button <button
type="button" type="button"
class="{{styles.cancel_button}}" class="{{styles.cancel_button}}"
hx-get="{{ url_for('calendars.calendar.slots.slot.get_view', hx-get="{{ url_for('calendar.slots.slot.get_view',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
slot_id=slot.id) }}" slot_id=slot.id) }}"
hx-target="#slot-{{ slot.id }}" hx-target="#slot-{{ slot.id }}"

View File

@@ -54,7 +54,7 @@
type="button" type="button"
class="{{styles.pre_action_button}}" class="{{styles.pre_action_button}}"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.slots.slot.get_edit', 'calendar.slots.slot.get_edit',
slot_id=slot.id, slot_id=slot.id,
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
) }}" ) }}"

View File

@@ -1,5 +1,5 @@
<form <form
hx-post="{{ url_for('calendars.calendar.slots.post', hx-post="{{ url_for('calendar.slots.post',
calendar_slug=calendar.slug) }}" calendar_slug=calendar.slug) }}"
hx-target="#slots-table" hx-target="#slots-table"
hx-select="#slots-table" hx-select="#slots-table"
@@ -98,7 +98,7 @@
<button <button
type="button" type="button"
class="{{styles.cancel_button}}" class="{{styles.cancel_button}}"
hx-get="{{ url_for('calendars.calendar.slots.add_button', hx-get="{{ url_for('calendar.slots.add_button',
calendar_slug=calendar.slug) }}" calendar_slug=calendar.slug) }}"
hx-target="#slot-add-container" hx-target="#slot-add-container"
hx-swap="innerHTML" hx-swap="innerHTML"

View File

@@ -2,7 +2,7 @@
<button <button
type="button" type="button"
class="{{styles.pre_action_button}}" class="{{styles.pre_action_button}}"
hx-get="{{ url_for('calendars.calendar.slots.add_form', hx-get="{{ url_for('calendar.slots.add_form',
calendar_slug=calendar.slug) }}" calendar_slug=calendar.slug) }}"
hx-target="#slot-add-container" hx-target="#slot-add-container"
hx-swap="innerHTML" hx-swap="innerHTML"

View File

@@ -45,7 +45,7 @@
data-confirm-confirm-text="Yes, delete it" data-confirm-confirm-text="Yes, delete it"
data-confirm-cancel-text="Cancel" data-confirm-cancel-text="Cancel"
data-confirm-event="confirmed" data-confirm-event="confirmed"
hx-delete="{{ url_for('calendars.calendar.slots.slot.slot_delete', hx-delete="{{ url_for('calendar.slots.slot.slot_delete',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
slot_id=s.id) }}" slot_id=s.id) }}"
hx-target="#slots-table" hx-target="#slots-table"

View File

@@ -3,7 +3,7 @@
<div id="ticket-errors" class="mt-2 text-sm text-red-600"></div> <div id="ticket-errors" class="mt-2 text-sm text-red-600"></div>
<form <form
class="space-y-3 mt-4" class="space-y-3 mt-4"
hx-put="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.put', hx-put="{{ url_for('calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.put',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=year, year=year,
month=month, month=month,
@@ -70,7 +70,7 @@
<button <button
type="button" type="button"
class="{{styles.cancel_button}}" class="{{styles.cancel_button}}"
hx-get="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get_view', hx-get="{{ url_for('calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get_view',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
entry_id=entry.id, entry_id=entry.id,
year=year, year=year,

View File

@@ -33,7 +33,7 @@
type="button" type="button"
class="{{styles.pre_action_button}}" class="{{styles.pre_action_button}}"
hx-get="{{ url_for( hx-get="{{ url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get_edit', 'calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get_edit',
ticket_type_id=ticket_type.id, ticket_type_id=ticket_type.id,
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=year, year=year,

View File

@@ -3,7 +3,7 @@
{% call links.menu_row(id='ticket_type-row', oob=oob) %} {% call links.menu_row(id='ticket_type-row', oob=oob) %}
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get', 'calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=year, year=year,
month=month, month=month,

View File

@@ -1,5 +1,5 @@
<form <form
hx-post="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.post', hx-post="{{ url_for('calendar.day.calendar_entries.calendar_entry.ticket_types.post',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
entry_id=entry.id, entry_id=entry.id,
year=year, year=year,
@@ -55,7 +55,7 @@
<button <button
type="button" type="button"
class="{{styles.cancel_button}}" class="{{styles.cancel_button}}"
hx-get="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.add_button', hx-get="{{ url_for('calendar.day.calendar_entries.calendar_entry.ticket_types.add_button',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
entry_id=entry.id, entry_id=entry.id,
year=year, year=year,

View File

@@ -1,6 +1,6 @@
<button <button
class="{{styles.action_button}}" class="{{styles.action_button}}"
hx-get="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.add_form', hx-get="{{ url_for('calendar.day.calendar_entries.calendar_entry.ticket_types.add_form',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
entry_id=entry.id, entry_id=entry.id,
year=year, year=year,

View File

@@ -4,7 +4,7 @@
<div class="font-medium"> <div class="font-medium">
{% call links.link( {% call links.link(
url_for( url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get', 'calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=year, year=year,
month=month, month=month,
@@ -35,7 +35,7 @@
data-confirm-confirm-text="Yes, delete it" data-confirm-confirm-text="Yes, delete it"
data-confirm-cancel-text="Cancel" data-confirm-cancel-text="Cancel"
data-confirm-event="confirmed" data-confirm-event="confirmed"
hx-delete="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.delete', hx-delete="{{ url_for('calendar.day.calendar_entries.calendar_entry.ticket_types.ticket_type.delete',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
year=year, year=year,
month=month, month=month,

View File

@@ -2,7 +2,7 @@
{% macro header_row(oob=False) %} {% macro header_row(oob=False) %}
{% call links.menu_row(id='ticket_types-row', oob=oob) %} {% call links.menu_row(id='ticket_types-row', oob=oob) %}
{% call links.link(url_for( {% call links.link(url_for(
'calendars.calendar.day.calendar_entries.calendar_entry.ticket_types.get', 'calendar.day.calendar_entries.calendar_entry.ticket_types.get',
calendar_slug=calendar.slug, calendar_slug=calendar.slug,
entry_id=entry.id, entry_id=entry.id,
year=year, year=year,