ouidade 7 mesi fa
parent
commit
8668a0438e

+ 14 - 13
config/sync/views.view.viewed_by_book.yml

@@ -96,7 +96,7 @@ display:
           admin_label: ''
           plugin_id: numeric
           label: Depth
-          exclude: false
+          exclude: true
           alter:
             alter_text: false
             text: ''
@@ -128,7 +128,7 @@ display:
           element_class: ''
           element_label_type: ''
           element_label_class: ''
-          element_label_colon: true
+          element_label_colon: false
           element_wrapper_type: ''
           element_wrapper_class: ''
           element_default_classes: true
@@ -264,7 +264,7 @@ display:
           click_sort_column: value
           type: boolean
           settings:
-            format: default
+            format: yes-no
             format_custom_false: ''
             format_custom_true: ''
           group_column: value
@@ -456,30 +456,30 @@ display:
           plugin_id: language
           operator: in
           value:
-            all: all
-            '***LANGUAGE_site_default***': '***LANGUAGE_site_default***'
-            '***LANGUAGE_language_interface***': '***LANGUAGE_language_interface***'
             en: en
             fr: fr
             ja: ja
-            und: und
-            zxx: zxx
           group: 1
-          exposed: false
+          exposed: true
           expose:
-            operator_id: ''
-            label: ''
+            operator_id: langcode_op
+            label: 'Translation language'
             description: ''
             use_operator: false
-            operator: ''
+            operator: langcode_op
             operator_limit_selection: false
             operator_list: {  }
-            identifier: ''
+            identifier: langcode
             required: false
             remember: false
             multiple: false
             remember_roles:
               authenticated: authenticated
+              anonymous: '0'
+              admin: '0'
+              root: '0'
+              editor: '0'
+              translator: '0'
             reduce: false
           is_grouped: false
           group_info:
@@ -619,6 +619,7 @@ display:
     position: 2
     display_options:
       display_description: ''
+      rendering_language: '***LANGUAGE_entity_translation***'
       display_extenders: {  }
       path: admin/content/view_by_book
       menu:

+ 50 - 0
web/sites/development.services.yml

@@ -3,6 +3,56 @@
 # To activate this feature, follow the instructions at the top of the
 # 'example.settings.local.php' file, which sits next to this file.
 parameters:
+  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.
+    #
+    # 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.
+    #
+    # 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.
+    #
+    # Not recommended in production environments
+    # @default true
+    cache: false
+  # Cacheability debugging:
+  #
+  # Responses with cacheability metadata (CacheableResponseInterface instances)
+  # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
+  #
+  # For more information about debugging cacheable responses, see
+  # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
+  #
+  # Not recommended in production environments
+  # @default false
   http.response.debug_cacheability_headers: true
 services:
   cache.backend.null:

+ 12 - 12
web/themes/custom/rorschach/rorschach.theme

@@ -18,19 +18,19 @@ function rorschach_preprocess_html(&$variables) {
 }
 
 
-function rorschach_preprocess_node(&$variables){
-  $node = &$variables['node'];
-  $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
-  if($node->gettype() == "actualite") {
-    $actu_type = $node->get('field_actu_type')->getString();
-    $variables['attributes']['class'][] = 'actu-type-' . $actu_type;
-  }
-  if($node->gettype() == "offre_de_service") {
-    $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
-    $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
-  }
+// function rorschach_preprocess_node(&$variables){
+//   $node = &$variables['node'];
+//   $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
+//   if($node->gettype() == "actualite") {
+//     $actu_type = $node->get('field_actu_type')->getString();
+//     $variables['attributes']['class'][] = 'actu-type-' . $actu_type;
+//   }
+//   if($node->gettype() == "offre_de_service") {
+//     $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
+//     $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
+//   }
   
-}
+// }
 
 function rorschach_preprocess_field(&$variables) {
   $node = \Drupal::routeMatch()->getParameter('node');

+ 23 - 0
web/themes/custom/rorschach/templates/book-node-export-html.html.twig

@@ -0,0 +1,23 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a single node in a printer-friendly outline.
+ *
+ * Available variables:
+ * - node: Fully loaded node.
+ * - depth: Depth of the current node inside the outline.
+ * - title: Node title.
+ * - content: Node content.
+ * - children: All the child nodes recursively rendered through this file.
+ *
+ * @see template_preprocess_book_node_export_html()
+ *
+ * @ingroup themeable
+ */
+#}
+<article>
+  <h1>{{ title }}</h1>
+  {{ depth }}
+  {{ content }}
+  {{ children }}
+</article>

+ 39 - 0
web/themes/custom/rorschach/templates/field--node--title.html.twig

@@ -0,0 +1,39 @@
+{#
+/**
+ * @file
+ * Default theme implementation for the node title field.
+ *
+ * This is an override of field.html.twig for the node title field. See that
+ * template for documentation about its details and overrides.
+ *
+ * Available variables:
+ * - attributes: HTML attributes for the containing span element.
+ * - items: List of all the field items. Each item contains:
+ *   - attributes: List of HTML attributes for each item.
+ *   - content: The field item content.
+ * - entity_type: The entity type to which the field belongs.
+ * - field_name: The name of the field.
+ * - field_type: The type of the field.
+ * - label_display: The display settings for the label.
+ * - is_inline: If false, display an ordinary field.
+ *   If true, display an inline format, suitable for inside elements such as
+ *   <span>, <h2> and so on.
+ *
+ * @see field.html.twig
+ * @see node_preprocess_field__node()
+ *
+ * @ingroup themeable
+ *
+ * @todo Delete as part of https://www.drupal.org/node/3015623
+ */
+#}
+
+{% if not is_inline %}
+  {% include "field.html.twig" %}
+{% else %}
+<span{{ attributes }}>
+  {%- for item in items -%}
+    {{ item.content }}
+  {%- endfor -%}
+</span>
+{% endif %}