Browse Source

ressources content type & view first draft

bach 8 months ago
parent
commit
6f298ecd4f

+ 22 - 0
config/sync/core.base_field_override.node.ressource.promote.yml

@@ -0,0 +1,22 @@
+uuid: fc8adf94-a735-4c62-ae35-bda3c65c4636
+langcode: fr
+status: true
+dependencies:
+  config:
+    - node.type.ressource
+id: node.ressource.promote
+field_name: promote
+entity_type: node
+bundle: ressource
+label: "Promu en page d'accueil"
+description: ''
+required: false
+translatable: true
+default_value:
+  -
+    value: 0
+default_value_callback: ''
+settings:
+  on_label: Activé
+  off_label: Désactivé
+field_type: boolean

+ 114 - 0
config/sync/core.entity_form_display.node.ressource.default.yml

@@ -0,0 +1,114 @@
+uuid: 2859e1db-20e2-47f1-ab8b-4e8b840fd2ce
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.field.node.ressource.body
+    - field.field.node.ressource.field_fichiers
+    - field.field.node.ressource.field_image
+    - field.field.node.ressource.field_liens
+    - field.field.node.ressource.field_operation
+    - image.style.thumbnail
+    - node.type.ressource
+  module:
+    - field_group
+    - file
+    - image
+    - link
+    - text
+third_party_settings:
+  field_group:
+    group_details:
+      children:
+        - status
+        - promote
+      label: Details
+      region: content
+      parent_name: ''
+      weight: 6
+      format_type: details_sidebar
+      format_settings:
+        classes: ''
+        show_empty_fields: false
+        id: ''
+        label_as_html: false
+        open: true
+        description: ''
+        required_fields: true
+        weight: 0
+id: node.ressource.default
+targetEntityType: node
+bundle: ressource
+mode: default
+content:
+  body:
+    type: text_textarea_with_summary
+    weight: 2
+    region: content
+    settings:
+      rows: 9
+      summary_rows: 3
+      placeholder: ''
+      show_summary: false
+    third_party_settings: {  }
+  field_fichiers:
+    type: file_generic
+    weight: 4
+    region: content
+    settings:
+      progress_indicator: throbber
+    third_party_settings: {  }
+  field_image:
+    type: image_image
+    weight: 3
+    region: content
+    settings:
+      progress_indicator: throbber
+      preview_image_style: thumbnail
+    third_party_settings: {  }
+  field_liens:
+    type: link_default
+    weight: 5
+    region: content
+    settings:
+      placeholder_url: ''
+      placeholder_title: ''
+    third_party_settings: {  }
+  field_operation:
+    type: entity_reference_autocomplete
+    weight: 1
+    region: content
+    settings:
+      match_operator: CONTAINS
+      match_limit: 10
+      size: 60
+      placeholder: ''
+    third_party_settings: {  }
+  promote:
+    type: boolean_checkbox
+    weight: 7
+    region: content
+    settings:
+      display_label: true
+    third_party_settings: {  }
+  status:
+    type: boolean_checkbox
+    weight: 6
+    region: content
+    settings:
+      display_label: true
+    third_party_settings: {  }
+  title:
+    type: string_textfield
+    weight: 0
+    region: content
+    settings:
+      size: 60
+      placeholder: ''
+    third_party_settings: {  }
+hidden:
+  created: true
+  langcode: true
+  path: true
+  sticky: true
+  uid: true

+ 72 - 0
config/sync/core.entity_view_display.node.ressource.default.yml

@@ -0,0 +1,72 @@
+uuid: accf32e0-5ff5-4270-ad3c-9737a4148505
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.field.node.ressource.body
+    - field.field.node.ressource.field_fichiers
+    - field.field.node.ressource.field_image
+    - field.field.node.ressource.field_liens
+    - field.field.node.ressource.field_operation
+    - node.type.ressource
+  module:
+    - file
+    - image
+    - link
+    - text
+    - user
+id: node.ressource.default
+targetEntityType: node
+bundle: ressource
+mode: default
+content:
+  body:
+    type: text_default
+    label: hidden
+    settings: {  }
+    third_party_settings: {  }
+    weight: 2
+    region: content
+  field_fichiers:
+    type: file_default
+    label: visually_hidden
+    settings:
+      use_description_as_link_text: true
+    third_party_settings: {  }
+    weight: 3
+    region: content
+  field_image:
+    type: image
+    label: visually_hidden
+    settings:
+      image_link: ''
+      image_style: ''
+      image_loading:
+        attribute: lazy
+    third_party_settings: {  }
+    weight: 0
+    region: content
+  field_liens:
+    type: link
+    label: above
+    settings:
+      trim_length: 80
+      url_only: false
+      url_plain: false
+      rel: ''
+      target: ''
+    third_party_settings: {  }
+    weight: 4
+    region: content
+  field_operation:
+    type: entity_reference_label
+    label: visually_hidden
+    settings:
+      link: true
+    third_party_settings: {  }
+    weight: 1
+    region: content
+hidden:
+  langcode: true
+  links: true
+  search_api_excerpt: true

+ 59 - 0
config/sync/core.entity_view_display.node.ressource.teaser.yml

@@ -0,0 +1,59 @@
+uuid: 85c9ed3e-7cb7-40f8-8875-8b8cf875cabb
+langcode: fr
+status: true
+dependencies:
+  config:
+    - core.entity_view_mode.node.teaser
+    - field.field.node.ressource.body
+    - field.field.node.ressource.field_fichiers
+    - field.field.node.ressource.field_image
+    - field.field.node.ressource.field_liens
+    - field.field.node.ressource.field_operation
+    - image.style.large
+    - node.type.ressource
+  module:
+    - image
+    - text
+    - user
+id: node.ressource.teaser
+targetEntityType: node
+bundle: ressource
+mode: teaser
+content:
+  body:
+    type: text_summary_or_trimmed
+    label: hidden
+    settings:
+      trim_length: 600
+    third_party_settings: {  }
+    weight: 2
+    region: content
+  field_image:
+    type: image
+    label: visually_hidden
+    settings:
+      image_link: ''
+      image_style: large
+      image_loading:
+        attribute: lazy
+    third_party_settings: {  }
+    weight: 0
+    region: content
+  field_operation:
+    type: entity_reference_label
+    label: visually_hidden
+    settings:
+      link: true
+    third_party_settings: {  }
+    weight: 1
+    region: content
+  links:
+    settings: {  }
+    third_party_settings: {  }
+    weight: 3
+    region: content
+hidden:
+  field_fichiers: true
+  field_liens: true
+  langcode: true
+  search_api_excerpt: true

+ 24 - 0
config/sync/field.field.node.ressource.body.yml

@@ -0,0 +1,24 @@
+uuid: b939d78a-8abd-4cf1-a1ae-3a25ea869c3d
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.node.body
+    - node.type.ressource
+  module:
+    - text
+id: node.ressource.body
+field_name: body
+entity_type: node
+bundle: ressource
+label: Body
+description: ''
+required: false
+translatable: true
+default_value: {  }
+default_value_callback: ''
+settings:
+  display_summary: true
+  required_summary: false
+  allowed_formats: {  }
+field_type: text_with_summary

+ 27 - 0
config/sync/field.field.node.ressource.field_fichiers.yml

@@ -0,0 +1,27 @@
+uuid: c072e75a-23fc-4972-a636-c58c58366533
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.node.field_fichiers
+    - node.type.ressource
+  module:
+    - file
+id: node.ressource.field_fichiers
+field_name: field_fichiers
+entity_type: node
+bundle: ressource
+label: Fichiers
+description: ''
+required: false
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings:
+  handler: 'default:file'
+  handler_settings: {  }
+  file_directory: '[date:custom:Y]-[date:custom:m]'
+  file_extensions: 'txt pdf doc docx obs png jpg svg'
+  max_filesize: 5MB
+  description_field: true
+field_type: file

+ 38 - 0
config/sync/field.field.node.ressource.field_image.yml

@@ -0,0 +1,38 @@
+uuid: ffb148c9-c093-4728-bb35-b2933dcc6616
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.node.field_image
+    - node.type.ressource
+  module:
+    - image
+id: node.ressource.field_image
+field_name: field_image
+entity_type: node
+bundle: ressource
+label: Image
+description: ''
+required: false
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings:
+  handler: 'default:file'
+  handler_settings: {  }
+  file_directory: '[date:custom:Y]-[date:custom:m]'
+  file_extensions: 'png gif jpg jpeg'
+  max_filesize: 2MB
+  max_resolution: ''
+  min_resolution: ''
+  alt_field: true
+  alt_field_required: false
+  title_field: false
+  title_field_required: false
+  default_image:
+    uuid: ''
+    alt: ''
+    title: ''
+    width: null
+    height: null
+field_type: image

+ 23 - 0
config/sync/field.field.node.ressource.field_liens.yml

