소스 검색

ressources blocks in programmes #1295

bach 3 년 전
부모
커밋
67b02aac45

+ 1 - 0
config/sync/core.extension.yml

@@ -110,6 +110,7 @@ module:
   path_alias_xt: 0
   pathologic: 0
   persistent_login: 0
+  popsu_link_block: 0
   popsu_migrate: 0
   redirect: 0
   redis: 0

+ 22 - 23
config/sync/page_manager.page_variant.node-panels_variant-0.yml

@@ -11,6 +11,7 @@ dependencies:
   module:
     - ctools
     - panels
+    - popsu_link_block
     - views
 id: node-panels_variant-0
 label: Programme
@@ -28,17 +29,6 @@ variant_settings:
       uuid: 8ec078d2-9a98-437a-ab1e-b18d1619f44a
       context_mapping:
         entity: node
-    9cfdc064-b1d5-4922-a7b6-fcd95c13f506:
-      id: 'views_block:centre_de_ressources-block_1'
-      label: ''
-      provider: views
-      label_display: visible
-      views_label: ''
-      items_per_page: none
-      region: third
-      weight: -3
-      uuid: 9cfdc064-b1d5-4922-a7b6-fcd95c13f506
-      context_mapping: {  }
     286723b9-60de-46d0-9891-42e0910e604d:
       id: 'views_block:evenements-block_1'
       label: ''
@@ -47,7 +37,7 @@ variant_settings:
       views_label: ''
       items_per_page: none
       region: third
-      weight: -4
+      weight: -10
       uuid: 286723b9-60de-46d0-9891-42e0910e604d
       context_mapping: {  }
     6319006a-015c-459c-996b-79d404f7455f:
@@ -83,17 +73,6 @@ variant_settings:
       weight: -1
       uuid: 03f6064d-8756-4e56-af2b-4a6c0cda67ff
       context_mapping: {  }
-    3c0de357-2862-46b2-861d-149788d8d257:
-      id: 'views_block:programme_toc-block_3'
-      label: ''
-      provider: views
-      label_display: '0'
-      views_label: ''
-      items_per_page: none
-      region: first
-      weight: 0
-      uuid: 3c0de357-2862-46b2-861d-149788d8d257
-      context_mapping: {  }
     4fc90a5b-8a2d-4f21-9718-e65b9982d59a:
       id: 'views_block:programme_toc-block_4'
       label: ''
@@ -116,6 +95,26 @@ variant_settings:
       weight: -4
       uuid: eb6ccc12-1ccc-4996-9797-be755e42b297
       context_mapping: {  }
+    9dbcea4e-26fe-4d78-a245-b192012bd799:
+      id: 'views_block:centre_de_ressources-block_2'
+      label: ''
+      provider: views
+      label_display: visible
+      views_label: ''
+      items_per_page: none
+      region: bottom
+      weight: 0
+      uuid: 9dbcea4e-26fe-4d78-a245-b192012bd799
+      context_mapping: {  }
+    9c5741a0-e8e2-4895-88a7-c36d3825e33c:
+      id: prog_ressource_link
+      label: Ressources
+      provider: popsu_link_block
+      label_display: '0'
+      region: first
+      weight: 0
+      uuid: 9c5741a0-e8e2-4895-88a7-c36d3825e33c
+      context_mapping: {  }
   id: panels_variant
   uuid: 9752d3e8-fdc6-419d-95bb-079a2c3088b3
   label: null

+ 1 - 1
config/sync/pagerer.preset.default.yml

@@ -26,7 +26,7 @@ panes:
       widget_button: auto
       tags:
         pages:
-          prefix_label: Page
+          prefix_label: Programmes
           suffix_label: 'of @total'
           page_current: '@number'
           first: «

+ 2 - 2
config/sync/pagerer.style.adaptive.yml

@@ -18,7 +18,7 @@ default_config:
     page_breaker: …
     page_separator: '|'
     pages:
-      prefix_label: Page
+      prefix_label: Programmes
       suffix_label: 'of @total'
       page_current: '@number'
       page_previous: '@number'
@@ -37,7 +37,7 @@ default_config:
       next_title: 'Aller à la page suivante'
       last_title: 'Aller à la dernière page'
       page_current_reader: 'Page courante'
-      page_reader: Page
+      page_reader: Programmes
       first_reader: 'Première page'
       previous_reader: 'Page précédente'
       next_reader: 'Page suivante'

+ 1 - 1
config/sync/pagerer.style.mini.yml

@@ -13,7 +13,7 @@ default_config:
   widget_button: auto
   tags:
     pages:
