瀏覽代碼

removed first draft of fil content type as it will be custom entity composition

Bachir Soussi Chiadmi 7 年之前
父節點
當前提交
f44e0e753f

+ 27 - 26
sites/all/modules/figli/edlp_home/edlp_home.inc

@@ -24,32 +24,33 @@ function template_preprocess_edlp_home(&$vars){
   // render the last fil column
   $vars["last_fil"] = array(
     "#type" => "container",
-    'fil' => $view_builder->view($vars['last_fil_node'], 'teaser'),
-    'links' => array(
-      '#theme' => 'item_list',
-      '#items' => array(
-        'link_all' => array(
-          '#title' => t("Voir tous les fils de l'EP."),
-          '#type' => 'link',
-          '#url' => Url::fromRoute('edlp_fils.fils', [], array(
-            'attributes' => array(
-              'class' => ['fils-link', 'ajax-link']
-            )
-          ))
-        ),
-        // TODO: link posdcast fils
-        'link_podcast' => array(
-          '#title' => t("S'abonner au podcast des fils."),
-          '#type' => 'link',
-          '#url' => Url::fromRoute('<front>', [], array(
-            'attributes' => array(
-              'class' => ['fils-link']
-            )
-          ))
-        )
-      )
-    )
-
+    // 'fil' => $view_builder->view($vars['last_fil_node'], 'teaser'),
+    'title'=> array("#markup" => "<h2 class='title'>Dernier Fil</h2>"),
+    'fil' => $vars['last_fil_node'],
+    // 'links' => array(
+    //   '#theme' => 'item_list',
+    //   '#items' => array(
+    //     'link_all' => array(
+    //       '#title' => t("Voir tous les fils de l'EP."),
+    //       '#type' => 'link',
+    //       '#url' => Url::fromRoute('edlp_fils.fils', [], array(
+    //         'attributes' => array(
+    //           'class' => ['fils-link', 'ajax-link']
+    //         )
+    //       ))
+    //     ),
+    //     // TODO: link posdcast fils
+    //     'link_podcast' => array(
+    //       '#title' => t("S'abonner au podcast des fils."),
+    //       '#type' => 'link',
+    //       '#url' => Url::fromRoute('<front>', [], array(
+    //         'attributes' => array(
+    //           'class' => ['fils-link']
+    //         )
+    //       ))
+    //     )
+    //   )
+    // )
   );
 
   // render the last production column

+ 9 - 7
sites/all/modules/figli/edlp_home/src/Controller/HomeController.php

@@ -30,14 +30,16 @@ class HomeController extends ControllerBase {
     $contents["#presentation_node"] = entity_load('node', array_pop($pres_nid));
 
     // last fil
-    $query = \Drupal::entityQuery('node')
-      ->condition('status', 1)
-      ->condition('type', 'fil')
-      ->sort('created', 'DESC')
-      ->range(0,1);
+    // $query = \Drupal::entityQuery('node')
+    //   ->condition('status', 1)
+    //   ->condition('type', 'fil')
+    //   ->sort('created', 'DESC')
+    //   ->range(0,1);
+    //
+    // $fil = $query->execute();
+    // $contents["#last_fil_node"] = entity_load('node', array_pop($fil));
+    $contents["#last_fil_node"] = array('#markup'=>'En développement.');
 
-    $fil = $query->execute();
-    $contents["#last_fil_node"] = entity_load('node', array_pop($fil));
 
     // last production
     $query = \Drupal::entityQuery('node')

+ 1 - 1
sites/all/themes/custom/edlptheme/assets/dist/styles/app.min.css

@@ -1266,7 +1266,7 @@ main[role="main"] .layout-content {
   main[role="main"] .layout-content .field.text-formatted a.audio-link {
     border-bottom: 1px dotted red; }
 
-main[role="main"] article.node > h2 {
+main[role="main"] article.node > h2, main[role="main"] h2.title {
   font-size: 0.9em;
   font-weight: normal;
   text-transform: uppercase; }

+ 1 - 1
sites/all/themes/custom/edlptheme/assets/styles/app.scss

@@ -194,7 +194,7 @@ main[role="main"]{
       }
     }
   }
-  article.node>h2{
+  article.node>h2, h2.title{
     @include content_titles;
   }
   article.node p{

+ 1 - 5
sites/default/config/sync/user.role.admin.yml

@@ -16,11 +16,9 @@ permissions:
   - 'administer productions menu items'
   - 'administer users'
   - 'change own username'
-  - 'create autre_son content'
   - 'create corpus_documents workflow_transition'
   - 'create enregistrement content'
   - 'create evenement content'
-  - 'create fil content'
   - 'create generique workflow_transition'
   - 'create page content'
   - 'create static content'
@@ -29,6 +27,7 @@ permissions:
   - 'create terms in genres'
   - 'create terms in langues'
   - 'create terms in locuteurs'
+  - 'delete any autre_son content'
   - 'delete terms in collectionneurs'
   - 'delete terms in entrees'
   - 'delete terms in genres'
@@ -37,7 +36,6 @@ permissions:
   - 'edit any autre_son content'
   - 'edit any enregistrement content'
   - 'edit any evenement content'
-  - 'edit any fil content'
   - 'edit any page content'
   - 'edit any static content'
   - 'edit own enregistrement content'
@@ -49,7 +47,6 @@ permissions:
   - 'revert autre_son revisions'
   - 'revert enregistrement revisions'
   - 'revert evenement revisions'
-  - 'revert fil revisions'
   - 'revert page revisions'
   - 'revert static revisions'
   - 'schedule corpus_documents workflow_transition'
@@ -59,7 +56,6 @@ permissions:
   - 'view autre_son revisions'
   - 'view enregistrement revisions'
   - 'view evenement revisions'
-  - 'view fil revisions'
   - 'view page revisions'
   - 'view static revisions'
   - 'view the administration theme'

+ 0 - 4
sites/default/config/sync/user.role.collectionneur.yml

@@ -10,19 +10,15 @@ permissions:
   - 'access any corpus_documents workflow_transion overview'
   - 'create corpus_documents workflow_transition'
   - 'create enregistrement content'
-  - 'create fil content'
   - 'create generique workflow_transition'
   - 'create terms in collectionneurs'
   - 'create terms in genres'
   - 'create terms in langues'
   - 'create terms in locuteurs'
   - 'edit any enregistrement content'
-  - 'edit any fil content'
   - 'edit own enregistrement content'
   - 'revert enregistrement revisions'
-  - 'revert fil revisions'
   - 'schedule corpus_documents workflow_transition'
   - 'use text format wysiwyg'
   - 'view enregistrement revisions'
-  - 'view fil revisions'
   - 'view the administration theme'

+ 0 - 435
sites/default/config/sync/views.view.content.yml

@@ -7,7 +7,6 @@ dependencies:
     - field.storage.node.field_collectionneurs
     - field.storage.node.field_date
     - field.storage.node.field_description
-    - field.storage.node.field_enregistrement
     - field.storage.node.field_entrees
     - field.storage.node.field_genres
     - field.storage.node.field_langues
@@ -3400,437 +3399,3 @@ display:
         - 'config:field.storage.node.field_date'
         - 'config:field.storage.node.field_page_liee'
         - 'config:field.storage.node.field_workflow_generic'
-  page_4:
-    display_options:
-      path: admin/content/fils
-      menu:
-        type: tab
-        title: Fils
-        description: ''
-        expanded: false
-        parent: 'menu_link_content:8b5fed48-c008-4041-9bda-06f997582175'
-        weight: -96
-        context: '0'
-        menu_name: admin
-      tab_options:
-        type: normal
-        title: Content
-        description: 'Find and manage content'
-        menu_name: admin
-        weight: -10
-      display_extenders: {  }
-      display_description: ''
-      access:
-        type: role
-        options:
-          role:
-            admin: admin
-            root: root
-      defaults:
-        access: false
-        filters: false
-        filter_groups: false
-        fields: false
-      filters:
-        status_extra:
-          id: status_extra
-          table: node_field_data
-          field: status_extra
-          operator: '='
-          value: false
-          plugin_id: node_status
-          group: 1
-          entity_type: node
-        status:
-          id: status
-          table: node_field_data
-          field: status
-          relationship: none
-          group_type: group
-          admin_label: ''
-          operator: '='
-          value: '1'
-          group: 1
-          exposed: true
-          expose:
-            operator_id: ''
-            label: Status
-            description: ''
-            use_operator: false
-            operator: status_op
-            identifier: status
-            required: false
-            remember: false
-            multiple: false
-            remember_roles:
-              authenticated: authenticated
-          is_grouped: true
-          group_info:
-            label: 'Published status'
-            description: ''
-            identifier: status
-            optional: true
-            widget: select
-            multiple: false
-            remember: false
-            default_group: All
-            default_group_multiple: {  }
-            group_items:
-              1:
-                title: Published
-                operator: '='
-                value: '1'
-              2:
-                title: Unpublished
-                operator: '='
-                value: '0'
-          plugin_id: boolean
-          entity_type: node
-          entity_field: status
-        type:
-          id: type
-          table: node_field_data
-          field: type
-          relationship: none
-          group_type: group
-          admin_label: ''
-          operator: in
-          value:
-            fil: fil
-          group: 1
-          exposed: false
-          expose:
-            operator_id: type_op
-            label: 'Content type'
-            description: ''
-            use_operator: false
-            operator: type_op
-            identifier: type
-            required: false
-            remember: false
-            multiple: false
-            remember_roles:
-              authenticated: authenticated
-              anonymous: '0'
-              collectionneur: '0'
-              admin: '0'
-              root: '0'
-              invite: '0'
-            reduce: true
-          is_grouped: false
-          group_info:
-            label: ''
-            description: ''
-            identifier: ''
-            optional: true
-            widget: select
-            multiple: false
-            remember: false
-            default_group: All
-            default_group_multiple: {  }
-            group_items: {  }
-          plugin_id: bundle
-          entity_type: node
-          entity_field: type
-        title:
-          id: title
-          table: node_field_data
-          field: title
-          relationship: none
-          group_type: group
-          admin_label: ''
-          operator: contains
-          value: ''
-          group: 1
-          exposed: true
-          expose:
-            operator_id: title_op
-            label: Title
-            description: ''
-            use_operator: false
-            operator: title_op
-            identifier: title
-            required: false
-            remember: false
-            multiple: false
-            remember_roles:
-              authenticated: authenticated
-              anonymous: '0'
-              administrator: '0'
-            placeholder: ''
-          is_grouped: false
-          group_info:
-            label: ''
-            description: ''
-            identifier: ''
-            optional: true
-            widget: select
-            multiple: false
-            remember: false
-            default_group: All
-            default_group_multiple: {  }
-            group_items: {  }
-          plugin_id: string
-          entity_type: node
-          entity_field: title
-        uid:
-          id: uid
-          table: users_field_data
-          field: uid
-          relationship: uid
-          group_type: group
-          admin_label: ''
-          operator: in
-          value: {  }
-          group: 1
-          exposed: true
-          expose:
-            operator_id: uid_op
-            label: Author
-            description: ''
-            use_operator: false
-            operator: uid_op
-            identifier: uid
-            required: false
-            remember: false
-            multiple: false
-            remember_roles:
-              authenticated: authenticated
-              anonymous: '0'
-              collectionneur: '0'
-              admin: '0'
-              root: '0'
-              invite: '0'
-            reduce: false
-          is_grouped: false
-          group_info:
-            label: ''
-            description: ''
-            identifier: ''
-            optional: true
-            widget: select
-            multiple: false
-            remember: false
-            default_group: All
-            default_group_multiple: {  }
-            group_items: {  }
-          entity_type: user
-          entity_field: uid
-          plugin_id: user_name
-      filter_groups:
-        operator: AND
-        groups:
-          1: AND
-      fields:
-        title:
-          id: title
-          table: node_field_data
-          field: title
-          label: Title
-          exclude: false
-          alter:
-            alter_text: false
-          element_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          entity_type: node
-          entity_field: title
-          type: string
-          settings:
-            link_to_entity: true
-          plugin_id: field
-        status:
-          id: status
-          table: node_field_data
-          field: status
-          label: Status
-          exclude: false
-          alter:
-            alter_text: false
-          element_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          type: boolean
-          settings:
-            format: custom
-            format_custom_true: Published
-            format_custom_false: Unpublished
-          plugin_id: field
-          entity_type: node
-          entity_field: status
-        operations:
-          id: operations
-          table: node
-          field: operations
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: Operations
-          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: true
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          destination: true
-          plugin_id: entity_operations
-        field_enregistrement:
-          id: field_enregistrement
-          table: node__field_enregistrement
-          field: field_enregistrement
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: Document
-          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: 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: target_id
-          type: entity_reference_label
-          settings:
-            link: true
-          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: '<br/>'
-          field_api_classes: false
-          plugin_id: field
-        name:
-          id: name
-          table: users_field_data
-          field: name
-          relationship: uid
-          label: Author
-          exclude: false
-          alter:
-            alter_text: false
-          element_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          plugin_id: field
-          type: user_name
-          entity_type: user
-          entity_field: name
-        changed:
-          id: changed
-          table: node_field_data
-          field: changed
-          label: Updated
-          exclude: false
-          alter:
-            alter_text: false
-          element_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          type: timestamp
-          settings:
-            date_format: short
-            custom_date_format: ''
-            timezone: ''
-          plugin_id: field
-          entity_type: node
-          entity_field: changed
-    display_plugin: page
-    display_title: Fils
-    id: page_4
-    position: 2
-    cache_metadata:
-      contexts:
-        - 'languages:language_content'
-        - 'languages:language_interface'
-        - url
-        - url.query_args
-        - user
-        - 'user.node_grants:view'
-        - user.roles
-      max-age: -1
-      tags:
-        - 'config:field.storage.node.field_enregistrement'