@@ -0,0 +1,23 @@
+uuid: 47eb637a-2196-4ee0-8bf1-4beed61da41c
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.node.field_liens
+    - node.type.ressource
+  module:
+    - link
+id: node.ressource.field_liens
+field_name: field_liens
+entity_type: node
+bundle: ressource
+label: Liens
+description: ''
+required: false
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings:
+  title: 1
+  link_type: 17
+field_type: link

+ 29 - 0
config/sync/field.field.node.ressource.field_operation.yml

@@ -0,0 +1,29 @@
+uuid: ce4fe227-c3f7-4e42-88c1-ed9c0f46a152
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.node.field_operation
+    - node.type.operation
+    - node.type.ressource
+id: node.ressource.field_operation
+field_name: field_operation
+entity_type: node
+bundle: ressource
+label: Operation
+description: ''
+required: false
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings:
+  handler: 'default:node'
+  handler_settings:
+    target_bundles:
+      operation: operation
+    sort:
+      field: _none
+      direction: ASC
+    auto_create: false
+    auto_create_bundle: ''
+field_type: entity_reference

+ 19 - 0
config/sync/field.storage.node.field_liens.yml

@@ -0,0 +1,19 @@
+uuid: 02c60c35-a29c-4a5e-9136-0afb90dbc7c3
+langcode: fr
+status: true
+dependencies:
+  module:
+    - link
+    - node
+id: node.field_liens
+field_name: field_liens
+entity_type: node
+type: link
+settings: {  }
+module: link
+locked: false
+cardinality: -1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 19 - 0
config/sync/field.storage.node.field_operation.yml

@@ -0,0 +1,19 @@
+uuid: 6eeffd11-9e8e-4659-b3dc-8b163e695ea8
+langcode: fr
+status: true
+dependencies:
+  module:
+    - node
+id: node.field_operation
+field_name: field_operation
+entity_type: node
+type: entity_reference
+settings:
+  target_type: node
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 11 - 0
config/sync/language.content_settings.node.ressource.yml

@@ -0,0 +1,11 @@
+uuid: 5cb32f86-2a09-48f6-8615-be652526d4d8
+langcode: fr
+status: true
+dependencies:
+  config:
+    - node.type.ressource
+id: node.ressource
+target_entity_type_id: node
+target_bundle: ressource
+default_langcode: site_default
+language_alterable: false

+ 17 - 0
config/sync/node.type.ressource.yml

@@ -0,0 +1,17 @@
+uuid: be2b347a-7f8b-4ab2-8a36-02b01f486838
+langcode: fr
+status: true
+dependencies:
+  module:
+    - menu_ui
+third_party_settings:
+  menu_ui:
+    available_menus: {  }
+    parent: ''
+name: Ressource
+type: ressource
+description: ''
+help: ''
+new_revision: true
+preview_mode: 1
+display_submitted: false

+ 8 - 0
config/sync/user.role.admin.yml

@@ -6,6 +6,7 @@ dependencies:
     - filter.format.wysiwyg
     - node.type.actualite
     - node.type.operation
+    - node.type.ressource
     - node.type.static
   module:
     - actions_permissions
@@ -37,14 +38,19 @@ permissions:
   - 'change own username'
   - 'create actualite content'
   - 'create content translations'
+  - 'create ressource content'
   - 'delete any actualite content'
+  - 'delete any ressource content'
   - 'delete own actualite content'
+  - 'delete own ressource content'
   - 'edit any actualite content'
   - 'edit any operation content'
+  - 'edit any ressource content'
   - 'edit any static content'
   - 'edit contact config page entity'
   - 'edit mentions_legales config page entity'
   - 'edit own actualite content'
+  - 'edit own ressource content'
   - 'edit partenaires config page entity'
   - 'execute entity:break_lock config_pages'
   - 'execute entity:break_lock node'
@@ -63,11 +69,13 @@ permissions:
   - 'execute vbo_cancel_user_action user'
   - 'execute views_bulk_edit all'
   - 'revert actualite revisions'
+  - 'revert ressource revisions'
   - 'revert static revisions'
   - 'update content translations'
   - 'use text format wysiwyg'
   - 'view actualite revisions'
   - 'view config_pages entity'
+  - 'view ressource revisions'
   - 'view static revisions'
   - 'view the administration theme'
   - 'view user email addresses'

+ 6 - 0
config/sync/user.role.editor.yml

@@ -5,6 +5,7 @@ dependencies:
   config:
     - filter.format.wysiwyg
     - node.type.actualite
+    - node.type.ressource
     - node.type.static
   module:
     - actions_permissions
@@ -27,20 +28,25 @@ permissions:
   - 'access user profiles'
   - 'break content lock'
   - 'create actualite content'
+  - 'create ressource content'
   - 'edit any actualite content'
+  - 'edit any ressource content'
   - 'edit any static content'
   - 'edit contact config page entity'
   - 'edit mentions_legales config page entity'
   - 'edit own actualite content'
+  - 'edit own ressource content'
   - 'edit partenaires config page entity'
   - 'execute entity:break_lock config_pages'
   - 'execute entity:break_lock node'
   - 'execute entity:save_action config_pages'
   - 'execute entity:save_action node'
   - 'revert actualite revisions'
+  - 'revert ressource revisions'
   - 'revert static revisions'
   - 'use text format wysiwyg'
   - 'view actualite revisions'
+  - 'view ressource revisions'
   - 'view static revisions'
   - 'view the administration theme'
   - 'view user email addresses'

+ 192 - 0
config/sync/views.view.ressources.yml

@@ -0,0 +1,192 @@
+uuid: 3ee0cbf8-88d1-459b-8263-1048bf8aa5c3
+langcode: fr
+status: true
+dependencies:
+  config:
+    - core.entity_view_mode.node.teaser
+    - node.type.ressource
+  module:
+    - node
+    - user
+id: ressources
+label: Ressources
+module: views
+description: ''
+tag: ''
+base_table: node_field_data
+base_field: nid
+display:
+  default:
+    id: default
+    display_title: Default
+    display_plugin: default
+    position: 0
+    display_options:
+      title: Ressources
+      fields:
+        title:
+          id: title
+          table: node_field_data
+          field: title
+          relationship: none
+          group_type: group
+          admin_label: ''
+          entity_type: node
+          entity_field: title
+          plugin_id: field
+          label: ''
+          exclude: false
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            trim: false
+            html: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_empty: false
+          empty_zero: false
+          hide_alter_empty: true
+          click_sort_column: value
+          type: string
+          settings:
+            link_to_entity: true
+          group_column: value
+          group_columns: {  }
+          group_rows: true
+          delta_limit: 0
+          delta_offset: 0
+          delta_reversed: false
+          delta_first_last: false
+          multi_type: separator
+          separator: ', '
+          field_api_classes: false
+      pager:
+        type: mini
+        options:
+          offset: 0
+          items_per_page: 10
+          total_pages: null
+          id: 0
+          tags:
+            next: ››
+            previous: ‹‹
+          expose:
+            items_per_page: false
+            items_per_page_label: 'Éléments par page'
+            items_per_page_options: '5, 10, 25, 50'
+            items_per_page_options_all: false
+            items_per_page_options_all_label: '- Tout -'
+            offset: false
+            offset_label: Décalage
+      exposed_form:
+        type: basic
+        options:
+          submit_button: Appliquer
+          reset_button: false
+          reset_button_label: Réinitialiser
+          exposed_sorts_label: 'Trier par'
+          expose_sort_order: true
+          sort_asc_label: Asc
+          sort_desc_label: Desc
+      access:
+        type: perm
+        options:
+          perm: 'access content'
+      cache:
+        type: tag
+        options: {  }
+      empty: {  }
+      sorts:
+        created:
+          id: created
+          table: node_field_data
+          field: created
+          relationship: none
+          group_type: group
+          admin_label: ''
+          entity_type: node
+          entity_field: created
+          plugin_id: date
+          order: DESC
+          expose:
+            label: ''
+            field_identifier: ''
+          exposed: false
+          granularity: second
+      arguments: {  }
+      filters:
+        status:
+          id: status
+          table: node_field_data
+          field: status
+          entity_type: node
+          entity_field: status
+          plugin_id: boolean
+          value: '1'
+          group: 1
+          expose:
+            operator: ''
+        type:
+          id: type
+          table: node_field_data
+          field: type
+          entity_type: node
+          entity_field: type
+          plugin_id: bundle
+          value:
+            ressource: ressource
+      style:
+        type: default
+      row:
+        type: 'entity:node'
+        options:
+          view_mode: teaser
+      query:
+        type: views_query
+        options:
+          query_comment: ''
+          disable_sql_rewrite: false
+          distinct: false
+          replica: false
+          query_tags: {  }
+      relationships: {  }
+      header: {  }
+      footer: {  }
+      display_extenders: {  }
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - url.query_args
+        - 'user.node_grants:view'
+        - user.permissions
+      tags: {  }
+  page_1:
+    id: page_1
+    display_title: Page
+    display_plugin: page
+    position: 1
+    display_options:
+      display_extenders: {  }
+      path: ressources
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - url.query_args
+        - 'user.node_grants:view'
+        - user.permissions
+      tags: {  }