From 838a3d4a0a2c58784f85d2a2a88fc36a2abc81e7 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 1 Aug 2020 13:41:27 +0200 Subject: [PATCH] fix language and access thumbnail --- composer.json | 1 + composer.lock | 54 ++++++++++++++++++- web/sites/development.services.yml | 3 ++ web/themes/custom/popsu_colloque/js/script.js | 4 +- .../node/node--page-d-accueil.html.twig | 6 +++ .../views-view-fields--programme.html.twig | 7 ++- ...ews-view-fields--slide_programme.html.twig | 2 +- 7 files changed, 69 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 69acc5c4..9e1d0252 100644 --- a/composer.json +++ b/composer.json @@ -35,6 +35,7 @@ "drupal/metatag": "^1.13", "drupal/paragraphs": "^1.12", "drupal/pathauto": "^1.8", + "drupal/redirect": "^1.6", "drupal/redirect_after_login": "^2.6", "drupal/schema_metatag": "^1.5", "drupal/site_settings": "^1.19", diff --git a/composer.lock b/composer.lock index abccfa31..a32054e1 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "4adedd5f54b7450a9a32db9fc6e7b567", + "content-hash": "a7bde48f6a0f27cdbff9b3e6987b76f4", "packages": [ { "name": "asm89/stack-cors", @@ -4104,6 +4104,58 @@ "documentation": "https://www.drupal.org/docs/8/modules/pathauto" } }, + { + "name": "drupal/redirect", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/redirect.git", + "reference": "8.x-1.6" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.6.zip", + "reference": "8.x-1.6", + "shasum": "f848e001deac8425ae57d4b9397087c491d37294" + }, + "require": { + "drupal/core": "^8.8 || ^9" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.6", + "datestamp": "1589312204", + "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": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + }, + { + "name": "pifagor", + "homepage": "https://www.drupal.org/user/2375692" + } + ], + "description": "Allows users to redirect from old URLs to new URLs.", + "homepage": "https://www.drupal.org/project/redirect", + "support": { + "source": "https://git.drupalcode.org/project/redirect" + } + }, { "name": "drupal/redirect_after_login", "version": "2.6.0", diff --git a/web/sites/development.services.yml b/web/sites/development.services.yml index d2857c66..c92f72fb 100644 --- a/web/sites/development.services.yml +++ b/web/sites/development.services.yml @@ -4,6 +4,9 @@ # 'example.settings.local.php' file, which sits next to this file. parameters: http.response.debug_cacheability_headers: true + twig.config: + debug: false + auto_reload: true services: cache.backend.null: class: Drupal\Core\Cache\NullBackendFactory diff --git a/web/themes/custom/popsu_colloque/js/script.js b/web/themes/custom/popsu_colloque/js/script.js index 0b0cf154..a3a12220 100644 --- a/web/themes/custom/popsu_colloque/js/script.js +++ b/web/themes/custom/popsu_colloque/js/script.js @@ -213,11 +213,11 @@ if ($(this).attr('id') == 'edit-field-theme-target-id') { - var newhtml = optionContent.replace("- Any -", "Thèmes"); + var newhtml = optionContent.replace("- Any -", "Thèmes").replace("- Tout -", "Thèmes"); } else if ($(this).attr('id') == 'edit-field-type-de-publication-target-id' ) { - var newhtml = optionContent.replace("- Any -", "Publications"); + var newhtml = optionContent.replace("- Any -", "Publications").replace("- Tout -", "Publications"); } else { // nothing diff --git a/web/themes/custom/popsu_colloque/template/node/node--page-d-accueil.html.twig b/web/themes/custom/popsu_colloque/template/node/node--page-d-accueil.html.twig index 25fc3bfe..8bfb07e3 100644 --- a/web/themes/custom/popsu_colloque/template/node/node--page-d-accueil.html.twig +++ b/web/themes/custom/popsu_colloque/template/node/node--page-d-accueil.html.twig @@ -96,4 +96,10 @@ +
+
+ {{content.field_le_direct}} +
+
+ diff --git a/web/themes/custom/popsu_colloque/template/views/fields/views-view-fields--programme.html.twig b/web/themes/custom/popsu_colloque/template/views/fields/views-view-fields--programme.html.twig index d093745c..7e56c11a 100644 --- a/web/themes/custom/popsu_colloque/template/views/fields/views-view-fields--programme.html.twig +++ b/web/themes/custom/popsu_colloque/template/views/fields/views-view-fields--programme.html.twig @@ -34,7 +34,7 @@ {# {% include 'themes/custom/popsu_colloque/template/components/thumbnails.html.twig' %} #} -{% if fields.field_accessible.content %} +{% if fields.field_accessible.content == "1" %} {% endif %} @@ -56,10 +56,9 @@ -
+