Commit cf1992b0 authored by ancoats's avatar ancoats
Browse files

Initialise local groups overview page

parent a892c68d
......@@ -35,12 +35,10 @@ fieldLayouts:
type: craft\fieldlayoutelements\CustomField
warning: null
width: 100
name: Content
sortOrder: 1
-
elements:
-
fieldUid: 81f9d9e3-2ee8-44af-97eb-f505af0c53f2
type: craft\fieldlayoutelements\HorizontalRule
-
fieldUid: b9ef778d-4043-4f7b-ac8e-8f7e36981eaa
instructions: null
label: null
required: false
......@@ -49,7 +47,7 @@ fieldLayouts:
warning: null
width: 100
-
fieldUid: 8eacedc7-8763-4c64-9483-1ace6ad9f199
fieldUid: 5c9e387a-9279-4455-889d-a528b2950a08
instructions: null
label: null
required: false
......@@ -57,8 +55,8 @@ fieldLayouts:
type: craft\fieldlayoutelements\CustomField
warning: null
width: 100
name: 'Contact information'
sortOrder: 2
name: Content
sortOrder: 1
-
elements:
-
......@@ -98,7 +96,7 @@ fieldLayouts:
warning: null
width: 100
name: Meta
sortOrder: 3
sortOrder: 2
handle: pageLocalGroups
hasTitleField: true
name: 'Local groups'
......
dateModified: 1611400756
dateModified: 1611411672
email:
fromEmail: it@extinctionrebellion.be
fromName: 'Extinction Rebellion Belgium'
......
......@@ -6,6 +6,8 @@
.datetimeStart('> ' ~ now | date('c'))
.orderBy('datetimeStart asc') %}
{% set queryLocalGroups = craft.users().group('localGroups') %}
{% block content %}
<div class="love-and-rage">
{% include '_partials/components/shared/banner.twig' with {
......@@ -75,12 +77,17 @@
{% endif %}
</section>
<section class="c-panel u-background-color-black u-color-white" id="section-local-groups">
{% include '_partials/components/template-page-home/list-local-groups.twig' %}
{% if prompts.promptLocalGroup %}
{% include '_partials/components/shared/prompt.twig' with {
promptContent: prompts.promptLocalGroup
<div class="container">
{% include '_partials/components/shared/list-local-groups.twig' with {
users: queryLocalGroups.all(),
heading: 'Join a local group'|t
} %}
{% endif %}
{% if prompts.promptLocalGroup %}
{% include '_partials/components/shared/prompt.twig' with {
promptContent: prompts.promptLocalGroup
} %}
{% endif %}
</div>
</section>
<section class="c-panel u-background-color-blue-baby" id="section-collectives">
{% include '_partials/components/template-page-home/list-collectives.twig' %}
......
{% extends '_page-templates/template-entry-type-page.twig' %}
{% set queryLocalGroups = craft.users().group('localGroups') %}
{% block content %}
{% include '_partials/components/template-page/page-header.twig' %}
<section class="c-panel u-background-color-black u-color-white" id="section-local-groups">
<div class="container">
{% include '_partials/components/shared/list-local-groups.twig' with {
users: queryLocalGroups.all()
} %}
{% if prompts.promptLocalGroup %}
{% include '_partials/components/shared/prompt.twig' with {
promptContent: prompts.promptLocalGroup
} %}
{% endif %}
</div>
</section>
{% endblock %}
{% set localGroups = craft.users()
.group('localGroups')
.all() %}
{% if localGroups %}
<h2 class="c-heading">{{ 'Join a local group'|t }}</h2>
{% if users|length %}
{% if (heading is defined and heading) %}<h2 class="c-heading">{{ heading }}</h2>{% endif %}
<ol class="c-list c-list--cluster">
{% for user in localGroups %}
{% for user in users %}
{% set userURLProfile = 'local-groups/{slug}'|t({
slug: user.username
}, 'routes') %}
<li class="c-list__item">
<h3 class="c-list__item__label">{{ user.userNamePublic ? user.userNamePublic : user.name }}</h3>
<a class="c-list__item__label" href="{{ userURLProfile }}">{{ user.userNamePublic | default(user.name) }}</a>
{% include '_partials/components/shared/icon-group.twig' with {
icons: {
'website': user.userURL,
......
<?php
return [
'local-groups/{slug}' => 'lokale-gruppen/{slug}',
];
<?php
return [
'local-groups/{slug}' => 'groupes-local/{slug}',
];
<?php
return [
'local-groups/{slug}' => 'lokale-groepen/{slug}',
];
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