Skip to content
Snippets Groups Projects
Commit d8d79e98 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

run hooks, add notice, more info display, more data

parent b7d71520
No related branches found
No related tags found
2 merge requests!1208Release,!1204Release
Pipeline #20346 passed
# Generated by Django 5.0.7 on 2024-12-18 07:15
import django.utils.timezone
import wagtail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("main", "0139_maincareerpage_recipient_emails"),
]
operations = [
migrations.AddField(
model_name="maincareerpage",
name="closing_date",
field=models.DateField(
default=django.utils.timezone.now, verbose_name="Datum uzavření"
),
preserve_default=False,
),
migrations.AddField(
model_name="maincareerpage",
name="proceedings_url",
field=models.URLField(
blank=True,
help_text="Na Redmine, Fóru apod.",
null=True,
verbose_name="Odkaz na průběh výběrového řízení",
),
),
migrations.AddField(
model_name="maincareerpage",
name="result",
field=wagtail.fields.RichTextField(
blank=True, null=True, verbose_name="Výsledek výběrového řízení"
),
),
migrations.AlterField(
model_name="maincareerpage",
name="content",
field=wagtail.fields.RichTextField(
blank=True, null=True, verbose_name="Text nabídky"
),
),
]
......@@ -483,25 +483,46 @@ class MainCareerPage(
null=False,
)
created_date = models.DateField(
verbose_name="Datum vytvoření", blank=False, null=False, default=date.today
)
submission_end_date = models.DateField(
verbose_name="Datum konce přihlášek",
blank=False,
null=False,
)
created_date = models.DateField(
verbose_name="Datum vytvoření", blank=False, null=False, default=date.today
closing_date = models.DateField(
verbose_name="Datum uzavření",
blank=False,
null=False,
)
content = RichTextField(
"Text nabídky", blank=True, features=RICH_TEXT_DEFAULT_FEATURES
"Text nabídky", blank=True, null=True, features=RICH_TEXT_DEFAULT_FEATURES
)
result = RichTextField(
"Výsledek výběrového řízení",
blank=True,
null=True,
features=RICH_TEXT_DEFAULT_FEATURES,
)
proceedings_url = models.URLField(
verbose_name="Odkaz na průběh výběrového řízení",
help_text="Na Redmine, Fóru apod.",
blank=True,
null=True,
)
content_panels = Page.content_panels + [
MultiFieldPanel(
[
FieldPanel("submission_end_date"),
FieldPanel("created_date"),
FieldPanel("submission_end_date"),
FieldPanel("closing_date"),
],
"Datumy",
),
......@@ -511,7 +532,9 @@ class MainCareerPage(
FieldPanel("time_cost"),
FieldPanel("employment_relationship"),
FieldPanel("pay_rate"),
FieldPanel("proceedings_url"),
FieldPanel("content"),
FieldPanel("result"),
]
parent_page_types = ["main.MainCareersPage"]
......@@ -610,7 +633,7 @@ Odeslání přihlášky selhalo:
{errors}
""",
)
# Recreate form either way, since we don't want it to be prepopulated with data.
form = CareerSubmissionForm()
......@@ -621,6 +644,7 @@ Odeslání přihlášky selhalo:
"page": self,
"self": self,
"form": form,
"current_date": date.today(),
},
)
......
......@@ -12,12 +12,23 @@
<main role="main">
<section class="container--wide mb-4 xl:mb-20">
<div class="text-lg mb-6">
<strong>Přihlášky do</strong>: {{ page.submission_end_date }}<br>
{% if page.closing_date <= current_date %}
<div class="bg-red-400 border border-solid border-red-600 p-4 inline-block mb-6">
<strong>Přihlášky uzavřeny.</strong>
</div>
{% endif %}
<div class="text-lg mb-6 leading-6">
<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>Časová náročnost</strong>: {{ page.time_cost }}<br>
<strong>Místo výkonu práce</strong>: {{ page.location }}<br>
</div>
<div class="mb-6">
<div class="mb-6 prose prose-black max-w-screen-lg">
{{ page.content|richtext }}
</div>
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment