started rgpd integration

This commit is contained in:
Bachir Soussi Chiadmi 2021-07-14 12:23:13 +02:00
parent dddd19a7b3
commit 8f7339b51e
34 changed files with 836 additions and 41 deletions

View File

@ -46,11 +46,13 @@
"drupal/editor_advanced_link": "^1.8",
"drupal/entity_clone": "^1.0",
"drupal/error_log": "^1.0",
"drupal/eu_cookie_compliance": "^1.14",
"drupal/field_group": "3.x-dev@dev",
"drupal/field_permissions": "^1.0",
"drupal/flag": "4.x-dev@dev",
"drupal/flag_lists": "4.0.x-dev@dev",
"drupal/flood_control": "^2.1",
"drupal/gdpr": "^3.0@alpha",
"drupal/genpass": "^1.x-dev",
"drupal/graphql": "^4.0",
"drupal/image_delta_formatter": "^1.x-dev",

305
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9f0bf06238a3485d7d627092ce483e3d",
"content-hash": "309879aa2fd3f877adca6bb2658eb439",
"packages": [
{
"name": "alchemy/zippy",
@ -3638,6 +3638,61 @@
},
"time": "2020-05-24T06:01:38+00:00"
},
{
"name": "drupal/checklistapi",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/checklistapi.git",
"reference": "8.x-1.11"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/checklistapi-8.x-1.11.zip",
"reference": "8.x-1.11",
"shasum": "78fcf8ff6edd02f2cdfc907981db119dfca795c2"
},
"require": {
"drupal/core": "^8 || ^9",
"php": ">=5.6.0"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.11",
"datestamp": "1586540246",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
},
"branch-alias": {
"dev-master": "1.x-dev"
},
"drush": {
"services": {
"drush.services.yml": "^10"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Travis Carden",
"homepage": "https://www.drupal.org/user/236758",
"email": "travis.carden@gmail.com"
}
],
"description": "Provides an API for creating fillable, persistent checklists.",
"homepage": "http://drupal.org/project/checklistapi",
"support": {
"source": "https://git.drupalcode.org/project/checklistapi",
"issues": "https://www.drupal.org/project/issues/checklistapi"
}
},
{
"name": "drupal/commerce",
"version": "2.24.0",
@ -7134,6 +7189,75 @@
"source": "https://git.drupalcode.org/project/error_log"
}
},
{
"name": "drupal/eu_cookie_compliance",
"version": "1.14.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/eu-cookie-compliance.git",
"reference": "8.x-1.14"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/eu_cookie_compliance-8.x-1.14.zip",
"reference": "8.x-1.14",
"shasum": "37b7d8e33d5bc466272a288dbbb386d8702ed3c1"
},
"require": {
"drupal/core": "^8.8 || ^9"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.14",
"datestamp": "1606569775",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Marcin Pajdzik",
"homepage": "https://www.drupal.org/u/marcin-pajdzik",
"role": "Maintainer"
},
{
"name": "Sven Berg Ryen",
"homepage": "https://www.drupal.org/u/svenryen",
"role": "Maintainer"
},
{
"name": "Neslee Canil Pinto",
"homepage": "https://www.drupal.org/u/neslee-canil-pinto",
"role": "Maintainer"
},
{
"name": "See other contributors",
"homepage": "https://www.drupal.org/node/1538032/committers"
}
],
"description": "This module aims at making the website compliant with the new EU cookie regulation.",
"homepage": "https://drupal.org/project/eu_cookie_compliance",
"keywords": [
"Cookie",
"CookieCompliance",
"Drupal",
"GDPR"
],
"support": {
"source": "https://git.drupalcode.org/project/eu-cookie-compliance",
"docs": "https://www.drupal.org/docs/contributed-modules/eu-cookie-compliance",
"forum": "https://drupal.stackexchange.com/search?q=eu+cookie+compliance",
"issues": "https://www.drupal.org/project/issues/eu_cookie_compliance?version=8.x",
"slack": "https://app.slack.com/client/T06GX3JTS/C012XBTH81E"
}
},
{
"name": "drupal/extlink",
"version": "1.6.0",
@ -7754,6 +7878,121 @@
"source": "https://git.drupalcode.org/project/flood_control"
}
},
{
"name": "drupal/gdpr",
"version": "3.0.0-alpha3",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/gdpr.git",
"reference": "3.0.0-alpha3"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/gdpr-3.0.0-alpha3.zip",
"reference": "3.0.0-alpha3",
"shasum": "eb0115cd616c3f81851090e0c3432634a1b3b246"
},
"require": {
"drupal/checklistapi": "^1.0",
"drupal/core": "^8 || ^9",
"drupal/entity": "^1.0",
"drupal/entity_reference_revisions": "^1.8",
"drupal/message": "^1.0",
"drupal/token": "^1.7"
},
"require-dev": {
"drupal/anonymizer": "*",
"drupal/entity": "*",
"drupal/entity_reference_revisions": "*",
"drupal/gdpr_fields": "*",
"drupal/message": "*",
"drupal/token": "*"
},
"suggest": {
"drush/drush": "GDPR Dump requires Drush ^9 || ^10",
"ext-zip": "GDPR Tasks requires the PHP zip extension",
"fzaninotto/faker": "Required for the anonymizer submodule (which is required by multiple submodules)."
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "3.0.0-alpha3",
"datestamp": "1623442449",
"security-coverage": {
"status": "not-covered",
"message": "Project has not opted into security advisory coverage!"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0+"
],
"authors": [
{
"name": "mhavelant",
"homepage": "https://www.drupal.org/user/1086292",
"email": "mhavelant@brainsum.com"
},
{
"name": "Kosa Ilma",
"homepage": "https://www.drupal.org/user/3435475"
},
{
"name": "alexdmccabe",
"homepage": "https://www.drupal.org/user/1358588"
},
{
"name": "andrewbelcher",
"homepage": "https://www.drupal.org/user/655282"
},
{
"name": "back-2-95",
"homepage": "https://www.drupal.org/user/327328"
},
{
"name": "bfr",
"homepage": "https://www.drupal.org/user/369262"
},
{
"name": "dj1999",
"homepage": "https://www.drupal.org/user/387119"
},
{
"name": "golddragon007",
"homepage": "https://www.drupal.org/user/2723471"
},
{
"name": "lbesenyei",
"homepage": "https://www.drupal.org/user/2626013"
},
{
"name": "leymannx",
"homepage": "https://www.drupal.org/user/2482808"
},
{
"name": "mhavelant",
"homepage": "https://www.drupal.org/user/3331139"
},
{
"name": "pedrop",
"homepage": "https://www.drupal.org/user/1043368"
},
{
"name": "szato",
"homepage": "https://www.drupal.org/user/389677"
},
{
"name": "yanniboi",
"homepage": "https://www.drupal.org/user/1837556"
}
],
"description": "Helps with making a site GDPR-compliant.",
"homepage": "https://www.drupal.org/project/gdpr",
"support": {
"source": "https://git.drupalcode.org/project/gdpr"
}
},
{
"name": "drupal/genpass",
"version": "dev-1.x",
@ -9567,6 +9806,69 @@
},
"time": "2020-04-25T06:50:43+00:00"
},
{
"name": "drupal/message",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/message.git",
"reference": "8.x-1.2"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/message-8.x-1.2.zip",
"reference": "8.x-1.2",
"shasum": "f1494d8c482840b01f8d1dcc4ed572d5844a3873"
},
"require": {
"drupal/core": "^8 || ^9"
},
"require-dev": {
"drupal/token": "*"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.2",
"datestamp": "1607017386",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0+"
],
"authors": [
{
"name": "Grayside",
"homepage": "https://www.drupal.org/user/346868"
},
{
"name": "RoySegall",
"homepage": "https://www.drupal.org/user/1812910"
},
{
"name": "amitaibu",
"homepage": "https://www.drupal.org/user/57511"
},
{
"name": "itamar",
"homepage": "https://www.drupal.org/user/1757910"
},
{
"name": "jhedstrom",
"homepage": "https://www.drupal.org/user/208732"
}
],
"description": "Message",
"homepage": "https://www.drupal.org/project/message",
"support": {
"source": "https://git.drupalcode.org/project/message"
}
},
{
"name": "drupal/migrate_devel",
"version": "dev-2.x",
@ -20239,6 +20541,7 @@
"drupal/field_group": 20,
"drupal/flag": 20,
"drupal/flag_lists": 20,
"drupal/gdpr": 15,
"drupal/genpass": 20,
"drupal/image_delta_formatter": 20,
"drupal/image_effects": 20,

View File

@ -5,6 +5,7 @@ dependencies:
module:
- context
- materio_simplenews
- system
- user
theme:
- materiotheme
@ -26,13 +27,13 @@ settings:
visibility:
view_inclusion:
id: view_inclusion
negate: null
negate: false
view_inclusion: { }
context_mapping: { }
request_path_exclusion:
id: request_path_exclusion
pages: ''
negate: null
negate: true
context_mapping: { }
user_role:
id: user_role
@ -41,3 +42,8 @@ visibility:
negate: false
context_mapping:
user: '@user.current_user_context:current_user'
request_path:
id: request_path
pages: '<front>'
negate: false
context_mapping: { }

View File

@ -0,0 +1,31 @@
uuid: 4c2a2713-7fd0-4b0a-ab12-0e23ac5f266d
langcode: fr
status: true
dependencies:
config:
- system.menu.footer
module:
- menu_block
theme:
- materiotheme
id: pieddepage
theme: materiotheme
region: footer_right
weight: 0
provider: null
plugin: 'menu_block:footer'
settings:
id: 'menu_block:footer'
label: 'Pied de page'
provider: menu_block
label_display: '0'
follow: false
follow_parent: child
level: 1
depth: 0
expand_all_items: false
parent: 'footer:'
suggestion: footer
label_type: block
label_link: false
visibility: { }

View File

@ -0,0 +1,14 @@
progress:
'#changed': 1626256183
'#changed_by': '1'
'#completed_items': 3
'#items':
responsibility_agreement:
'#completed': 1626252228
'#uid': '1'
recommended_resources:
'#completed': 1626252228
'#uid': '1'
data1:
'#completed': 1626256183
'#uid': '1'

View File

@ -0,0 +1,17 @@
uuid: f6f21b8c-e8ca-4a8a-ba93-abe3faf27ec6
langcode: fr
status: true
dependencies: { }
id: privacy_policy
label: 'Privacy Policy'
context:
show_warning: true
group:
language: true
fallback:
language: ''
menu:
path: /admin/content/pp
weight: 0
description: ''
token: false

View File

@ -0,0 +1,33 @@
uuid: 10a81d39-c483-478a-ad70-a7b88e6fb564
langcode: fr
status: true
dependencies:
config:
- config_pages.type.privacy_policy
- field.field.config_pages.privacy_policy.field_body
- field.field.config_pages.privacy_policy.field_title
module:
- text
id: config_pages.privacy_policy.default
targetEntityType: config_pages
bundle: privacy_policy
mode: default
content:
field_body:
weight: 1
settings:
rows: 5
placeholder: ''
third_party_settings: { }
type: text_textarea
region: content
field_title:
weight: 0
settings:
size: 60
placeholder: ''
third_party_settings: { }
type: string_textfield
region: content
hidden:
label: true

View File

@ -0,0 +1,25 @@
uuid: a227c533-9142-437d-8dcc-b60138e0716e
langcode: fr
status: true
dependencies:
config:
- config_pages.type.privacy_policy
- field.field.config_pages.privacy_policy.field_body
- field.field.config_pages.privacy_policy.field_title
module:
- text
id: config_pages.privacy_policy.default
targetEntityType: config_pages
bundle: privacy_policy
mode: default
content:
field_body:
weight: 0
label: hidden
settings: { }
third_party_settings: { }
type: text_default
region: content
hidden:
field_title: true
search_api_excerpt: true

View File

@ -18,6 +18,7 @@ module:
block: 0
breakpoint: 0
bulkdelete: 0
checklistapi: 0
ckeditor: 0
commerce: 0
commerce_cart: 0
@ -85,6 +86,7 @@ module:
flag: 0
flag_lists: 0
flood_control: 0
gdpr: 0
genpass: 0
graphql: 0
help: 0
@ -214,6 +216,7 @@ module:
views: 10
materio_id: 11
figli_starter_kit: 1000
eu_cookie_compliance: 1001
theme:
stable: 0
classy: 0

View File

@ -0,0 +1,73 @@
uuid: 2647fcd3-353c-4778-af4d-4690965ed796
cookie_lifetime: 100
containing_element: body
domain: ''
domains_option: 1
domains_list: ''
eu_only: null
eu_only_js: null
exclude_paths: "/admin\r\n/admin/*\r\n/batch\r\n/node/add*\r\n/node/*/*\r\n/user/*/*"
exclude_admin_theme: true
langcode: en
popup_agreed:
value: "<h2>Thank you for accepting cookies</h2>\r\n\r\n<p>You can now hide this message or find out more about cookies.</p>\r\n"
format: wysiwyg
popup_agree_button_message: Accept
popup_agreed_enabled: false
popup_bg_hex: 1A1A1A
popup_clicking_confirmation: false
popup_scrolling_confirmation: false
popup_delay: 1000
show_more_info: true
popup_more_info_button_message: 'More info'
popup_enabled: true
popup_find_more_button_message: 'More info'
popup_height: null
popup_hide_agreed: false
popup_hide_button_message: Hide
popup_info:
value: "<h2>We use cookies on this site to enhance your user experience</h2>\r\n\r\n<p>By clicking the Accept button, you agree to us doing so.</p>\r\n"
format: wysiwyg
mobile_popup_info:
value: ''
format: wysiwyg
popup_info_template: new
mobile_breakpoint: 768
popup_link: /privacy-policy
popup_link_new_window: true
popup_position: false
fixed_top_position: true
popup_text_hex: ffffff
popup_width: 100%
use_bare_css: false
disagree_do_not_show_popup: false
reload_page: false
cookie_name: ''
exclude_uid_1: true
better_support_for_screen_readers: true
use_mobile_message: false
method: categories
disagree_button_label: 'No, thanks'
disabled_javascripts: ''
automatic_cookies_removal: true
allowed_cookies: ''
consent_storage_method: do_not_store
withdraw_message:
value: "<h2>We use cookies on this site to enhance your user experience</h2>\r\n\r\n<p>You have given your consent for us to set cookies.</p>\r\n"
format: wysiwyg
withdraw_action_button_label: 'Withdraw consent'
withdraw_tab_button_label: 'Privacy settings'
withdraw_enabled: false
enable_save_preferences_button: false
save_preferences_button_label: 'Save preferences'
accept_all_categories_button_label: 'Accept all cookies'
withdraw_button_on_info_popup: false
domain_all_sites: false
settings_tab_enabled: false
reload_options: 0
reload_routes_list: ''
cookie_policy_version: 1.0.0
_core:
default_config_hash: Wph0IY6FThC4QuHAGcSQDx6S8gysoclVsF2tkm4Lu8o
cookie_session: 0
set_cookie_session_zero_on_disagree: 0

View File

@ -0,0 +1,26 @@
uuid: a98535c8-7582-4bff-a725-6e958dd56a62
langcode: fr
status: true
dependencies:
config:
- config_pages.type.privacy_policy
- field.storage.config_pages.field_body
module:
- text
- unique_content_field_validation
third_party_settings:
unique_content_field_validation:
unique: false
unique_text: ''
id: config_pages.privacy_policy.field_body
field_name: field_body
entity_type: config_pages
bundle: privacy_policy
label: Body
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long

View File

@ -0,0 +1,25 @@
uuid: 9e0c2eb9-d53a-44b7-8b59-c954b08df006
langcode: fr
status: true
dependencies:
config:
- config_pages.type.privacy_policy
- field.storage.config_pages.field_title
module:
- unique_content_field_validation
third_party_settings:
unique_content_field_validation:
unique: false
unique_text: ''
id: config_pages.privacy_policy.field_title
field_name: field_title
entity_type: config_pages
bundle: privacy_policy
label: Title
description: ''
required: true
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: string

View File

@ -0,0 +1,11 @@
links:
en:
privacy_policy: 'internal:/privacy-policy'
terms_of_use: 'internal:/tos'
about_us: ''
impressum: ''
fr:
privacy_policy: 'internal:/privacy-policy'
terms_of_use: 'internal:/tos'
about_us: ''
impressum: ''

View File

@ -0,0 +1,11 @@
popup_agreed:
value: '<h2>Merci d''avoir accepté les cookies</h2><p>Vous pouvez désormais masquer ce message ou en apprendre plus à propos des cookies.</p>'
popup_agree_button_message: Accepter
popup_more_info_button_message: 'En savoir plus'
popup_find_more_button_message: 'En savoir plus'
popup_hide_button_message: Masquer
disagree_button_label: 'Non, merci.'
withdraw_message:
value: '<h2>Nous utilisons des cookies sur ce site pour améliorer votre expérience d''utilisateur.</h2><p>Vous avez consenti à l''ajout de cookies.</p>'
withdraw_action_button_label: 'Retirer le consentement'
withdraw_tab_button_label: 'Paramètres de confidentialité'

View File

@ -71,6 +71,18 @@ menus:
weight: '-47'
langcode: en
uuid: 91487096-dd83-44e8-9a1b-65751642b8b3
-
menu_name: editors
title: 'privacy policy'
parent: null
uri: 'internal:/admin/content/pp'
link_title: ''
description: null
enabled: '1'
expanded: '0'
weight: '0'
langcode: en
uuid: cbc6effd-115e-4e17-81d7-ffd4e5bfaffb
-
menu_name: header
title: Base

View File

@ -1,5 +1,5 @@
uuid: 43d01019-48ca-4879-a709-82facc1d008a
langcode: en
langcode: und
status: true
dependencies: { }
_core:

View File

@ -12,6 +12,7 @@ permissions:
- 'create member profile'
- 'create note content'
- 'create workflow workflow_transition'
- 'display eu cookie compliance popup'
- 'edit own flag lists'
- 'edit own note content'
- 'flag dossier other items'

View File

@ -97,6 +97,7 @@ permissions:
- 'edit own note content'
- 'edit own thematique content'
- 'edit own workflow workflow_transition'
- 'edit privacy_policy config page entity'
- 'edit terms in assisted_research'
- 'edit terms in collectionneurs'
- 'edit terms in company'

View File

@ -11,6 +11,7 @@ permissions:
- 'add flag lists'
- 'create member profile'
- 'create note content'
- 'display eu cookie compliance popup'
- 'edit own flag lists'
- 'edit own note content'
- 'flag dossier other items'

View File

@ -21,6 +21,7 @@ permissions:
- 'create generique workflow_transition'
- 'create migration workflow_transition'
- 'create workflow workflow_transition'
- 'display eu cookie compliance popup'
- 'execute materio arbitrary graphql requests'
- 'execute materio persisted graphql requests'
- 'issue subrequests'
@ -29,6 +30,7 @@ permissions:
- 'subscribe to newsletters'
- 'use text format wysiwyg'
- 'view commerce_product'
- 'view privacy_policy config page entity'
- 'view published fil entities'
- 'view search api pages'
- 'view terms_of_services config page entity'

View File

@ -22,6 +22,7 @@ permissions:
- 'create generique workflow_transition'
- 'delete own composition entities'
- 'delete own fil entities'
- 'display eu cookie compliance popup'
- 'edit own chutier entities'
- 'edit own composition entities'
- 'edit own fil entities'
@ -42,6 +43,7 @@ permissions:
- 'view own unpublished chutier entities'
- 'view own unpublished composition entities'
- 'view own unpublished fil entities'
- 'view privacy_policy config page entity'
- 'view published composition entities'
- 'view published fil entities'
- 'view search api pages'

View File

@ -8,6 +8,7 @@ weight: -6
is_admin: null
permissions:
- 'create member profile'
- 'display eu cookie compliance popup'
- 'update own contact_company profile'
- 'update own member profile'
- 'view own contact_company profile'

View File

@ -8,5 +8,6 @@ weight: -7
is_admin: null
permissions:
- 'create member profile'
- 'display eu cookie compliance popup'
- 'update own member profile'
- 'view own member profile'

View File

@ -10,6 +10,7 @@ permissions:
- 'access materio search'
- 'add flag lists'
- 'create member profile'
- 'display eu cookie compliance popup'
- 'edit own flag lists'
- 'flag dossier other items'
- 'unflag dossier other items'

View File

@ -10,6 +10,7 @@ permissions:
- 'access materio search'
- 'add flag lists'
- 'create note content'
- 'display eu cookie compliance popup'
- 'edit own flag lists'
- 'edit own note content'
- 'flag dossier other items'

View File

@ -7,4 +7,5 @@ label: Unverified
weight: -10
is_admin: null
permissions:
- 'display eu cookie compliance popup'
- 'execute materio persisted graphql requests'

View File

@ -21,3 +21,11 @@ materio_user.login_block:
_format: json
requirements:
_access: 'TRUE'
materio_user.privacy_policy:
path: '/privacy-policy'
defaults:
_controller: '\Drupal\materio_user\Controller\MaterioUserPrivacyPolicy::getPp'
_title_callback: '\Drupal\materio_user\Controller\MaterioUserPrivacyPolicy::getTitle'
requirements:
_permission: 'access content'

View File

@ -0,0 +1,71 @@
<?php
namespace Drupal\materio_commerce\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Url;
use Symfony\Component\HttpFoundation\Request;
// use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\config_pages\Entity\ConfigPages;
use Drupal\config_pages\Entity\ConfigPagesType;
/**
* Class AjaxHomeController.
*/
class MaterioCommerceTermsViewer extends ControllerBase {
/*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $languageManager;
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('language_manager')
);
}
/**
* Constructs a new MaterioDecoupledLanguageLinks object.
*
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/
public function __construct(LanguageManagerInterface $language_manager) {
$this->languageManager = $language_manager;
}
/**
* getTerms
*
* @return string
* Return config_page terms_of_services display.
*/
public function getTos(Request $request) {
$config_page = $this->getConfigPage();
// Correct metatags attachment.
if (function_exists('metatag_get_tags_from_route')) {
$metatag_attachments = &drupal_static('metatag_attachments');
$metatag_attachments = metatag_get_tags_from_route($config_page);
}
return parent::entityTypeManager()->getViewBuilder('config_pages')->view($config_page, 'full');
}
public function getTitle(Request $request) {
$config_page = $this->getConfigPage();
return $config_page->get('field_title')->getString();
}
private function getConfigPage(){
return ConfigPages::load("terms_of_services");
}
}

View File

@ -0,0 +1,71 @@
<?php
namespace Drupal\materio_user\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Url;
use Symfony\Component\HttpFoundation\Request;
// use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\config_pages\Entity\ConfigPages;
use Drupal\config_pages\Entity\ConfigPagesType;
/**
* Class AjaxHomeController.
*/
class MaterioUserPrivacyPolicy extends ControllerBase {
/*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $languageManager;
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('language_manager')
);
}
/**
* Constructs a new MaterioDecoupledLanguageLinks object.
*
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/
public function __construct(LanguageManagerInterface $language_manager) {
$this->languageManager = $language_manager;
}
/**
* getTerms
*
* @return string
* Return config_page terms_of_services display.
*/
public function getPp(Request $request) {
$config_page = $this->getConfigPage();
// Correct metatags attachment.
if (function_exists('metatag_get_tags_from_route')) {
$metatag_attachments = &drupal_static('metatag_attachments');
$metatag_attachments = metatag_get_tags_from_route($config_page);
}
return parent::entityTypeManager()->getViewBuilder('config_pages')->view($config_page, 'full');
}
public function getTitle(Request $request) {
$config_page = $this->getConfigPage();
return $config_page->get('field_title')->getString();
}
private function getConfigPage(){
return ConfigPages::load("privacy_policy");
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -573,6 +573,11 @@ header[role="banner"]{
color: #fff;
background-color: $color-showrooms;
}
body.path-privacy-policy &,
body.path-tos & {
color: #fff;
background-color: $color-main-text;
}
}
@include col-mediaquery-max(3){
body.path-frontpage &, body.path-home & {
@ -2818,50 +2823,80 @@ form#user-pass{
// | _/ _ \/ _ \ _/ -_) '_|
// |_|\___/\___/\__\___|_|
footer[role="contentinfo"]{
body:not(.path-home) & {
display:none;
// body:not(.path-home) & {
// display:none;
// }
>.wrapper{
display:flex;
flex-flow: row nowrap;
>div{
flex: 1 1 auto;
align-self: center;
}
}
#block-materiosimplenewssubscription{
form{
display: flex;
flex-flow: row nowrap;
align-items: center;
font-size: 0.756em;
>*{
margin-right: 0.5em;
}
#edit-subscriptions{
#footer-left{
#block-materiosimplenewssubscription{
form{
display: flex;
flex-flow: row nowrap;
align-items: center;
font-size: 0.756em;
>*{
margin-right: 0.5em;
}
#edit-subscriptions{
display: flex;
flex-flow: row nowrap;
align-items: center;
>*{
margin-right: 0.5em;
display: flex;
flex-flow: row nowrap;
align-items: center;
}
input{
margin-right: 0.3em;
}
}
input{
margin-right: 0.3em;
#edit-mail-wrapper{
input[type="email"]{
width:10em;
}
}
#edit-actions--2{
input[type="submit"]{
border: none;
background: none;
background-color: $color-base;
border-radius: 5px;
color: #fff;
padding: 0.45em 1em;
font-weight: 700;
}
}
}
#edit-mail-wrapper{
input[type="email"]{
width:10em;
}
}
#edit-actions--2{
input[type="submit"]{
border: none;
background: none;
background-color: $color-base;
border-radius: 5px;
color: #fff;
padding: 0.45em 1em;
font-weight: 700;
}
}
#footer-middle{
}
#footer-right{
text-align: right;
nav.block-menu.menu--footer{
display: inline-block;
font-size: 0.756em;
ul.menu{
padding:0; margin:0;
display: flex;
flex-flow: row nowrap;
li.menu-item{
padding: 1em 0.5em;
}
}
}
}
}

View File

@ -92,9 +92,15 @@
{% if page.footer_left or page.footer_center or page.footer_right %}
<footer role="contentinfo">
<div class="wrapper">
{{ page.footer_left }}
{{ page.footer_center }}
{{ page.footer_right }}
<div id="footer-left">
{{ page.footer_left }}
</div>
<div id="footer-middle">
{{ page.footer_center }}
</div>
<div id="footer-right">
{{ page.footer_right }}
</div>
</div>
</footer>
{% endif %}