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

work for hot, contact us, living strategy pages + misc #40

Merged
merged 3 commits into from
Sep 4, 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
25 changes: 25 additions & 0 deletions app/core/migrations/0014_errorpage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.7 on 2024-09-03 17:59

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('wagtailcore', '0089_log_entry_data_json_null_to_object'),
('core', '0013_delete_partnertype'),
]

operations = [
migrations.CreateModel(
name='ErrorPage',
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')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
]
6 changes: 6 additions & 0 deletions app/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
from wagtail.models import Page
from wagtail.fields import StreamField, RichTextField
from wagtail.blocks import CharBlock, StreamBlock, StructBlock, URLBlock, RichTextBlock, PageChooserBlock
from wagtail.documents.blocks import DocumentChooserBlock
from wagtail.snippets.models import register_snippet
from wagtail.admin.panels import FieldPanel, MultiFieldPanel, InlinePanel


class ErrorPage(Page):
max_count = 1


@register_snippet
class Partner(models.Model):
partner_name = models.CharField()
Expand Down Expand Up @@ -38,6 +43,7 @@ class Meta:
class LinkOrPageBlock(StreamBlock):
page = PageChooserBlock()
url = URLBlock()
document = DocumentChooserBlock()

class Meta:
max_num = 1
14 changes: 14 additions & 0 deletions app/core/templates/core/error_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "base.html" %}

{% block title %}
Page not found
{% endblock title %}
{% block body_class %}
template-404
{% endblock body_class %}
{% block content %}
<div class="max-7-xl mx-auto px-6 md:px-10 text-center my-40">
<h1 class="font-semibold text-hot-red" style="font-size: 4.44rem;">404</h1>
{% include "home/components/404Content.html" %}
</div>
{% endblock content %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2.7 on 2024-09-03 21:39

from django.db import migrations
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('impact_areas', '0019_alter_individualimpactareapage_intro'),
]

operations = [
migrations.AlterField(
model_name='individualimpactareapage',
name='use_cases',
field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('description', wagtail.blocks.RichTextBlock()), ('link_text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, null=True))]))], blank=True, null=True, use_json_field=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by Django 4.2.7 on 2024-09-03 21:39

from django.db import migrations
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('mapping_hubs', '0017_individualmappinghubpage_external_description_long'),
]

operations = [
migrations.AlterField(
model_name='individualmappinghubpage',
name='contact_section_links',
field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('link_text', wagtail.blocks.CharBlock(required=True)), ('link_url', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, required=False))]))], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='individualmappinghubpage',
name='dogear_boxes',
field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('description', wagtail.blocks.RichTextBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(required=True)), ('link_url', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, required=False))]))], blank=True, help_text="These are, for example, the 'Grants' and 'Map and Chat Hour' boxes in the Asia-Pacific page. Please only add these in pairs of 2!", use_json_field=True),
),
migrations.AlterField(
model_name='individualmappinghubpage',
name='events_section_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='individualmappinghubpage',
name='header_project_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='individualmappinghubpage',
name='news_section_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='individualmappinghubpage',
name='project_section_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='individualmappinghubpage',
name='subscribe_box_signup_url',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='mappinghubprojectspage',
name='black_box_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='mappinghubprojectspage',
name='red_box_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='openmappinghubspage',
name='header_events_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='openmappinghubspage',
name='header_news_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
migrations.AlterField(
model_name='openmappinghubspage',
name='partners_section_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True),
),
]
52 changes: 52 additions & 0 deletions app/misc/migrations/0015_contactuspage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Generated by Django 4.2.7 on 2024-08-26 20:58

from django.db import migrations, models
import django.db.models.deletion
import wagtail.blocks
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('wagtailimages', '0025_alter_image_file_alter_rendition_file'),
('wagtailcore', '0089_log_entry_data_json_null_to_object'),
('misc', '0014_alter_documentcollectionpage_documents'),
]

operations = [
migrations.CreateModel(
name='ContactUsPage',
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')),
('global_office_title', models.CharField(default='Global Office')),
('global_office_text', wagtail.fields.RichTextField(blank=True)),
('send_message_title', models.CharField(default='Send us a message!')),
('first_name_text', models.CharField(default='First Name')),
('last_name_text', models.CharField(default='Last Name')),
('email_text', models.CharField(default='Email Address')),
('subject_text', models.CharField(default='Subject')),
('message_text', models.CharField(default='Message')),
('first_name_field_text', models.CharField(default='Enter your first name...')),
('last_name_field_text', models.CharField(default='Enter your last name...')),
('email_field_text', models.CharField(default='Enter your email address...')),
('subject_field_placeholder', models.CharField(default='Select')),
('subject_field_options', wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('subject', wagtail.blocks.CharBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True)),
('message_field_text', models.CharField(default='Enter your message...')),
('submit_button_text', models.CharField(default='Submit')),
('inquiries_title', models.CharField(default='Inquiries')),
('inquiries_text', models.CharField(blank=True)),
('office_locations_title', models.CharField(default='Office Locations')),
('office_locations_visit_page_text', models.CharField(default='Visit Page')),
('office_locations', wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(blank=True, null=True, required=False)), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, null=True, required=False)), ('description', wagtail.blocks.RichTextBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True)),
('dogear_box_title', models.CharField(default='We want to know what you think about HOT and our work.')),
('dogear_box_link_text', models.CharField(default='Send us your feedback')),
('dogear_box_link', wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True)),
('header_image', models.ForeignKey(blank=True, help_text='Header image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
]
19 changes: 19 additions & 0 deletions app/misc/migrations/0016_alter_contactuspage_inquiries_text.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.7 on 2024-08-26 21:10

from django.db import migrations
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('misc', '0015_contactuspage'),
]

