This commit is contained in:
2023-11-27 13:52:32 +01:00
17 changed files with 550 additions and 248 deletions
+6
View File
@@ -115,6 +115,12 @@
"recurse": true,
"replace": false,
"merge-extra": true
},
"patches": {
"drupal/social_media_links":{
"Replace Twitter with X https://www.drupal.org/project/social_media_links/issues/3384469": "https://www.drupal.org/files/issues/2023-09-12/social_media_links-change_twitter_to_x-3384469-7.patch"
}
}
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ dependencies:
id: reha_logoreha_3
theme: reha
region: footer_left
weight: -5
weight: -6
provider: null
plugin: 'block_content:6aedcd97-72c8-4328-b52d-f4d2a5285b96'
settings:
+30
View File
@@ -0,0 +1,30 @@
uuid: 22a905f7-e017-4bb2-959d-4e0773439650
langcode: fr
status: true
dependencies:
content:
- 'block_content:text:e05f593a-38ab-4dba-ad1c-9ae23c1222a9'
module:
- block_content
- system
theme:
- reha
id: reha_phase1.
theme: reha
region: sidebar_first
weight: 0
provider: null
plugin: 'block_content:e05f593a-38ab-4dba-ad1c-9ae23c1222a9'
settings:
id: 'block_content:e05f593a-38ab-4dba-ad1c-9ae23c1222a9'
label: 'Phase 1.'
label_display: visible
provider: block_content
status: true
info: ''
view_mode: full
visibility:
request_path:
id: request_path
negate: true
pages: '<front>'
@@ -0,0 +1,166 @@
uuid: 5cf89ef7-add7-47d3-bdac-0f5faeda457c
langcode: fr
status: true
dependencies:
module:
- block_class
- social_media_links
theme:
- reha
id: reha_socialmedialinks
theme: reha
region: footer_left
weight: -5
provider: null
plugin: social_media_links_block
settings:
id: social_media_links_block
label: 'Social Media Links'
label_display: '0'
provider: social_media_links
platforms:
twitter:
value: reha
description: ''
weight: '-47'
youtube:
value: reha
description: ''
weight: '-46'
instagram:
value: ''
description: ''
weight: '-43'
xing:
value: ''
description: ''
weight: '-42'
contact:
value: ''
description: ''
weight: '-41'
rss:
value: ''
description: ''
weight: '-40'
tiktok:
value: ''
description: ''
weight: '-39'
mastodon:
value: ''
description: ''
weight: '-38'
amazon:
value: ''
description: ''
weight: '-37'
bitbucket:
value: ''
description: ''
weight: '-36'
patreon:
value: ''
description: ''
weight: '-35'
vkontakte:
value: ''
description: ''
weight: '-34'
slideshare:
value: ''
description: ''
weight: '-33'
github:
value: ''
description: ''
weight: '-32'
behance:
value: ''
description: ''
weight: '-31'
vimeo:
value: ''
description: ''
weight: '-30'
telegram:
value: ''
description: ''
weight: '-29'
youtube_channel:
value: ''
description: ''
weight: '-28'
googleplus:
value: ''
description: ''
weight: '-27'
facebook:
value: ''
description: ''
weight: '-26'
drupal:
value: ''
description: ''
weight: '-25'
flickr:
value: ''
description: ''
weight: '-24'
gitlab:
value: ''
description: ''
weight: '-23'
tumblr:
value: ''
description: ''
weight: '-22'
pinterest:
value: ''
description: ''
weight: '-21'
email:
value: ''
description: ''
weight: '-20'
goodreads:
value: ''
description: ''
weight: '-19'
googleplay:
value: ''
description: ''
weight: '-18'
whatsapp:
value: ''
description: ''
weight: '-17'
meetup:
value: ''
description: ''
weight: '-16'
website:
value: ''
description: ''
weight: '-10'
glassdoor:
value: ''
description: ''
weight: '-9'
linkedin:
value: reha
description: ''
weight: '7'
appearance:
orientation: h
show_name: 0
suggestion: ''
link_attributes:
target: '<none>'
rel: '<none>'
iconset:
style: 'fontawesome:2x'
installed_iconsets:
fontawesome:
examples: ''
visibility: { }
+8
View File
@@ -0,0 +1,8 @@
uuid: 668f7f96-b481-41a2-9eca-05dba6695a93
langcode: fr
status: true
dependencies: { }
id: text
label: text
revision: 0
description: ''
@@ -28,7 +28,7 @@
fields:
field_lien:
-
uri: 'http://reha.figli.io'
uri: 'internal:/'
title: ''
options: { }
field_logo:
@@ -129,3 +129,16 @@ bc48e271-75cf-4c3f-a4aa-ecc3c573c060:
uri: 'internal:/user/register?destination=/node/add/operation'
title: 'Proposer un site'
options: { }
e05f593a-38ab-4dba-ad1c-9ae23c1222a9:
uuid: e05f593a-38ab-4dba-ad1c-9ae23c1222a9
id: '13'
info: 'Phase 1.'
langcode: fr
type: text
reusable: '1'
fields:
body:
-
value: "<p>Appel à candidatures d'opérations</p>"
summary: ''
format: wysiwyg
@@ -0,0 +1,40 @@
uuid: 011b248b-cacc-4bd1-9079-7e6f6e07538d
langcode: fr
status: true
dependencies:
config:
- block_content.type.text
- field.field.block_content.text.body
module:
- text
id: block_content.text.default
targetEntityType: block_content
bundle: text
mode: default
content:
body:
type: text_textarea_with_summary
weight: 26
region: content
settings:
rows: 9
summary_rows: 3
placeholder: ''
show_summary: false
third_party_settings: { }
info:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
hidden: { }
@@ -28,8 +28,7 @@ content:
linked: '1'
type: field
destination: field_lien
advanced:
target: _blank
advanced: { }
token: ''
weight: 0
region: content
@@ -0,0 +1,24 @@
uuid: 8931ece9-f12b-4379-9d47-4b97f09743dd
langcode: fr
status: true
dependencies:
config:
- block_content.type.text
- field.field.block_content.text.body
module:
- text
id: block_content.text.default
targetEntityType: block_content
bundle: text
mode: default
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 0
region: content
hidden:
langcode: true
search_api_excerpt: true
+12 -3
View File
@@ -1,10 +1,13 @@
_core:
default_config_hash: FhLRCg4ZgDyAnJvH9lJR6uGqQ2FNIFL25hnG6c2gkZs
langcode: fr
extlink_target: false
extlink_use_external_js_file: false
extlink_exclude_admin_routes: false
extlink_target: true
extlink_target_no_override: false
extlink_nofollow: false
extlink_follow_no_override: false
extlink_nofollow: true
extlink_noreferrer: true
extlink_follow_no_override: true
extlink_subdomains: true
extlink_alert: false
extlink_alert_text: 'Ce lien vous dirige vers un site externe. Nous ne sommes pas responsables de son contenu.'
@@ -17,3 +20,9 @@ extlink_css_exclude: ''
extlink_css_explicit: ''
extlink_mailto_class: mailto
extlink_mailto_label: '(link sends email)'
extlink_use_font_awesome: false
extlink_font_awesome_classes:
links: 'fa fa-external-link'
mailto: 'fa fa-envelope-o'
extlink_icon_placement: after
whitelisted_domains: { }
@@ -0,0 +1,24 @@
uuid: 62a7a4e5-bfd9-4df5-b89a-12d2b05c7e33
langcode: fr
status: true
dependencies:
config:
- block_content.type.text
- field.storage.block_content.body
module:
- text
id: block_content.text.body
field_name: body
entity_type: block_content
bundle: text
label: Body
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
display_summary: false
required_summary: false
allowed_formats: { }
field_type: text_with_summary
@@ -0,0 +1,11 @@
uuid: 05cc5f75-50f7-4977-8356-86f79f71d87a
langcode: fr
status: true
dependencies:
config:
- block_content.type.text
id: block_content.text
target_entity_type_id: block_content
target_bundle: text
default_langcode: site_default
language_alterable: false
@@ -3,14 +3,14 @@ langcode: fr
status: true
dependencies: { }
name: login_to_operations
label: 'login to operations'
label: 'login to mes operations'
triggers:
login: login
destination_path: 'internal:/operations'
destination_path: 'internal:/mes_operations'
pages_type: 0
pages: ''
language: ''
roles:
authenticated: authenticated
weight: 0
enabled: false
enabled: true
@@ -562,7 +562,7 @@ display:
plugin_id: text
empty: false
content:
value: '<a href="/user/logout">Deconnexion</a>'
value: "<ul>\r\n<li><a href=\"/user/logout\">Deconnexion</a></li>\r\n<li><a href=\"/mes_operations\">Mes operations</a></li>\r\n<li><a href=\"/node/add/operation?destination=/mes_operations\">Ajouter une opération</a></li>\r\n</ul>"
format: wysiwyg
tokenize: false
display_extenders: { }
+144 -10
View File
@@ -229,13 +229,7 @@ display:
plugin_id: standard
required: false
header: { }
footer:
node_listing_empty:
id: node_listing_empty
table: node
field: node_listing_empty
entity_type: node
plugin_id: node_listing_empty
footer: { }
display_extenders: { }
cache_metadata:
max-age: -1
@@ -254,20 +248,160 @@ display:
display_plugin: page
position: 1
display_options:
title: 'Mes opérations'
fields:
rendered_entity:
id: rendered_entity
table: node
field: rendered_entity
relationship: none
group_type: group
admin_label: ''
entity_type: node
plugin_id: rendered_entity
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
view_mode: full
edit_node:
id: edit_node
table: node
field: edit_node
relationship: none
group_type: group
admin_label: ''
entity_type: node
plugin_id: entity_link_edit
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
text: modifier
output_url_as_text: false
absolute: false
style:
type: default
options: { }
row:
type: fields
options:
default_field_elements: true
inline: { }
separator: ''
hide_empty: false
defaults:
title: false
style: false
row: false
fields: false
footer: false
display_description: ''
footer:
area:
id: area
table: views
field: area
relationship: none
group_type: group
admin_label: ''
plugin_id: text
empty: true
content:
value: '<a href="/node/add/operation">Proposer un autre site</a>'
format: wysiwyg
tokenize: false
display_extenders: { }
path: operations
path: mes_operations
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- user
- 'user.node_grants:view'
- user.roles
tags: { }
tags:
- 'config:core.entity_view_display.node.operation.default'
- 'config:core.entity_view_display.node.operation.teaser'
- 'config:core.entity_view_display.node.static.content_no_title'
- 'config:core.entity_view_display.node.static.default'
- 'config:core.entity_view_display.node.static.teaser'
page_2:
id: page_2
display_title: 'All opérations'
+8 -227
View File
@@ -1,228 +1,9 @@
# Local development services.
#
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
parameters:
session.storage.options:
# Default ini options for sessions.
#
# Some distributions of Linux (most notably Debian) ship their PHP
# installations with garbage collection (gc) disabled. Since Drupal depends
# on PHP's garbage collection for clearing sessions, ensure that garbage
# collection occurs by using the most common settings.
# @default 1
gc_probability: 1
# @default 100
gc_divisor: 100
#
# Set session lifetime (in seconds), i.e. the grace period for session
# data. Sessions are deleted by the session garbage collector after one
# session lifetime has elapsed since the user's last visit. When a session
# is deleted, authenticated users are logged out, and the contents of the
# user's session is discarded.
# @default 200000
gc_maxlifetime: 200000
#
# Set session cookie lifetime (in seconds), i.e. the time from the session
# is created to the cookie expires, i.e. when the browser is expected to
# discard the cookie. The value 0 means "until the browser is closed".
# @default 2000000
cookie_lifetime: 2000000
#
# Drupal automatically generates a unique session cookie name based on the
# full domain name used to access the site. This mechanism is sufficient
# for most use-cases, including multi-site deployments. However, if it is
# desired that a session can be reused across different subdomains, the
# cookie domain needs to be set to the shared base domain. Doing so assures
# that users remain logged in as they cross between various subdomains.
# To maximize compatibility and normalize the behavior across user agents,
# the cookie domain should start with a dot.
#
# @default none
# cookie_domain: '.example.com'
#
# Set the SameSite cookie attribute: 'None', 'Lax', or 'Strict'. If set,
# this value will override the server value. See
# https://www.php.net/manual/en/session.security.ini.php for more
# information.
# @default no value
cookie_samesite: Lax
#
# Set the session ID string length. The length can be between 22 to 256. The
# PHP recommended value is 48. See
# https://www.php.net/manual/session.security.ini.php for more information.
# This value should be kept in sync with
# \Drupal\Core\Session\SessionConfiguration::__construct()
# @default 48
sid_length: 48
#
# Set the number of bits in encoded session ID character. The possible
# values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-",
# ","). The PHP recommended value is 6. See
# https://www.php.net/manual/session.security.ini.php for more information.
# This value should be kept in sync with
# \Drupal\Core\Session\SessionConfiguration::__construct()
# @default 6
sid_bits_per_character: 6
twig.config:
# Twig debugging:
#
# When debugging is enabled:
# - The markup of each Twig template is surrounded by HTML comments that
# contain theming information, such as template file name suggestions.
# - Note that this debugging markup will cause automated tests that directly
# check rendered HTML to fail. When running automated tests, 'debug'
# should be set to FALSE.
# - The dump() function can be used in Twig templates to output information
# about template variables.
# - Twig templates are automatically recompiled whenever the source code
# changes (see auto_reload below).
#
# For more information about debugging Twig templates, see
# https://www.drupal.org/node/1906392.
#
# Enabling Twig debugging is not recommended in production environments.
# @default false
debug: true
# Twig auto-reload:
#
# Automatically recompile Twig templates whenever the source code changes.
# If you don't provide a value for auto_reload, it will be determined
# based on the value of debug.
#
# Enabling auto-reload is not recommended in production environments.
# @default null
auto_reload: null
# Twig cache:
#
# By default, Twig templates will be compiled and stored in the filesystem
# to increase performance. Disabling the Twig cache will recompile the
# templates from source each time they are used. In most cases the
# auto_reload setting above should be enabled rather than disabling the
# Twig cache.
#
# Disabling the Twig cache is not recommended in production environments.
# @default true
cache: true
# File extensions:
#
# List of file extensions the Twig system is allowed to load via the
# twig.loader.filesystem service. Files with other extensions will not be
# loaded unless they are added here. For example, to allow a file named
# 'example.partial' to be loaded, add 'partial' to this list. To load files
# with no extension, add an empty string '' to the list.
#
# @default ['css', 'html', 'js', 'svg', 'twig']
allowed_file_extensions:
- css
- html
- js
- svg
- twig
renderer.config:
# Renderer required cache contexts:
#
# The Renderer will automatically associate these cache contexts with every
# render array, hence varying every render array by these cache contexts.
#
# @default ['languages:language_interface', 'theme', 'user.permissions']
required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
# Renderer automatic placeholdering conditions:
#
# Drupal allows portions of the page to be automatically deferred when
# rendering to improve cache performance. That is especially helpful for
# cache contexts that vary widely, such as the active user. On some sites
# those may be different, however, such as sites with only a handful of
# users. If you know what the high-cardinality cache contexts are for your
# site, specify those here. If you're not sure, the defaults are fairly safe
# in general.
#
# For more information about rendering optimizations see
# https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
auto_placeholder_conditions:
# Max-age at or below which caching is not considered worthwhile.
#
# Disable by setting to -1.
#
# @default 0
max-age: 0
# Cache contexts with a high cardinality.
#
# Disable by setting to [].
#
# @default ['session', 'user']
contexts: ['session', 'user']
# Tags with a high invalidation frequency.
#
# Disable by setting to [].
#
# @default []
tags: []
# Renderer cache debug:
#
# Allows cache debugging output for each rendered element.
#
# Enabling render cache debugging is not recommended in production
# environments.
# @default false
debug: false
# Cacheability debugging:
#
# Responses with cacheability metadata (CacheableResponseInterface instances)
# get X-Drupal-Cache-Tags, X-Drupal-Cache-Contexts and X-Drupal-Cache-Max-Age
# headers.
#
# For more information about debugging cacheable responses, see
# https://www.drupal.org/developing/api/8/response/cacheable-response-interface
#
# Enabling cacheability debugging is not recommended in production
# environments.
# @default false
http.response.debug_cacheability_headers: false
factory.keyvalue: {}
# Default key/value storage service to use.
# @default keyvalue.database
# default: keyvalue.database
# Collection-specific overrides.
# state: keyvalue.database
factory.keyvalue.expirable: {}
# Default key/value expirable storage service to use.
# @default keyvalue.database.expirable
# default: keyvalue.database.expirable
# Allowed protocols for URL generation.
filter_protocols:
- http
- https
- ftp
- news
- nntp
- tel
- telnet
- mailto
- irc
- ssh
- sftp
- webcal
- rtsp
# Configure Cross-Site HTTP requests (CORS).
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
# for more information about the topic in general.
# Note: By default the configuration is disabled.
cors.config:
enabled: false
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: []
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: []
# Configure requests allowed from specific origins. Do not include trailing
# slashes with URLs.
allowedOrigins: ['*']
# Sets the Access-Control-Expose-Headers header.
exposedHeaders: false
# Sets the Access-Control-Max-Age header.
maxAge: false
# Sets the Access-Control-Allow-Credentials header.
supportsCredentials: false
queue.config:
# The maximum number of seconds to wait if a queue is temporarily suspended.
# This is not applicable when a queue is suspended but does not specify
# how long to wait before attempting to resume.
suspendMaximumWait: 30
http.response.debug_cacheability_headers: true
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
+57
View File
@@ -1,5 +1,11 @@
<?php
use Drupal\Core\Url;
use Drupal\Core\Link;
use Drupal\Core\Render\Markup;
/**
* @file
* Functions to support theming in the reha theme.
@@ -34,3 +40,54 @@ function reha_preprocess_node(&$variables) {
/**
* Prepares variables for block templates.
*
* Default template: block.html.twig.
*
* Prepares the values passed to the theme_block function to be passed
* into a pluggable template engine. Uses block properties to generate a
* series of template file suggestions. If none are found, the default
* block.html.twig is used.
*
* Most themes use their own copy of block.html.twig. The default is located
* inside "core/modules/block/templates/block.html.twig". Look in there for the
* full list of available variables.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the properties of the element.
* Properties used: #block, #configuration, #children, #plugin_id.
*/
//https://www.hashbangcode.com/article/drupal-9-programmatically-creating-and-using-urls-and-links
function reha_preprocess_block(&$variables) {
if ($variables['plugin_id'] === "user_login_block") {
$url = new Url('user.register', [], ['query' => ['destination' => '/node/add/operation']]);
$link = new Link('proposer une operation', $url);
$variables['content']['reha'] = array(
'#theme' => 'item_list',
'#items' => [
'operations' => [
"add_operation" => $link->toRenderable(),
"description" => [
"#markup" => Markup::create("<p>Créer un compte pour charger une opération</p>")
]
]
]
);
}
if ($variables['plugin_id'] === "page_title_block") {
if (\Drupal::routeMatch()->getRouteName() === 'node.add') {
$node_type = \Drupal::routeMatch()->getParameter('node_type');
if ($node_type->id() === 'operation') {
$variables['content'] = [
'#type' => 'page_title',
'#title' => 'Proposer une opération'
];
}
}
}
}