From 06db45cb0b77768042d352735c2957989f4d4a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexa=20Valentov=C3=A1?= <git@imaniti.org> Date: Tue, 4 Feb 2025 10:58:21 +0100 Subject: [PATCH] better calendars, hooks, change text --- calendar_utils/models.py | 3 ++- main/blocks.py | 10 ++++------ ...r_maincareerpage_employment_relationship.py | 18 ++++++++++++++++++ main/models.py | 2 +- main/templates/main/main_career_page.html | 4 ++-- .../molecules/boxes/main/career_box.html | 4 ++-- 6 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 main/migrations/0144_alter_maincareerpage_employment_relationship.py diff --git a/calendar_utils/models.py b/calendar_utils/models.py index 550f7239..4454dabf 100644 --- a/calendar_utils/models.py +++ b/calendar_utils/models.py @@ -76,7 +76,8 @@ class Calendar(models.Model): event_list = icalevents.events( url=self.url, start=now() - timedelta(days=30), - end=now() + timedelta(days=365), # Pull a year ahead due to "popular" demand. + end=now() + + timedelta(days=365), # Pull a year ahead due to "popular" demand. ) self.handle_event_list(event_list) diff --git a/main/blocks.py b/main/blocks.py index 257ba5ba..dc9d7f8c 100644 --- a/main/blocks.py +++ b/main/blocks.py @@ -13,9 +13,8 @@ from wagtail.images.blocks import ImageChooserBlock from shared.blocks import CandidateBlock as SharedCandidateBlockMixin from shared.blocks import CandidateListBlock from shared.blocks import CandidateListBlock as SharedCandidateListBlockMixin -from shared.blocks import ( - CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin, -) +from shared.blocks import \ + CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin from shared.blocks import ( CardLinkBlockMixin, CardLinkWithHeadlineBlockMixin, @@ -28,9 +27,8 @@ from shared.blocks import ( ProgramGroupBlockMixin, ) from shared.blocks import ProgramGroupBlockPopout as SharedProgramGroupBlockPopout -from shared.blocks import ( - ProgramGroupWithCandidatesBlock as SharedProgramGroupWithCandidatesBlockMixin, -) +from shared.blocks import \ + ProgramGroupWithCandidatesBlock as SharedProgramGroupWithCandidatesBlockMixin from shared.blocks import SecondaryCandidateBlock as SharedSecondaryCandidateBlockMixin from shared.blocks import StreamBlock, TeamBlockMixin diff --git a/main/migrations/0144_alter_maincareerpage_employment_relationship.py b/main/migrations/0144_alter_maincareerpage_employment_relationship.py new file mode 100644 index 00000000..22272715 --- /dev/null +++ b/main/migrations/0144_alter_maincareerpage_employment_relationship.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.7 on 2025-02-04 08:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0143_alter_mainhomepage_popout_button_content'), + ] + + operations = [ + migrations.AlterField( + model_name='maincareerpage', + name='employment_relationship', + field=models.CharField(help_text="NapĹ™. 'Rámcová smlouva na dobu urÄŤitou'", max_length=128, verbose_name='Typ smlouvy'), + ), + ] diff --git a/main/models.py b/main/models.py index eece3ce8..08ce117d 100644 --- a/main/models.py +++ b/main/models.py @@ -523,7 +523,7 @@ class MainCareerPage( ) employment_relationship = models.CharField( - verbose_name="PomÄ›r", + verbose_name="Typ smlouvy", help_text="NapĹ™. 'Rámcová smlouva na dobu urÄŤitou'", max_length=128, blank=False, diff --git a/main/templates/main/main_career_page.html b/main/templates/main/main_career_page.html index c77620a3..97172130 100644 --- a/main/templates/main/main_career_page.html +++ b/main/templates/main/main_career_page.html @@ -26,8 +26,8 @@ <strong>ZveĹ™ejnÄ›no</strong>: {{ page.created_date }}<br> <strong>PĹ™ihlášky do</strong>: {{ page.submission_end_date }}<br> <strong>UzavĂrá se</strong>: {{ page.closing_date }}<br> - <strong>Plat</strong>: {{ page.pay_rate }}<br> - <strong>PomÄ›r</strong>: {{ page.employment_relationship }}<br> + <strong>OdmÄ›na</strong>: {{ page.pay_rate }}<br> + <strong>Typ smlouvy</strong>: {{ page.employment_relationship }}<br> <strong>ÄŚasová nároÄŤnost</strong>: {{ page.time_cost }}<br> <strong>MĂsto vĂ˝konu práce</strong>: {{ page.location }}<br> diff --git a/shared/templates/styleguide2/includes/molecules/boxes/main/career_box.html b/shared/templates/styleguide2/includes/molecules/boxes/main/career_box.html index 0a139c46..dd32cbba 100644 --- a/shared/templates/styleguide2/includes/molecules/boxes/main/career_box.html +++ b/shared/templates/styleguide2/includes/molecules/boxes/main/career_box.html @@ -8,8 +8,8 @@ <div class="text-xl p-4"> <strong>ÄŚasová nároÄŤnost</strong>: {{ career.time_cost }}<br> - <strong>PomÄ›r</strong>: {{ career.employment_relationship }}<br> - <strong>Plat</strong>: {{ career.pay_rate }}<br> + <strong>Typ smlouvy</strong>: {{ career.employment_relationship }}<br> + <strong>OdmÄ›na</strong>: {{ career.pay_rate }}<br> </div> <div class="flex justify-between items-end"> -- GitLab