Prechádzať zdrojové kódy

added field_weight to assisted research terms for sorting

bach 3 rokov pred
rodič
commit
90883384f4

+ 24 - 0
config/sync/core.entity_form_display.taxonomy_term.assisted_research.default.yml

@@ -4,6 +4,7 @@ status: true
 dependencies:
   config:
     - field.field.taxonomy_term.assisted_research.field_terms
+    - field.field.taxonomy_term.assisted_research.field_weight
     - taxonomy.vocabulary.assisted_research
   module:
     - field_group
@@ -14,6 +15,7 @@ third_party_settings:
       children:
         - group_list
         - group_admin
+        - group_sidebar
       parent_name: ''
       weight: 1
       format_type: tabs
@@ -54,6 +56,21 @@ third_party_settings:
         formatter: closed
         required_fields: true
       label: admin
+    group_sidebar:
+      children:
+        - field_weight
+      parent_name: group_tabs
+      weight: 20
+      format_type: tab
+      region: content
+      format_settings:
+        description: ''
+        open: '1'
+        required_fields: true
+        id: ''
+        classes: ''
+        formatter: closed
+      label: weight
 id: taxonomy_term.assisted_research.default
 targetEntityType: taxonomy_term
 bundle: assisted_research
@@ -69,6 +86,13 @@ content:
     third_party_settings: {  }
     type: entity_reference_autocomplete
     region: content
+  field_weight:
+    weight: 10
+    settings:
+      placeholder: ''
+    third_party_settings: {  }
+    type: number
+    region: content
   langcode:
     type: language_select
     weight: 3

+ 10 - 0
config/sync/core.entity_view_display.taxonomy_term.assisted_research.default.yml

@@ -4,6 +4,7 @@ status: true
 dependencies:
   config:
     - field.field.taxonomy_term.assisted_research.field_terms
+    - field.field.taxonomy_term.assisted_research.field_weight
     - taxonomy.vocabulary.assisted_research
   module:
     - text
@@ -27,6 +28,15 @@ content:
     third_party_settings: {  }
     type: entity_reference_label
     region: content
+  field_weight:
+    weight: 2
+    label: above
+    settings:
+      thousand_separator: ''
+      prefix_suffix: true
+    third_party_settings: {  }
+    type: number_integer
+    region: content
 hidden:
   langcode: true
   search_api_excerpt: true

+ 31 - 0
config/sync/field.field.taxonomy_term.assisted_research.field_weight.yml

@@ -0,0 +1,31 @@
+uuid: c9cbfb39-2a62-4ec4-8560-914fe2a8676f
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.taxonomy_term.field_weight
+    - taxonomy.vocabulary.assisted_research
+  module:
+    - unique_content_field_validation
+third_party_settings:
+  unique_content_field_validation:
+    unique: false
+    unique_text: ''
+id: taxonomy_term.assisted_research.field_weight
+field_name: field_weight
+entity_type: taxonomy_term
+bundle: assisted_research
+label: Weight
+description: ''
+required: false
+translatable: false
+default_value:
+  -
+    value: 0
+default_value_callback: ''
+settings:
+  min: -20
+  max: 20
+  prefix: ''
+  suffix: ''
+field_type: integer

+ 24 - 0
config/sync/field.storage.taxonomy_term.field_weight.yml

@@ -0,0 +1,24 @@
+uuid: f7097059-91a6-4e19-9596-e2aa3f22ee5a
+langcode: fr
+status: true
+dependencies:
+  module:
+    - field_permissions
+    - taxonomy
+third_party_settings:
+  field_permissions:
+    permission_type: public
+id: taxonomy_term.field_weight
+field_name: field_weight
+entity_type: taxonomy_term
+type: integer
+settings:
+  unsigned: false
+  size: normal
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 167 - 22
config/sync/views.view.admin_taxo.yml

@@ -8,8 +8,10 @@ dependencies:
     - field.storage.taxonomy_term.field_public_address
     - field.storage.taxonomy_term.field_public_email
     - field.storage.taxonomy_term.field_synonyms
+    - field.storage.taxonomy_term.field_terms
     - field.storage.taxonomy_term.field_visuels
     - field.storage.taxonomy_term.field_website
+    - field.storage.taxonomy_term.field_weight
     - field.storage.taxonomy_term.field_workflow
     - image.style.medium
     - taxonomy.vocabulary.assisted_research
@@ -4586,9 +4588,11 @@ display:
           description: ''
           columns:
             views_bulk_operations_bulk_form: views_bulk_operations_bulk_form
-            tid: name
-            name: name
-            operations: name
+            field_weight: field_weight
+            name: field_weight
+            operations: field_weight
+            tid: field_weight
+            field_terms: field_terms
             is_locked: is_locked
           info:
             views_bulk_operations_bulk_form:
@@ -4596,15 +4600,15 @@ display:
               separator: ''
               empty_column: false
               responsive: ''
-            tid:
-              sortable: false
+            field_weight:
+              sortable: true
               default_sort_order: asc
               align: ''
               separator: ''
               empty_column: false
-              responsive: ''
+              responsive: priority-low
             name:
-              sortable: true
+              sortable: false
               default_sort_order: asc
               align: ''
               separator: ''
@@ -4615,6 +4619,18 @@ display:
               separator: ''
               empty_column: false
               responsive: ''
+            tid:
+              sortable: false
+              default_sort_order: asc
+              align: ''
+              separator: ''
+              empty_column: false
+              responsive: ''
+            field_terms:
+              align: ''
+              separator: ''
+              empty_column: false
+              responsive: ''
             is_locked:
               sortable: false
               default_sort_order: asc
@@ -4622,7 +4638,7 @@ display:
               separator: ''
               empty_column: false
               responsive: ''
-          default: '-1'
+          default: field_weight
           empty_table: false
       defaults:
         style: false
@@ -4707,18 +4723,18 @@ display:
               preconfiguration:
                 label_override: ''
           plugin_id: views_bulk_operations_bulk_form
-        tid:
-          id: tid
-          table: taxonomy_term_field_data
-          field: tid
+        field_weight:
+          id: field_weight
+          table: taxonomy_term__field_weight
+          field: field_weight
           relationship: none
           group_type: group
           admin_label: ''
-          label: 'Term ID'
+          label: Weight
           exclude: false
           alter:
             alter_text: false
-            text: '<code style="font-size:8px;">{{tid}}</code>'
+            text: ''
             make_link: false
             path: ''
             absolute: false
@@ -4734,8 +4750,8 @@ display:
             target: ''
             nl2br: false
             max_length: 0
-            word_boundary: false
-            ellipsis: false
+            word_boundary: true
+            ellipsis: true
             more_link: false
             more_link_text: ''
             more_link_path: ''
@@ -4743,7 +4759,7 @@ display:
             trim: false
             preserve_tags: ''
             html: false
-          element_type: code
+          element_type: ''
           element_class: ''
           element_label_type: ''
           element_label_class: ''
@@ -4756,8 +4772,10 @@ display:
           empty_zero: false
           hide_alter_empty: true
           click_sort_column: value
-          type: number_unformatted
-          settings: {  }
+          type: number_integer
+          settings:
+            thousand_separator: ''
+            prefix_suffix: true
           group_column: value
           group_columns: {  }
           group_rows: true
@@ -4768,8 +4786,6 @@ display:
           multi_type: separator
           separator: ', '
           field_api_classes: false
-          entity_type: taxonomy_term
-          entity_field: tid
           plugin_id: field
         name:
           id: name
@@ -4888,6 +4904,133 @@ display:
           destination: false
           entity_type: taxonomy_term
           plugin_id: entity_operations
+        tid:
+          id: tid
+          table: taxonomy_term_field_data
+          field: tid
+          relationship: none
+          group_type: group
+          admin_label: ''
+          label: 'Term ID'
+          exclude: false
+          alter:
+            alter_text: false
+            text: '<code style="font-size:8px;">{{tid}}</code>'
+            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: false
+            ellipsis: false
+            more_link: false
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: false
+            trim: false
+            preserve_tags: ''
+            html: false
+          element_type: code
+          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: number_unformatted
+          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
+          entity_type: taxonomy_term
+          entity_field: tid
+          plugin_id: field
+        field_terms:
+          id: field_terms
+          table: taxonomy_term__field_terms
+          field: field_terms
+          relationship: none
+          group_type: group
+          admin_label: ''
+          label: Terms
+          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: ul
+          separator: ', '
+          field_api_classes: false
+          plugin_id: field
         is_locked:
           id: is_locked
           table: content_lock
@@ -5105,4 +5248,6 @@ display:
         - url
         - url.query_args
         - user.roles
-      tags: {  }
+      tags:
+        - 'config:field.storage.taxonomy_term.field_terms'
+        - 'config:field.storage.taxonomy_term.field_weight'

+ 2 - 1
web/modules/custom/materio_sapi/src/Form/MaterioSapiSearchForm.php

@@ -60,7 +60,8 @@ class MaterioSapiSearchForm extends FormBase {
     //
     // ]
     $query = \Drupal::entityQuery('taxonomy_term');
-    $query->condition('vid', "assisted_research");
+    $query->condition('vid', "assisted_research")
+          ->sort('field_weight', 'ASC');
     $tids = $query->execute();
     $terms = \Drupal\taxonomy\Entity\Term::loadMultiple($tids);
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov