Commit 6c2cfa84 authored by ancoats's avatar ancoats
Browse files

Restructure entry types and add UI messages

parent 0bd671f7
......@@ -97,6 +97,21 @@ fieldLayouts:
width: 100
-
type: craft\fieldlayoutelements\HorizontalRule
-
template: _messages/colors.twig
type: craft\fieldlayoutelements\Template
width: 100
-
fieldUid: aac0277f-1b64-41ec-9d56-ba8555b0c8b2
instructions: null
label: null
required: false
tip: null
type: craft\fieldlayoutelements\CustomField
warning: null
width: 100
-
type: craft\fieldlayoutelements\HorizontalRule
-
template: _messages/call-to-action.twig
type: craft\fieldlayoutelements\Template
......
......@@ -135,7 +135,7 @@ handle: directory
hasTitleField: true
name: Directory
section: 0550a0bb-0e57-4708-9a22-208323b412f7
sortOrder: 4
sortOrder: 3
titleFormat: null
titleTranslationKeyFormat: null
titleTranslationMethod: site
......@@ -135,7 +135,7 @@ handle: directory
hasTitleField: true
name: Directory
section: 70637627-cf31-431e-9d4f-2222589349f0
sortOrder: 4
sortOrder: 3
titleFormat: null
titleTranslationKeyFormat: null
titleTranslationMethod: site
......@@ -120,9 +120,9 @@ fieldLayouts:
sortOrder: 3
handle: page
hasTitleField: true
name: 'Standard page'
name: Page
section: 0550a0bb-0e57-4708-9a22-208323b412f7
sortOrder: 3
sortOrder: 2
titleFormat: null
titleTranslationKeyFormat: null
titleTranslationMethod: site
......@@ -122,7 +122,7 @@ handle: page
hasTitleField: true
name: Page
section: 70637627-cf31-431e-9d4f-2222589349f0
sortOrder: 3
sortOrder: 2
titleFormat: null
titleTranslationKeyFormat: null
titleTranslationMethod: site
......@@ -3,6 +3,10 @@ fieldLayouts:
tabs:
-
elements:
-
template: _messages/deprecated-entry-type.twig
type: craft\fieldlayoutelements\Template
width: 100
-
autocapitalize: true
autocomplete: false
......@@ -231,11 +235,11 @@ fieldLayouts:
width: 100
name: Meta
sortOrder: 6
handle: action
handle: theme
hasTitleField: true
name: Themed
section: 70637627-cf31-431e-9d4f-2222589349f0
sortOrder: 2
sortOrder: 4
titleFormat: null
titleTranslationKeyFormat: null
titleTranslationMethod: site
......@@ -3,6 +3,10 @@ fieldLayouts:
tabs:
-
elements:
-
template: _messages/deprecated-entry-type.twig
type: craft\fieldlayoutelements\Template
width: 100
-
autocapitalize: true
autocomplete: false
......@@ -162,11 +166,11 @@ fieldLayouts:
width: 100
name: Meta
sortOrder: 5
handle: campaign
handle: theme
hasTitleField: true
name: Campaign
name: Themed
section: 0550a0bb-0e57-4708-9a22-208323b412f7
sortOrder: 2
sortOrder: 4
titleFormat: null
titleTranslationKeyFormat: null
titleTranslationMethod: site
contentColumnType: string
fieldGroup: 2b1e3cc9-629b-49f3-b59e-091b1d6f7e90
handle: colorAccent
instructions: ''
name: 'Accent color'
searchable: false
settings:
optgroups: true
options:
-
__assoc__:
-
- label
- Default
-
- value
- ''
-
- default
- '1'
-
__assoc__:
-
- label
- 'Fluorescent green'
-
- value
- green-fluorescent
-
- default
- ''
-
__assoc__:
-
- label
- 'Fluorescent pink'
-
- value
- pink-fluorescent
-
- default
- ''
-
__assoc__:
-
- label
- Pink
-
- value
- pink
-
- default
- ''
-
__assoc__:
-
- label
- Red
-
- value
- red
-
- default
- ''
translationKeyFormat: null
translationMethod: none
type: craft\fields\Dropdown
dateModified: 1616231499
dateModified: 1619164119
email:
fromEmail: it@extinctionrebellion.be
fromName: 'Extinction Rebellion Belgium'
......
{% extends '_messages/template.twig' %}
{% set message = ''|t %}
{% set message = "To add a button, relate an entry or manually set the button's label and/or URL. **If set, manually-set values will take precedence.**"|t %}
{% extends '_messages/template.twig' %}
{% set message = ''|t %}
{% set message = "To override this page's default Call to action, choose a global Call to action from the dropdown menu or relate a Call to action entry. **If set, the related entry will take precedence**."|t %}
{% extends '_messages/template.twig' %}
{% set message = ''|t %}
{% extends '_messages/template.twig' %}
{% set message = 'This Entry Type is deprecated and is marked for removal in a future release. Please select a different Entry Type.'|t %}
{% set type = 'warning' %}
{% extends '_messages/template.twig' %}
{% set message = ''|t %}
{% set message = 'If set, this entry will be displayed in a list of related entries on the corresponding Action and/or Campaign entry page(s).'|t %}
{% set type = type | default('tip') %}
{% if message %}
<div class="readable">
<blockquote class="note tip">
<blockquote class="note {{ type }}">
{{ message|markdown }}
</blockquote>
</div>
......
{% extends '_layouts/default.twig' %}
{% set templateClass = 'template-entry template-entry-action-default' %}
{% set templateClass = 'template-entry template-entry-action' %}
{% set templateClass = ((entry.theme != 'default') ? templateClass ~ ' theme-' ~ entry.theme : templateClass) %}
{% set breadcrumb = craft.entries()
.section('archiveActions')
......@@ -16,29 +17,39 @@
{% block content %}
<article>
{% include '_partials/components/template-entry-type-action-default/page-header.twig' %}
{% set image = entry.featuredImage.one() %}
{% if image %}
<section class="c-panel u-background-color-black u-padding-top-0 u-padding-bottom-0">
<div class="container">
{% include '_partials/components/shared/image.twig' with {
imageClass: 'c-featured-image',
imageTransform: 'ratio5x3_width1200'
{% include '_partials/components/template-entry-action/page-header.twig' %}
{% include '_partials/components/shared/image-reel.twig' with {
images: entry.imageGrid.all()
} %}
<section class="c-panel" data-context="headline" id="section-headline">
<div class="container stack">
{% include '_partials/components/shared/standfirst.twig' with {
text: entry.standfirst
} %}
{% include '_partials/components/shared/button-group.twig' with {
buttons: entry.buttons
} %}
{% include '_partials/components/template-entry-action/prompts.twig' with {
priority: 'high'
} %}
</div>
</section>
{% if entry.body %}
<section class="c-panel" data-context="body" id="section-body">
<div class="container stack">
<div class="s-redactor">
{{ entry.body }}
</div>
{% include '_partials/components/template-entry-action/prompts.twig' with {
priority: 'normal'
} %}
</div>
</section>
{% endif %}
<div class="container u-margin-top-7 u-margin-bottom-7">
{% include '_partials/components/shared/standfirst.twig' with {
text: entry.standfirst
} %}
{% include '_partials/components/shared/content-blocks.twig' with {
contentBlocks: entry.contentBlocks.all()
} %}
</div>
{% include '_partials/components/template-entry-action/section-references.twig' %}
{% include '_partials/components/template-entry/section-social-media.twig' %}
</article>
{% embed '_partials/components/default/entries-list-related.twig' with {
class: 'u-background-color-black u-color-white',
heading: 'More on this action'|t,
entries: queryRelatedEntries,
context: 'related-entries'
......
{% extends '_layouts/default.twig' %}
{% set templateClass = 'template-entry template-entry-action' %}
{% set templateClass = ((entry.theme != 'default') ? templateClass ~ ' theme-' ~ entry.theme : templateClass) %}
{% set templateClass = 'template-entry template-entry-action-default' %}
{% set breadcrumb = craft.entries()
.section('archiveActions')
......@@ -17,39 +16,29 @@
{% block content %}
<article>
{% include '_partials/components/template-entry-action/page-header.twig' %}
{% include '_partials/components/shared/image-reel.twig' with {
images: entry.imageGrid.all()
} %}
<section class="c-panel" data-context="headline" id="section-headline">
<div class="container stack">
{% include '_partials/components/shared/standfirst.twig' with {
text: entry.standfirst
} %}
{% include '_partials/components/shared/button-group.twig' with {
buttons: entry.buttons
} %}
{% include '_partials/components/template-entry-action/prompts.twig' with {
priority: 'high'
} %}
</div>
</section>
{% if entry.body %}
<section class="c-panel" data-context="body" id="section-body">
<div class="container stack">
<div class="s-redactor">
{{ entry.body }}
</div>
{% include '_partials/components/template-entry-action/prompts.twig' with {
priority: 'normal'
{% include '_partials/components/template-entry-type-action-default/page-header.twig' %}
{% set image = entry.featuredImage.one() %}
{% if image %}
<section class="c-panel u-background-color-black u-padding-top-0 u-padding-bottom-0">
<div class="container">
{% include '_partials/components/shared/image.twig' with {
imageClass: 'c-featured-image',
imageTransform: 'ratio5x3_width1200'
} %}
</div>
</section>
{% endif %}
{% include '_partials/components/template-entry-action/section-references.twig' %}
{% include '_partials/components/template-entry/section-social-media.twig' %}
<div class="container u-margin-top-7 u-margin-bottom-7">
{% include '_partials/components/shared/standfirst.twig' with {
text: entry.standfirst
} %}
{% include '_partials/components/shared/content-blocks.twig' with {
contentBlocks: entry.contentBlocks.all()
} %}
</div>
</article>
{% embed '_partials/components/default/entries-list-related.twig' with {
class: 'u-background-color-black u-color-white',
heading: 'More on this action'|t,
entries: queryRelatedEntries,
context: 'related-entries'
......
{% extends '_layouts/default.twig' %}
{% set templateClass = 'template-entry template-entry-campaign-default' %}
{% set templateClass = 'template-entry template-entry-campaign' %}
{% set queryRelatedEvents = craft.entries()
.section('events')
......@@ -24,27 +24,32 @@
{% block content %}
<article>
{% include '_partials/components/template-entry-campaign/page-header.twig' %}
{% set image = entry.featuredImage.one() %}
{% if image %}
<section class="c-panel u-background-color-black u-padding-top-0 u-padding-bottom-0">
<div class="container">
{% include '_partials/components/shared/image.twig' with {
imageClass: 'c-featured-image',
imageTransform: 'ratio5x3_width1200'
} %}
</div>
</section>
{% if entry.tiles|length >= 2 %}
{% set gridClass = entry.tiles|length == 2 ? 'act-now' : 'tell-the-truth' %}
<div class="{{ gridClass }}">
{% for tile in entry.tiles.all() %}
{% if tile.type == 'standard' %}
{% include '_partials/components/shared/tile.twig' with {
tileButtonLabel: tile.tileButtonLabel,
tileButtonURL: tile.tileButtonURL,
tileTheme: tile.tileTheme
} %}
{% else %}
{% include '_partials/components/shared/tile-'~ tile.type ~'.twig' %}
{% endif %}
{% endfor %}
</div>
{% endif %}
<div class="container u-margin-top-7 u-margin-bottom-7">
{% include '_partials/components/shared/content-blocks.twig' with {
contentBlocks: entry.contentBlocks.all()
} %}
</div>
<section class="c-panel" data-context="body" id="section-body">
<div class="container s-redactor">
{{ entry.body }}
</div>
</section>
</article>
{% embed '_partials/components/default/entries-grid-related.twig' with {
heading: 'Join our campaign events'|t,
entries: queryRelatedEvents,
class: 'u-background-color-blue-lazuli u-color-white',
context: 'related-events'
} %}
{% block loop %}
{% for entry in entries %}
......@@ -52,10 +57,11 @@
{% endfor %}
{% endblock %}
{% endembed %}
{% include '_partials/components/template-entry/section-social-media.twig' %}
{% embed '_partials/components/default/entries-list-related.twig' with {
heading: 'More on this campaign'|t,
entries: queryRelatedEntries,
class: 'u-background-color-black u-color-white',
context: 'related-entries'
} %}
{% block loop %}
{% for entry in entries %}
......
{% extends '_layouts/default.twig' %}
{% set templateClass = 'template-entry template-entry-campaign' %}
{% set templateClass = 'template-entry template-entry-campaign-default' %}
{% set queryRelatedEvents = craft.entries()
.section('events')
......@@ -24,32 +24,27 @@
{% block content %}
<article>
{% include '_partials/components/template-entry-campaign/page-header.twig' %}
{% if entry.tiles|length >= 2 %}
{% set gridClass = entry.tiles|length == 2 ? 'act-now' : 'tell-the-truth' %}
<div class="{{ gridClass }}">
{% for tile in entry.tiles.all() %}
{% if tile.type == 'standard' %}
{% include '_partials/components/shared/tile.twig' with {
tileButtonLabel: tile.tileButtonLabel,
tileButtonURL: tile.tileButtonURL,
tileTheme: tile.tileTheme
} %}
{% else %}
{% include '_partials/components/shared/tile-'~ tile.type ~'.twig' %}
{% endif %}
{% endfor %}
</div>
{% set image = entry.featuredImage.one() %}
{% if image %}
<section class="c-panel u-background-color-black u-padding-top-0 u-padding-bottom-0">
<div class="container">
{% include '_partials/components/shared/image.twig' with {
imageClass: 'c-featured-image',
imageTransform: 'ratio5x3_width1200'
} %}
</div>
</section>
{% endif %}
<section class="c-panel" data-context="body" id="section-body">
<div class="container s-redactor">
{{ entry.body }}
</div>
</section>
<div class="container u-margin-top-7 u-margin-bottom-7">
{% include '_partials/components/shared/content-blocks.twig' with {
contentBlocks: entry.contentBlocks.all()
} %}
</div>
</article>
{% embed '_partials/components/default/entries-grid-related.twig' with {
heading: 'Join our campaign events'|t,
entries: queryRelatedEvents,
context: 'related-events'
class: 'u-background-color-blue-lazuli u-color-white',
} %}
{% block loop %}
{% for entry in entries %}
......@@ -57,11 +52,10 @@
{% endfor %}
{% endblock %}
{% endembed %}
{% include '_partials/components/template-entry/section-social-media.twig' %}
{% embed '_partials/components/default/entries-list-related.twig' with {
heading: 'More on this campaign'|t,
entries: queryRelatedEntries,
context: 'related-entries'
class: 'u-background-color-black u-color-white',
} %}
{% block loop %}
{% for entry in entries %}
......
......@@ -5,10 +5,10 @@
{% case 'page' %}
{% include '_page-templates/template-entry-type-page.twig' %}
{% case 'action' %}
{% include '_page-templates/template-entry-type-action.twig' %}
{% case 'theme' %}
{% include '_page-templates/template-entry-type-action-theme.twig' %}
{% default %}
{% include '_page-templates/template-entry-type-action-default.twig' %}
{% include '_page-templates/template-entry-type-action.twig' %}
{% endswitch %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment