7 Commits

8 changed files with 241 additions and 15 deletions

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-16 12:38+0000\n"
"POT-Creation-Date: 2026-03-17 11:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,6 +18,14 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: home/templates/home/course_module_page.html:21
msgid "Lessons"
msgstr ""
#: home/templates/home/course_module_page.html:28
msgid "No lessons yet."
msgstr ""
#: home/templates/home/course_page.html:26
msgid "Modules"
msgstr ""

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-16 12:38+0000\n"
"POT-Creation-Date: 2026-03-17 11:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,6 +20,16 @@ msgstr ""
"(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && "
"n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#: home/templates/home/course_module_page.html:21
msgid "Lessons"
msgstr "Lekcje"
#: home/templates/home/course_module_page.html:28
#, fuzzy
#| msgid "No modules yet."
msgid "No lessons yet."
msgstr "Brak lekcji."
#: home/templates/home/course_page.html:26
msgid "Modules"
msgstr "Moduły"
@@ -32,7 +42,9 @@ msgstr "Brak modułów."
msgid ""
"You need to be logged in to access this course. Please log in or sign up to "
"view the modules."
msgstr "Musisz być zalogowany, aby uzyskać dostęp do tego kursu. Zaloguj się lub zarejestruj, aby zobaczyć moduły."
msgstr ""
"Musisz być zalogowany, aby uzyskać dostęp do tego kursu. Zaloguj się lub "
"zarejestruj, aby zobaczyć moduły."
#: home/templates/home/course_page.html:40
#: home/templates/home/event_page.html:40
@@ -56,7 +68,9 @@ msgstr "Kup kurs"
#: home/templates/home/event_page.html:25
msgid ""
"This event has already ended. Please check our calendar for upcoming events."
msgstr "To wydarzenie już się zakończyło. Sprawdź nasz kalendarz, aby zobaczyć nadchodzące wydarzenia."
msgstr ""
"To wydarzenie już się zakończyło. Sprawdź nasz kalendarz, aby zobaczyć "
"nadchodzące wydarzenia."
#: home/templates/home/event_page.html:29
msgid "You are signed up for this event. We look forward to seeing you there!"
@@ -70,18 +84,67 @@ msgstr "Zrezygnuj"
msgid ""
"You need to be logged in to sign up for this event. Please log in or sign up "
"to reserve your spot."
msgstr "Musisz być zalogowany, aby zapisać się na to wydarzenie. Zaloguj się lub zarejestruj, aby zarezerwować swoje miejsce."
msgstr ""
"Musisz być zalogowany, aby zapisać się na to wydarzenie. Zaloguj się lub "
"zarejestruj, aby zarezerwować swoje miejsce."
#: home/templates/home/event_page.html:48
msgid ""
"This event is fully booked. Please check back later for any cancellations."
msgstr "To wydarzenie jest zarezerwowane w pełni. Sprawdź później w przypadku rezygnacji innych uczestników."
msgstr ""
"To wydarzenie jest zarezerwowane w pełni. Sprawdź później w przypadku "
"rezygnacji innych uczestników."
#: home/templates/home/event_page.html:52
msgid ""
"You are not signed up for this event. Please sign up to reserve your spot."
msgstr "Nie jesteś zapisany na to wydarzenie. Zapisz się, aby zarezerwować swoje miejsce!"
msgstr ""
"Nie jesteś zapisany na to wydarzenie. Zapisz się, aby zarezerwować swoje "
"miejsce!"
#: home/templates/home/event_page.html:54
msgid "Sign Up for Event"
msgstr "Zapisz się"
#: home/templates/home/welcome_page.html:6
msgid "Visit the Wagtail website"
msgstr ""
#: home/templates/home/welcome_page.html:15
msgid "View the release notes"
msgstr ""
#: home/templates/home/welcome_page.html:27
msgid "Welcome to your new Wagtail site!"
msgstr ""
#: home/templates/home/welcome_page.html:28
msgid ""
"Please feel free to <a href=\"https://github.com/wagtail/wagtail/wiki/"
"Slack\">join our community on Slack</a>, or get started with one of the "
"links below."
msgstr ""
#: home/templates/home/welcome_page.html:35
msgid "Wagtail Documentation"
msgstr ""
#: home/templates/home/welcome_page.html:36
msgid "Topics, references, & how-tos"
msgstr ""
#: home/templates/home/welcome_page.html:42
msgid "Tutorial"
msgstr ""
#: home/templates/home/welcome_page.html:43
msgid "Build your first Wagtail site"
msgstr ""
#: home/templates/home/welcome_page.html:49
msgid "Admin Interface"
msgstr ""
#: home/templates/home/welcome_page.html:50
msgid "Create your superuser first!"
msgstr ""