operations = [
migrations.AlterField(
model_name='contactuspage',
name='inquiries_text',
field=wagtail.fields.RichTextField(blank=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.7 on 2024-08-27 17:56

from django.db import migrations
import wagtail.blocks
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('misc', '0016_alter_contactuspage_inquiries_text'),
]

operations = [
migrations.RemoveField(
model_name='contactuspage',
name='inquiries_text',
),
migrations.AddField(
model_name='contactuspage',
name='inquiries_blocks',
field=wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(blank=True, null=True, required=False)), ('email', wagtail.blocks.EmailBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True),
),
]
33 changes: 33 additions & 0 deletions app/misc/migrations/0018_workforhotpage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 4.2.7 on 2024-08-28 16:11

from django.db import migrations, models
import django.db.models.deletion
import wagtail.fields


class Migration(migrations.Migration):

dependencies = [
('wagtailimages', '0025_alter_image_file_alter_rendition_file'),
('wagtailcore', '0089_log_entry_data_json_null_to_object'),
('misc', '0017_remove_contactuspage_inquiries_text_and_more'),
]

operations = [
migrations.CreateModel(
name='WorkForHotPage',
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')),
('header_text', wagtail.fields.RichTextField(blank=True)),
('our_values_title', models.CharField(default='Our Values')),
('our_values_text', wagtail.fields.RichTextField(blank=True)),
('work_culture_title', models.CharField(default='Work Culture & Benefits')),
('work_culture_description', wagtail.fields.RichTextField(blank=True)),
('header_image', models.ForeignKey(blank=True, help_text='Header image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Generated by Django 4.2.7 on 2024-08-28 21:04

from django.db import migrations, models
import django.db.models.deletion
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks


class Migration(migrations.Migration):

dependencies = [
('wagtailimages', '0025_alter_image_file_alter_rendition_file'),
('misc', '0018_workforhotpage'),
]

operations = [
migrations.AddField(
model_name='workforhotpage',
name='opportunities_button_link',
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True),
),
migrations.AddField(
model_name='workforhotpage',
name='opportunities_button_text',
field=models.CharField(default='See all job opportunities'),
),
migrations.AddField(
model_name='workforhotpage',
name='opportunities_description',
field=wagtail.fields.RichTextField(blank=True),
),
migrations.AddField(
model_name='workforhotpage',
name='opportunities_image',
field=models.ForeignKey(blank=True, help_text='Opportunities image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image'),
),
migrations.AddField(
model_name='workforhotpage',
name='opportunities_title',
field=models.CharField(default='See Our Job Opportunities'),
),
migrations.AddField(
model_name='workforhotpage',
name='our_values_youtube_subtitle',
field=models.CharField(blank=True),
),
migrations.AddField(
model_name='workforhotpage',
name='our_values_youtube_url',
field=models.URLField(blank=True),
),
migrations.AddField(
model_name='workforhotpage',
name='testimonials',
field=wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('description', wagtail.blocks.RichTextBlock(blank=True, null=True, required=False)), ('member', wagtail.blocks.PageChooserBlock(page_type=['members.IndividualMemberPage'], required=False)), ('image_override', wagtail.images.blocks.ImageChooserBlock(required=False)), ('name_override', wagtail.blocks.CharBlock(required=False)), ('title_override', wagtail.blocks.CharBlock(required=False)), ('hub_override', wagtail.blocks.PageChooserBlock(page_type=['mapping_hubs.IndividualMappingHubPage'], required=False))]))], blank=True, help_text="For any given testimonial, you can choose a member to be displayed, or you can alternatively manually provide the member's details; if both are provided, the manually-entered details will override any details fetched from the member's page.", null=True, use_json_field=True),
),
migrations.AddField(
model_name='workforhotpage',
name='testimonials_title',
field=models.CharField(default='What Our Staff Say'),
),
migrations.AddField(
model_name='workforhotpage',
name='work_culture_youtube_subtitle',
field=models.CharField(blank=True),
),
migrations.AddField(
model_name='workforhotpage',
name='work_culture_youtube_url',
field=models.URLField(blank=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.7 on 2024-08-28 23:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('misc', '0019_workforhotpage_opportunities_button_link_and_more'),
]

operations = [
migrations.AlterField(
model_name='workforhotpage',
name='our_values_youtube_url',
field=models.URLField(blank=True, help_text="The YouTube link provided should be in the following format: 'https://www.youtube.com/embed/[slug]'. You can get this by right-clicking on the YouTube video player and pressing 'Copy embed code'; this will give you a full embed code, which you will need to take the embed URL from."),
),
migrations.AlterField(
model_name='workforhotpage',
name='work_culture_youtube_subtitle',
field=models.CharField(blank=True, help_text="The YouTube link provided should be in the following format: 'https://www.youtube.com/embed/[slug]'. You can get this by right-clicking on the YouTube video player and pressing 'Copy embed code'; this will give you a full embed code, which you will need to take the embed URL from."),
),
]
Loading
Loading