-      prefix_label: Page
+      prefix_label: Programmes
       suffix_label: 'of @total'
       page_current: '@number'
       first: «

+ 2 - 2
config/sync/pagerer.style.progressive.yml

@@ -19,7 +19,7 @@ default_config:
     page_breaker: …
     page_separator: '|'
     pages:
-      prefix_label: Page
+      prefix_label: Programmes
       suffix_label: 'of @total'
       page_current: '@number'
       page_previous: '@number'
@@ -38,7 +38,7 @@ default_config:
       next_title: 'Aller à la page suivante'
       last_title: 'Aller à la dernière page'
       page_current_reader: 'Page courante'
-      page_reader: Page
+      page_reader: Programmes
       first_reader: 'Première page'
       previous_reader: 'Page précédente'
       next_reader: 'Page suivante'

+ 2 - 2
config/sync/pagerer.style.scrollpane.yml

@@ -13,7 +13,7 @@ default_config:
   tags:
     page_separator: '|'
     pages:
-      prefix_label: Page
+      prefix_label: Programmes
       suffix_label: 'of @total'
       page_current: '@number'
       page_previous: '@number'
@@ -30,7 +30,7 @@ default_config:
       next_title: 'Aller à la page suivante'
       last_title: 'Aller à la dernière page'
       page_current_reader: 'Page courante'
-      page_reader: Page
+      page_reader: Programmes
       first_reader: 'Première page'
       previous_reader: 'Page précédente'
       next_reader: 'Page suivante'

+ 1 - 1
config/sync/pagerer.style.slider.yml

@@ -14,7 +14,7 @@ default_config:
   slider_navigation_icons: 'yes'
   tags:
     pages:
-      prefix_label: Page
+      prefix_label: Programmes
       suffix_label: 'of @total'
       page_current: '@number'
       page_previous: '@number'

+ 2 - 2
config/sync/pagerer.style.standard.yml

@@ -17,7 +17,7 @@ default_config:
     page_breaker: …
     page_separator: '|'
     pages:
-      prefix_label: Page
+      prefix_label: Programmes
       suffix_label: 'of @total'
       page_current: '@number'
       page_previous: '@number'
@@ -34,7 +34,7 @@ default_config:
       next_title: 'Aller à la page suivante'
       last_title: 'Aller à la dernière page'
       page_current_reader: 'Page courante'
-      page_reader: Page
+      page_reader: Programmes
       first_reader: 'Première page'
       previous_reader: 'Page précédente'
       next_reader: 'Page suivante'

+ 1 - 1
config/sync/views.view.administerusersbyrole_people.yml

@@ -895,7 +895,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       path: admin/people/list

+ 1 - 1
config/sync/views.view.archive.yml

@@ -226,7 +226,7 @@ display:
       tags: {  }
   page_1:
     id: page_1
-    display_title: Page
+    display_title: Programmes
     display_plugin: page
     position: 2
     display_options:

+ 1 - 1
config/sync/views.view.block_content.yml

@@ -519,7 +519,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       display_extenders: {  }

+ 521 - 2
config/sync/views.view.centre_de_ressources.yml

@@ -864,7 +864,12 @@ display:
           granularity: second
       title: 'Centre de ressources'
       header: {  }
-      footer: {  }
+      footer:
+        area_text_custom:
+          id: area_text_custom
+          table: views
+          field: area_text_custom
+          plugin_id: text_custom
       empty: {  }
       relationships: {  }
       arguments: {  }
@@ -1249,6 +1254,520 @@ display:
         - 'config:field.storage.node.body'
         - 'config:field.storage.node.field_sous_titre'
         - 'config:field.storage.node.field_type_de_ressource'
+  block_2:
+    display_plugin: block
+    id: block_2
+    display_title: 'Prog Last Ressources Bloc'
+    position: 2
+    display_options:
+      display_extenders:
+        views_ef_fieldset: {  }
+      title: 'Ressources associées'
+      defaults:
+        title: false
+        filters: false
+        filter_groups: false
+        style: false
+        row: false
+        arguments: false
+        fields: false
+        pager: false
+        footer: false
+        relationships: false
+      block_description: 'Last Ressources associées'
+      filters:
+        status:
+          value: '1'
+          table: node_field_data
+          field: status
+          plugin_id: boolean
+          entity_type: node
+          entity_field: status
+          id: status
+          expose:
+            operator: ''
+            operator_limit_selection: false
+            operator_list: {  }
+          group: 1
+        type:
+          id: type
+          table: node_field_data
+          field: type
+          value:
+            ressource: ressource
+          entity_type: node
+          entity_field: type
+          plugin_id: bundle
+          expose:
+            operator_limit_selection: false
+            operator_list: {  }
+          group: 1
+      filter_groups:
+        operator: AND
+        groups:
+          1: AND
+      style:
+        type: html_list
+        options:
+          grouping: {  }
+          row_class: ''
+          default_row_class: true
+          type: ul
+          wrapper_class: item-list
+          class: ''
+      row:
+        type: fields
+        options: {  }
+      allow:
+        items_per_page: false
+        offset: '0'
+        pager: '0'
+        hide_fields: '0'
+        sort_fields: '0'
+        disable_filters: '0'
+        configure_sorts: '0'
+      arguments:
+        field_programme_target_id:
+          id: field_programme_target_id
+          table: node__field_programme
+          field: field_programme_target_id
+          relationship: none
+          group_type: group
+          admin_label: ''
+          default_action: default
+          exception:
+            value: all
+            title_enable: false
+            title: All
+          title_enable: false
+          title: ''
+          default_argument_type: node
+          default_argument_options: {  }
+          default_argument_skip_url: false
+          summary_options:
+            base_path: ''
+            count: true
+            items_per_page: 25
+            override: false
+          summary:
+            sort_order: asc
+            number_of_records: 0
+            format: default_summary
+          specify_validation: false
+          validate:
+            type: none
+            fail: 'not found'
+          validate_options: {  }
+          break_phrase: false
+          not: false
+          plugin_id: numeric
+      display_description: ''
+      block_category: 'Prog Blocs (Views)'
+      fields:
+        field_type_de_ressource:
+          id: field_type_de_ressource
+          table: node__field_type_de_ressource
+          field: field_type_de_ressource
+          relationship: none
+          group_type: group
+          admin_label: ''
+          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
+          click_sort_column: target_id
+          type: entity_reference_label
+          settings:
+            link: false
+          group_column: target_id
+          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
+          plugin_id: field
+        title:
+          id: title
+          table: node_field_data
+          field: title
+          entity_type: node
+          entity_field: title
+          label: ''
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            trim: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            html: false
+          hide_empty: false
+          empty_zero: false
+          settings:
+            link_to_entity: true
+          plugin_id: field
+          relationship: none
+          group_type: group
+          admin_label: ''
+          exclude: 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_alter_empty: true
+          click_sort_column: value
+          type: string
+          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
+        field_sous_titre:
+          id: field_sous_titre
+          table: node__field_sous_titre
+          field: field_sous_titre
+          relationship: none
+          group_type: group
+          admin_label: ''
+          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
+          click_sort_column: value
+          type: string
+          settings:
+            link_to_entity: false
+          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
+          plugin_id: field
+        body:
+          id: body
+          table: node__body
+          field: body
+          relationship: none
+          group_type: group
+          admin_label: ''
+          label: ''
+          exclude: true
+          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
+          click_sort_column: value
+          type: text_default
+          settings: {  }
+          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
+          plugin_id: field
+        field_image:
+          id: field_image
+          table: node__field_image
+          field: field_image
+          relationship: none
+          group_type: group
+          admin_label: ''
+          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
+          click_sort_column: target_id
+          type: image
+          settings:
+            image_style: medium
+            image_link: ''
+          group_column: ''
+          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
+          plugin_id: field
+        title_1:
+          id: title_1
+          table: node_field_revision
+          field: title
+          relationship: field_programme
+          group_type: group
+          admin_label: ''
+          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
+          click_sort_column: value
+          type: string
+          settings:
+            link_to_entity: false
+          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
+          entity_type: node
+          entity_field: title
+          plugin_id: field
+      pager:
+        type: some
+        options:
+          items_per_page: 10
+          offset: 0
+      footer:
+        area_text_custom:
+          id: area_text_custom
+          table: views
+          field: area_text_custom
+          relationship: none
+          group_type: group
+          admin_label: ''
+          empty: false
+          tokenize: true
+          content: '<a href="/centre-de-ressources?programme={{ raw_arguments.field_programme_target_id }}">Toutes les ressources {{ title_1 }}</a>'
+          plugin_id: text_custom
+      relationships:
+        field_programme:
+          id: field_programme
+          table: node__field_programme
+          field: field_programme
+          relationship: none
+          group_type: group
+          admin_label: 'field_programme : Contenu'
+          required: false
+          plugin_id: standard
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - url
+        - 'user.node_grants:view'
+        - user.permissions
+      tags:
+        - 'config:field.storage.node.body'
+        - 'config:field.storage.node.field_image'
+        - 'config:field.storage.node.field_sous_titre'
+        - 'config:field.storage.node.field_type_de_ressource'
   embed_1:
     display_plugin: embed
     id: embed_1
