Compare commits
1 Commits
de4bc92fce
...
9cba422aa9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cba422aa9 |
@@ -76,7 +76,7 @@
|
||||
<div class="overflow-x-auto scrollbar-hide" style="scroll-behavior: smooth;">
|
||||
<div class="flex gap-2 px-2">
|
||||
{% for entry in post.associated_entries %}
|
||||
{% set _entry_path = '/' + post.slug + '/calendars/' + entry.calendar.slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
|
||||
{% set _entry_path = '/' + post.slug + '/calendars/' + entry.calendar_slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
|
||||
<a
|
||||
href="{{ events_url(_entry_path) }}"
|
||||
class="flex flex-col gap-1 px-3 py-2 bg-stone-50 hover:bg-stone-100 rounded border border-stone-200 transition text-sm whitespace-nowrap flex-shrink-0 min-w-[180px]">
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<li class="flex items-start justify-between text-sm">
|
||||
<div>
|
||||
<div class="font-medium">
|
||||
{{ entry.name or entry.calendar.name }}
|
||||
{{ entry.name or entry.calendar_name }}
|
||||
</div>
|
||||
<div class="text-xs text-stone-500">
|
||||
{{ entry.start_at }}
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
{% set has_more_entries = has_more if has_more is defined else (associated_entries.has_more if associated_entries is defined else False) %}
|
||||
|
||||
{% for entry in entry_list %}
|
||||
{% set _entry_path = '/' + post.slug + '/calendars/' + entry.calendar.slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
|
||||
{% set _entry_path = '/' + post.slug + '/calendars/' + entry.calendar_slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
|
||||
<a
|
||||
href="{{ events_url(_entry_path) }}"
|
||||
class="{{styles.nav_button_less_pad}}"
|
||||
>
|
||||
{% if entry.calendar.post.feature_image %}
|
||||
<img src="{{ entry.calendar.post.feature_image }}"
|
||||
alt="{{ entry.calendar.post.title }}"
|
||||
{% if post.feature_image %}
|
||||
<img src="{{ post.feature_image }}"
|
||||
alt="{{ post.title }}"
|
||||
class="w-8 h-8 rounded object-cover flex-shrink-0" />
|
||||
{% else %}
|
||||
<div class="w-8 h-8 rounded bg-stone-200 flex-shrink-0"></div>
|
||||
|
||||
@@ -60,6 +60,8 @@ class CalendarEntryDTO:
|
||||
ticket_count: int | None = None
|
||||
calendar_name: str | None = None
|
||||
calendar_slug: str | None = None
|
||||
calendar_container_id: int | None = None
|
||||
calendar_container_type: str | None = None
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -42,6 +42,8 @@ def _entry_to_dto(entry: CalendarEntry) -> CalendarEntryDTO:
|
||||
ticket_count=entry.ticket_count,
|
||||
calendar_name=cal.name if cal else None,
|
||||
calendar_slug=cal.slug if cal else None,
|
||||
calendar_container_id=cal.container_id if cal else None,
|
||||
calendar_container_type=cal.container_type if cal else None,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user