View File

@@ -0,0 +1,27 @@
# Generated by Django 6.0.3 on 2026-03-17 11:34
import django.db.models.deletion
import wagtail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0015_eventpage_end_eventpage_recurrence_endless_and_more'),
('wagtailcore', '0096_referenceindex_referenceindex_source_object_and_more'),
]
operations = [
migrations.CreateModel(
name='ModuleLessonPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
('body', wagtail.fields.RichTextField(blank=True)),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
]

View File

@@ -57,6 +57,7 @@ class CoursePage(Page):
FieldPanel("body"),
FieldPanel("allowed_groups", widget=CheckboxSelectMultiple),
]
subpage_types = ["home.CourseModulePage"]
class CourseModulePage(Page):
@@ -78,6 +79,30 @@ class CourseModulePage(Page):
return self.title
content_panels = Page.content_panels + ["body"]
subpage_types = ["home.ModuleLessonPage"]
parent_page_types = ["home.CoursePage"]
class ModuleLessonPage(Page):
body = RichTextField(blank=True)
@property
def module(self):
if hasattr(self, "get_parent"):
parent = self.get_parent()
if parent and hasattr(parent, "specific"):
return parent.specific
return None
@property
def full_title(self):
module = self.module
if module:
return f"{module.full_title} - {self.title}"
return self.title
content_panels = Page.content_panels + ["body"]
parent_page_types = ["home.CourseModulePage"]
class EventPageTag(TaggedItemBase):

View File

@@ -1,6 +1,5 @@
{% extends "base.html" %}
{% load static %}
{% load wagtailcore_tags %}
{% load static i18n wagtailcore_tags %}
{% block title %}{{ page.full_title }}{% endblock %}
@@ -18,4 +17,15 @@
</h2>
{{ page.body|richtext }}
<h3 class="not-prose text-lg mt-8 mb-4 text-gray-700 font-semibold">{% trans "Lessons" %}</h3>
<ul class="list-disc list-inside">
{% for lesson in page.get_children.specific.live %}
<li>
<a href="{{ lesson.url }}" class="text-blue-600 hover:underline">{{ lesson.title }}</a>
</li>
{% empty %}
<li>{% trans "No lessons yet." %}</li>
{% endfor %}
</ul>
{% endblock content %}

View File