@@ -1269,7 +1788,7 @@ display:
       pager:
         type: some
         options:
-          items_per_page: 5
+          items_per_page: 10
           offset: 0
       filters:
         status:

+ 1 - 1
config/sync/views.view.content_translations.yml

@@ -878,7 +878,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       display_extenders: {  }

+ 1 - 1
config/sync/views.view.frontpage.yml

@@ -297,7 +297,7 @@ display:
       path: node
       display_extenders: {  }
     display_plugin: page
-    display_title: Page
+    display_title: Programmes
     id: page_1
     position: 1
     cache_metadata:

+ 1 - 1
config/sync/views.view.glossary.yml

@@ -446,7 +446,7 @@ display:
       tags: {  }
   page_1:
     id: page_1
-    display_title: Page
+    display_title: Programmes
     display_plugin: page
     position: 1
     display_options:

+ 1 - 1
config/sync/views.view.locked_content.yml

@@ -713,7 +713,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       display_extenders: {  }

+ 1 - 1
config/sync/views.view.maillog_overview.yml

@@ -421,7 +421,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       path: admin/reports/maillog

+ 1 - 1
config/sync/views.view.redirect.yml

@@ -590,7 +590,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       display_extenders: {  }

+ 1 - 1
config/sync/views.view.taxonomy_term.yml

@@ -297,7 +297,7 @@ display:
       tags: {  }
   page_1:
     id: page_1
-    display_title: Page
+    display_title: Programmes
     display_plugin: page
     position: 1
     display_options:

+ 1 - 1
config/sync/views.view.user_admin_people.yml

@@ -894,7 +894,7 @@ display:
   page_1:
     display_plugin: page
     id: page_1
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       path: admin/people/list

+ 1 - 1
config/sync/views.view.watchdog.yml

@@ -695,7 +695,7 @@ display:
   page:
     display_plugin: page
     id: page
-    display_title: Page
+    display_title: Programmes
     position: 1
     display_options:
       display_extenders: {  }

+ 5 - 0
web/modules/custom/popsu_link_block/popsu_link_block.info.yml

@@ -0,0 +1,5 @@
+name: 'popsu_link_block'
+type: module
+description: 'Create a block with dynamic link'
+core_version_requirement: ^8.8 || ^9
+package: 'Popsu'

+ 24 - 0
web/modules/custom/popsu_link_block/popsu_link_block.module

@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * Contains popsu_link_block.module.
+ */
+
+use Drupal\Core\Routing\RouteMatchInterface;
+
+/**
+ * Implements hook_help().
+ */
+function popsu_link_block_help($route_name, RouteMatchInterface $route_match) {
+  switch ($route_name) {
+    // Main module help for the popsu_link_block module.
+    case 'help.page.popsu_link_block':
+      $output = '';
+      $output .= '<h3>' . t('About') . '</h3>';
+      $output .= '<p>' . t('Create a block with dynamic link') . '</p>';
+      return $output;
+
+    default:
+  }
+}

+ 44 - 0
web/modules/custom/popsu_link_block/src/Plugin/Block/ProgRessourceLink.php

@@ -0,0 +1,44 @@
+<?php
+
+namespace Drupal\popsu_link_block\Plugin\Block;
+
+use Drupal\Core\Block\BlockBase;
+use Drupal\Core\Url;
+use Drupal\Core\Link;
+
+/**
+ * Provides a 'ProgRessourceLink' block.
+ *
+ * @Block(
+ *  id = "prog_ressource_link",
+ *  admin_label = @Translation("Prog ressource link"),
+ * )
+ */
+class ProgRessourceLink extends BlockBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function build() {
+    $build = [];
+    $node = \Drupal::routeMatch()->getParameter('node');
+    if ($node instanceof \Drupal\node\Entity\Node) {
+      // You can get nid and anything else you need from the node object.
+      $nid = $node->id();
+
+      $url = Url::fromRoute("view.centre_de_ressources.page_1");
+      $url->setRouteParameter("programme", $nid);
+      $url->setOption('attributes', array("class"=>array('prog-ressources-link')));
+      $build['prog_ressource_link'] = array(
+        '#title' => "Ressources",
+        '#type' => 'link',
+        '#url' => $url,
+      );
+
+      $t="t";
+
+    }
+    return $build;
+  }
+
+}