Add location information
This commit is contained in:
parent
b0f1191d8f
commit
1a9d981c7d
3 changed files with 24 additions and 1 deletions
|
@ -54,5 +54,16 @@
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.location_name and page.location_url %}
|
||||||
|
<span class="icon-text">
|
||||||
|
<a href="{{ page.location_url }}">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fas fa-lg fa-map-marker-alt"></i>
|
||||||
|
</span>
|
||||||
|
<span>{{ page.location_name }}</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endwagtailpagecache %}
|
{% endwagtailpagecache %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 5.0.1 on 2024-03-01 16:55
|
# Generated by Django 5.0.1 on 2024-03-01 17:44
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import django.utils.timezone
|
import django.utils.timezone
|
||||||
|
@ -163,6 +163,8 @@ class Migration(migrations.Migration):
|
||||||
("duration", models.DurationField()),
|
("duration", models.DurationField()),
|
||||||
("slides_url", models.URLField(blank=True)),
|
("slides_url", models.URLField(blank=True)),
|
||||||
("video_url", models.URLField(blank=True)),
|
("video_url", models.URLField(blank=True)),
|
||||||
|
("location_name", models.CharField(blank=True, max_length=64)),
|
||||||
|
("location_url", models.URLField(blank=True)),
|
||||||
(
|
(
|
||||||
"hero_image",
|
"hero_image",
|
||||||
models.ForeignKey(
|
models.ForeignKey(
|
||||||
|
|
|
@ -24,6 +24,9 @@ class TalkPage(BaseContentPage):
|
||||||
slides_url = models.URLField(blank=True)
|
slides_url = models.URLField(blank=True)
|
||||||
video_url = models.URLField(blank=True)
|
video_url = models.URLField(blank=True)
|
||||||
|
|
||||||
|
location_name = models.CharField(max_length=64, blank=True)
|
||||||
|
location_url = models.URLField(blank=True)
|
||||||
|
|
||||||
content_panels = BaseContentPage.content_panels + [
|
content_panels = BaseContentPage.content_panels + [
|
||||||
MultiFieldPanel(
|
MultiFieldPanel(
|
||||||
[
|
[
|
||||||
|
@ -32,6 +35,13 @@ class TalkPage(BaseContentPage):
|
||||||
],
|
],
|
||||||
heading="Media",
|
heading="Media",
|
||||||
),
|
),
|
||||||
|
MultiFieldPanel(
|
||||||
|
[
|
||||||
|
FieldPanel("location_name"),
|
||||||
|
FieldPanel("location_url"),
|
||||||
|
],
|
||||||
|
heading="Location",
|
||||||
|
),
|
||||||
FieldPanel("duration"),
|
FieldPanel("duration"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue