Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3769 - Short course template > Add dates to key details #1055

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ <h5 class="body body--two key-details__sub-heading">Fees</h5>
</ul>
</div>
{% endif %}
{% if page.dates %}
<div class="key-details__section key-details__section--dates">
<h5 class="body body--two key-details__sub-heading">Dates</h5>
<ul class="key-details__list">
<li class="key-details__list-item">
{{ page.dates|richtext }}
</li>
</ul>
</div>
{% endif %}
{% if page.location %}
<div class="key-details__section key-details__section--location">
<h5 class="body body--two key-details__sub-heading">Location</h5>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ context:
introduction_image: True
introduction: 'Understand the purpose of design thinking in promoting innovation and learn real-world applications and strategies for design thinking.'
body: '<p>At the RCA, we teach design thinking, training designers who go on to lead global brands worldwide as creative directors and CEOs. In contrast to standard, linear approaches that build on tested models, design thinking is creatively structured, analytic and responsive. It draws in diverse disciplines and multiple areas of expertise and exploration, starting with the core premise that everything is a design problem.</p><p>Through the application of this informed analysis within business-driven, public-facing and community-centred contexts, design thinking can produce innovation, which in turn enables brands to remain competitive in changing markets.</p>'
dates: '<p>March 3, 2024</p>'
location: '<a href="#">Royal College of Art Kensington Gore</a>'
shortcourse_details_register_link: '#'
about:
Expand Down
19 changes: 19 additions & 0 deletions rca/shortcourses/migrations/0038_shortcoursepage_dates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.11 on 2024-10-15 03:20

from django.db import migrations
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
("shortcourses", "0037_required_title_and_play_button_label_gallery_block"),
]

operations = [
migrations.AddField(
model_name="shortcoursepage",
name="dates",
field=wagtail.fields.RichTextField(blank=True),
),
]
2 changes: 2 additions & 0 deletions rca/shortcourses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class ShortCoursePage(ContactFieldsMixin, BasePage):
null=True,
related_name="+",
)
dates = RichTextField(blank=True, features=["link"])
location = RichTextField(blank=True, features=["link"])
introduction = models.CharField(max_length=500, blank=True)

Expand Down Expand Up @@ -271,6 +272,7 @@ class ShortCoursePage(ContactFieldsMixin, BasePage):
]
key_details_panels = [
InlinePanel("fee_items", label="Fees"),
FieldPanel("dates"),
FieldPanel("location"),
FieldPanel("show_register_link"),
InlinePanel("subjects", label=_("Subjects")),
Expand Down
Loading