@@ -0,0 +1,25 @@
{% extends "base.html" %}
{% load static wagtailcore_tags i18n %}
{% block title %}{{ page.full_title }}{% endblock %}
{% block body_class %}template-modulelessonpage{% endblock %}
{% block extra_css %}
{% endblock extra_css %}
{% block content_class %}prose{% endblock content_class %}
{% block content %}
<h2 class="not-prose text-xl mb-4 text-gray-700">
<a href="{{ page.module.course.url }}" class="font-bold">{{ page.module.course.title }}</a>
&raquo;
<a href="{{ page.module.url }}" class="font-bold">{{ page.module.title }}</a>
&raquo;
<span class="text-gray-500">{{ page.title }}</span>
</h2>
{{ page.body|richtext }}
{% endblock content %}

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-16 12:38+0000\n"
"POT-Creation-Date: 2026-03-17 11:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -38,11 +38,11 @@ msgstr ""
msgid "Logout"
msgstr ""
#: kursy/templates/header.html:12
#: kursy/templates/header.html:12 kursy/templates/occurrence_detail.html:39
msgid "Login"
msgstr ""
#: kursy/templates/header.html:13
#: kursy/templates/header.html:13 kursy/templates/occurrence_detail.html:42
msgid "Sign Up"
msgstr ""
@@ -50,6 +50,39 @@ msgstr ""
msgid "Search courses..."
msgstr ""
#: kursy/templates/occurrence_detail.html:24
msgid ""
"This event has already ended. Please check our calendar for upcoming events."
msgstr ""
#: kursy/templates/occurrence_detail.html:28
msgid "You are signed up for this event. We look forward to seeing you there!"
msgstr ""
#: kursy/templates/occurrence_detail.html:31
msgid "Cancel Sign Up"
msgstr ""
#: kursy/templates/occurrence_detail.html:37
msgid ""
"You need to be logged in to sign up for this event. Please log in or sign up "
"to reserve your spot."
msgstr ""
#: kursy/templates/occurrence_detail.html:47
msgid ""
"This event is fully booked. Please check back later for any cancellations."
msgstr ""
#: kursy/templates/occurrence_detail.html:51
msgid ""
"You are not signed up for this event. Please sign up to reserve your spot."
msgstr ""
#: kursy/templates/occurrence_detail.html:53
msgid "Sign Up for Event"
msgstr ""
#: kursy/templates/profile.html:6
msgid "Hello, "
msgstr ""

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-16 12:38+0000\n"
"POT-Creation-Date: 2026-03-17 11:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -40,11 +40,11 @@ msgstr "Ładowanie..."
msgid "Logout"
msgstr "Wyloguj się"
#: kursy/templates/header.html:12
#: kursy/templates/header.html:12 kursy/templates/occurrence_detail.html:39
msgid "Login"
msgstr "Zaloguj się"
#: kursy/templates/header.html:13
#: kursy/templates/header.html:13 kursy/templates/occurrence_detail.html:42
msgid "Sign Up"
msgstr "Zarejestruj się"
@@ -52,6 +52,41 @@ msgstr "Zarejestruj się"
msgid "Search courses..."
msgstr "Szukaj kursów..."
#: kursy/templates/occurrence_detail.html:24
msgid ""
"This event has already ended. Please check our calendar for upcoming events."
msgstr ""
#: kursy/templates/occurrence_detail.html:28
msgid "You are signed up for this event. We look forward to seeing you there!"
msgstr ""
#: kursy/templates/occurrence_detail.html:31
#, fuzzy
#| msgid "Sign Up"
msgid "Cancel Sign Up"
msgstr "Zrezygnuj"
#: kursy/templates/occurrence_detail.html:37
msgid ""
"You need to be logged in to sign up for this event. Please log in or sign up "
"to reserve your spot."
msgstr "Musisz być zalogowany, aby zapisać się na to wydarzenie. Zaloguj się lub zarejestruj, aby zarezerwować swoje miejsce."
#: kursy/templates/occurrence_detail.html:47
msgid ""
"This event is fully booked. Please check back later for any cancellations."
msgstr "To wydarzenie jest w pełni zarezerwowane. Sprawdź ponownie później w przypadku zwolnienia miejsc."
#: kursy/templates/occurrence_detail.html:51
msgid ""
"You are not signed up for this event. Please sign up to reserve your spot."
msgstr "Nie jesteś zapisany na to wydarzenie. Zapisz się, aby zarezerwować swoje miejsce."
#: kursy/templates/occurrence_detail.html:53
msgid "Sign Up for Event"
msgstr "Zapisz się"
#: kursy/templates/profile.html:6
msgid "Hello, "
msgstr "Witaj, "