diff --git a/config/sync/core.entity_form_display.node.article.default.yml b/config/sync/core.entity_form_display.node.article.default.yml index 7f0aabc..85f29b6 100644 --- a/config/sync/core.entity_form_display.node.article.default.yml +++ b/config/sync/core.entity_form_display.node.article.default.yml @@ -32,7 +32,6 @@ third_party_settings: - group_contents - group_media - group_taxonomy - - group_internal parent_name: '' weight: 0 format_type: tabs @@ -93,12 +92,12 @@ third_party_settings: group_internal: children: - langcode - - translation + - field_date - field_workflow - field_migration - field_memo - parent_name: group_htabs - weight: 13 + parent_name: '' + weight: 1 format_type: tab format_settings: id: '' @@ -123,7 +122,7 @@ content: third_party_settings: { } region: content field_date: - weight: 26 + weight: 3 settings: { } third_party_settings: { } type: daterange_default diff --git a/config/sync/core.entity_form_display.taxonomy_term.showroom.default.yml b/config/sync/core.entity_form_display.taxonomy_term.showroom.default.yml index 400822b..2e0c5e0 100644 --- a/config/sync/core.entity_form_display.taxonomy_term.showroom.default.yml +++ b/config/sync/core.entity_form_display.taxonomy_term.showroom.default.yml @@ -22,7 +22,6 @@ third_party_settings: children: - group_contents - group_info - - group_internal parent_name: '' weight: 1 format_type: tabs @@ -55,8 +54,8 @@ third_party_settings: - translation - field_workflow - field_migration - parent_name: group_tabs - weight: 22 + parent_name: '' + weight: 2 format_type: tab format_settings: id: '' @@ -109,8 +108,7 @@ content: region: content field_public_address: weight: 5 - settings: - default_country: null + settings: { } third_party_settings: { } type: address_default region: content diff --git a/config/sync/views.view.admin_taxo.yml b/config/sync/views.view.admin_taxo.yml index 39f8303..78478b9 100644 --- a/config/sync/views.view.admin_taxo.yml +++ b/config/sync/views.view.admin_taxo.yml @@ -1233,7 +1233,7 @@ display: group_items: { } plugin_id: string sorts: { } - title: Tags + title: Taxonomy header: result: id: result @@ -3765,6 +3765,7 @@ display: fields: false filters: false filter_groups: false + title: false row: type: fields options: { } @@ -4577,6 +4578,7 @@ display: weight: 0 context: '0' menu_name: main + title: Thesaurus cache_metadata: max-age: 0 contexts: @@ -4683,6 +4685,7 @@ display: fields: false filters: false filter_groups: false + title: false row: type: fields options: { } @@ -5495,6 +5498,7 @@ display: weight: 0 context: '0' menu_name: main + title: Tags cache_metadata: max-age: 0 contexts: diff --git a/web/modules/custom/editors_menus/editors_menus.links.action.yml b/web/modules/custom/editors_menus/editors_menus.links.action.yml index 240456a..617b7e0 100644 --- a/web/modules/custom/editors_menus/editors_menus.links.action.yml +++ b/web/modules/custom/editors_menus/editors_menus.links.action.yml @@ -21,7 +21,7 @@ editors_menus.company_add: title: 'Add Companie' appears_on: - view.admin_taxo.page_1 - + editors_menus.showroom_add: route_name: entity.taxonomy_term.add_form route_parameters: @@ -29,6 +29,22 @@ editors_menus.showroom_add: title: 'Add Showroom' appears_on: - view.admin_taxo.page_2 + +editors_menus.thesaurus_add: + route_name: entity.taxonomy_term.add_form + route_parameters: + taxonomy_vocabulary: 'thesaurus' + title: 'Add Thesaurus' + appears_on: + - view.admin_taxo.page_3 + +editors_menus.tag_add: + route_name: entity.taxonomy_term.add_form + route_parameters: + taxonomy_vocabulary: 'tags' + title: 'Add Tag' + appears_on: + - view.admin_taxo.page_4 editors_menus.user_add: route_name: user.admin_create diff --git a/web/themes/custom/matminimal/matminimal.theme b/web/themes/custom/matminimal/matminimal.theme new file mode 100644 index 0000000..5327250 --- /dev/null +++ b/web/themes/custom/matminimal/matminimal.theme @@ -0,0 +1,65 @@ +getPathInfo()); +// if ($suggestions = theme_get_suggestions($path_args, 'page', '-')) { +// foreach ($suggestions as $suggestion) { +// // dsm($suggestion); +// preg_match('/taxonomy-manage-[^-]+-add$/', $suggestion, $matches); +// // ksm($matches); +// if ($suggestion === 'page--taxonomy-term-edit' || isset($matches)) { +// $variables['attributes']['class'][] = 'node-form-layout'; +// } +// } +// } +// } + +// function matminimal_form_alter(&$form, FormStateInterface $form_state, $form_id){ +// // dsm($form_id); +// // create a colomuned term form (not working yet) +// if(in_array($form_id, ['taxonomy_term_company_form', 'taxonomy_term_showroom_form'])){ +// // ksm($form); +// $form['#theme'] = ['term_edit_form']; +// $form['#attached']['library'][] = 'seven/node-form'; +// +// $form['advanced']['#type'] = 'container'; +// $form['meta']['#type'] = 'container'; +// $form['meta']['#access'] = TRUE; +// $form['meta']['changed']['#wrapper_attributes']['class'][] = 'container-inline'; +// $form['meta']['author']['#wrapper_attributes']['class'][] = 'container-inline'; +// +// $form['revision_information']['#type'] = 'container'; +// $form['revision_information']['#group'] = 'meta'; +// } +// } + +/** + * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm. + * + * Changes vertical tabs to container. + */ +function matminimal_form_node_form_alter(&$form, FormStateInterface $form_state) { + $form['#theme'] = ['node_edit_form']; + $form['#attached']['library'][] = 'seven/node-form'; + + $form['advanced']['#type'] = 'container'; + $form['meta']['#type'] = 'container'; + $form['meta']['#access'] = TRUE; + $form['meta']['changed']['#wrapper_attributes']['class'][] = 'container-inline'; + $form['meta']['author']['#wrapper_attributes']['class'][] = 'container-inline'; + + $form['revision_information']['#type'] = 'container'; + $form['revision_information']['#group'] = 'meta'; +} diff --git a/web/themes/custom/matminimal/templates/form/node-edit-form.html.twig b/web/themes/custom/matminimal/templates/form/node-edit-form.html.twig new file mode 100644 index 0000000..0c9be19 --- /dev/null +++ b/web/themes/custom/matminimal/templates/form/node-edit-form.html.twig @@ -0,0 +1,33 @@ +{# +/** + * @file + * Theme override for a node edit form. + * + * Two column template for the node add/edit form. + * + * This template will be used when a node edit form specifies 'node_edit_form' + * as its #theme callback. Otherwise, by default, node add/edit forms will be + * themed by form.html.twig. + * + * Available variables: + * - form: The node add/edit form. + * + * @see seven_form_node_form_alter() + */ +#} + +
+
+ {{ form|without('advanced', 'footer', 'actions', 'group_internal') }} +
+
+ {{ form.group_internal }} + {{ form.advanced }} + {{ form.actions }} +
+ +