diff --git a/district/templates/district/base.html b/district/templates/district/base.html index 60c14b524c2a015abec1aedc03260530d433da83..572efba37b9029e39f1c0ef9aa3bc7ef489b10d3 100644 --- a/district/templates/district/base.html +++ b/district/templates/district/base.html @@ -221,7 +221,7 @@ </div> <div class="subnav-aside__item" :class="{'subnav-aside__item--visible': isCurrentView('calendar')}"> <div class="container container--default"> - {% include "shared/calendar_current_events_snippet.html" %} + {% include "shared/calendar_current_events_snippet.html" with calendar=page.root_page.calendar %} </div> </div> </aside> diff --git a/district/templates/district/district_calendar_page.html b/district/templates/district/district_calendar_page.html index 22af18e4bca60d4dd781c854b4110041124d5396..ea4930b2c32cedfe8a3dee305dd92d9abef275b4 100644 --- a/district/templates/district/district_calendar_page.html +++ b/district/templates/district/district_calendar_page.html @@ -3,8 +3,8 @@ {% block content %} <main> - <section class="my-8 lg:my-16 container-padding--zero lg:container-padding--auto"> - {% include "shared/calendar_current_events_snippet.html" with fullscreen=True %} - </section> + <section class="my-8 lg:my-16 container-padding--zero lg:container-padding--auto"> + {% include "shared/calendar_current_events_snippet.html" with fullscreen=True calendar=page.calendar %} + </section> </main> {% endblock %} diff --git a/district/templates/district/district_home_page.html b/district/templates/district/district_home_page.html index bfe820497549cabb7ea6535b1d24f615693c8180..9f2d901b1c79083ef7a6187c4932ce6c6459ee37 100644 --- a/district/templates/district/district_home_page.html +++ b/district/templates/district/district_home_page.html @@ -43,7 +43,7 @@ {% if page.show_calendar_on_hp %} <section class="my-8 lg:my-24 container-padding--zero lg:container-padding--auto"> - {% include "shared/calendar_current_events_snippet.html" %} + {% include "shared/calendar_current_events_snippet.html" with calendar=page.calendar %} </section> {% endif %} diff --git a/shared/templates/shared/calendar_current_events_snippet.html b/shared/templates/shared/calendar_current_events_snippet.html index 933b0615a5391f9407db1f067ca3a06c70935955..3a410a6ef053a0271a6aa594083103f9846646e2 100644 --- a/shared/templates/shared/calendar_current_events_snippet.html +++ b/shared/templates/shared/calendar_current_events_snippet.html @@ -1,23 +1,23 @@ {% load event_list %} -{% if page.root_page.has_calendar %} +{% if calendar %} <div class="calendar grid grid-cols-4"> <div class="col-span-4 xl:col-span-1"> <aside class="banner bg-orange-300 text-white h-full"> <i class="ico--calendar banner__icon"></i> <div class="banner__body"><h1 class="head-alt-md banner__cta">Kalendář</h1> {% if not fullscreen and page.calendar_page %} - <a href="{{ page.calendar_page.url }}"> - <button class="btn btn--white btn--fullwidth sm:btn--autowidth mt-8"> - <div class="btn__body">Zobrazit další</div> - </button> - </a> + <a href="{{ page.calendar_page.url }}"> + <button class="btn btn--white btn--fullwidth sm:btn--autowidth mt-8"> + <div class="btn__body">Zobrazit další</div> + </button> + </a> {% endif %} </div> </aside> </div> <div class="col-span-4 xl:col-span-3"> {% with full_list=fullscreen %} - {% with events=page.root_page.calendar|event_list:full_list %} + {% with events=calendar|event_list:full_list %} {% for event in events %} <div class="grid grid-cols-12 items-center calendar-table-row"> <div class="col-span-2 text-orange-300 head-alt-md calendar-table-row__col"> diff --git a/uniweb/templates/uniweb/uniweb_calendar_page.html b/uniweb/templates/uniweb/uniweb_calendar_page.html index 6825c028ec82ade5e6401d93d802e31c2677d791..cd393c8a43245b1ff2cdd3b72975bc1426435f4e 100644 --- a/uniweb/templates/uniweb/uniweb_calendar_page.html +++ b/uniweb/templates/uniweb/uniweb_calendar_page.html @@ -3,8 +3,8 @@ {% block content %} <main> - <section class="my-8 lg:my-16 container-padding--zero lg:container-padding--auto"> - {% include "shared/calendar_current_events_snippet.html" with fullscreen=True %} - </section> + <section class="my-8 lg:my-16 container-padding--zero lg:container-padding--auto"> + {% include "shared/calendar_current_events_snippet.html" with fullscreen=True calendar=page.calendar %} + </section> </main> {% endblock %}