Quellcode durchsuchen

node revisions (historique) fixed #2257

bach vor 1 Jahr
Ursprung
Commit
1a13e60a38

+ 21 - 14
src/config/sync/core.entity_form_display.node.concernement.default.yml

@@ -30,7 +30,7 @@ third_party_settings:
         - group_ateliers
         - group_puissance_d_agir
         - group_doleancer
-        - group_confidentialite
+        - group_revision
       label: Tabs
       region: content
       parent_name: ''
@@ -105,13 +105,13 @@ third_party_settings:
         formatter: closed
         description: ''
         required_fields: true
-    group_confidentialite:
+    group_doleancer:
       children:
-        - field_confidentialite
-      label: Confidentialité
+        - field_doleancer
+      label: Doleancer
       region: content
       parent_name: group_tabs
-      weight: 18
+      weight: 17
       format_type: tab
       format_settings:
         classes: ''
@@ -120,13 +120,13 @@ third_party_settings:
         formatter: closed
         description: ''
         required_fields: true
-    group_doleancer:
+    group_puissance_d_agir:
       children:
-        - field_doleancer
-      label: Doleancer
+        - field_besoin
+      label: 'Puissance d''agir'
       region: content
       parent_name: group_tabs
-      weight: 17
+      weight: 16
       format_type: tab
       format_settings:
         classes: ''
@@ -135,13 +135,13 @@ third_party_settings:
         formatter: closed
         description: ''
         required_fields: true
-    group_puissance_d_agir:
+    group_revision:
       children:
-        - field_besoin
-      label: 'Puissance d''agir'
+        - revision_log
+      label: revision
       region: content
       parent_name: group_tabs
-      weight: 16
+      weight: 18
       format_type: tab
       format_settings:
         classes: ''
@@ -244,6 +244,14 @@ content:
       rows: 5
       placeholder: ''
     third_party_settings: {  }
+  revision_log:
+    type: string_textarea
+    weight: 19
+    region: content
+    settings:
+      rows: 5
+      placeholder: ''
+    third_party_settings: {  }
   title:
     type: string_textfield
     weight: 0
@@ -262,7 +270,6 @@ hidden:
   langcode: true
   path: true
   promote: true
-  revision_log: true
   status: true
   sticky: true
   uid: true

+ 5 - 0
src/config/sync/user.role.anonymous.yml

@@ -4,11 +4,14 @@ status: true
 dependencies:
   config:
     - filter.format.wysiwyg
+    - node.type.concernement
+    - node.type.entite
   module:
     - devel
     - filter
     - graphql
     - group
+    - node
     - system
     - workflow
 _core:
@@ -31,5 +34,7 @@ permissions:
   - 'execute ouatterrir arbitrary graphql requests'
   - 'execute ouatterrir persisted graphql requests'
   - 'use text format wysiwyg'
+  - 'view concernement revisions'
+  - 'view entite revisions'
   - 'view published fil entities'
   - 'view search api pages'

+ 4 - 0
src/config/sync/user.role.authenticated.yml

@@ -7,6 +7,8 @@ dependencies:
     - filter.format.wysiwyg
     - node.type.besoin
     - node.type.cercle_politique
+    - node.type.concernement
+    - node.type.entite
   module:
     - devel
     - filter
@@ -50,6 +52,8 @@ permissions:
   - 'use chutier'
   - 'use text format linkonly'
   - 'use text format wysiwyg'
+  - 'view concernement revisions'
+  - 'view entite revisions'
   - 'view own unpublished chutier entities'
   - 'view own unpublished composition entities'
   - 'view own unpublished fil entities'

+ 12 - 13
src/web/themes/custom/ouatminimal_theme/ouatminimal.theme

@@ -59,9 +59,8 @@ function ouatminimal_form_node_form_alter(&$form, FormStateInterface $form_state
   $form['#attached']['library'][] = 'seven/node-form';
 
   if ($form["#form_id"] != 'node_static_edit_form') {
-    // unset($form['advanced']);
     $form['advanced']['#type'] = 'container';
-    $form['advanced']['#access'] = FALSE;
+    // $form['advanced']['#access'] = true;
     $form['meta']['#type'] = 'container';
     $form['meta']['#access'] = TRUE;
     $form['meta']['changed']['#wrapper_attributes']['class'][] = 'container-inline';
@@ -150,19 +149,19 @@ function ouatminimal_preprocess_textarea(&$variables) {
   // $variables['attributes']->setAttribute('cols', 40);
 }
 
-function ouatminimal_preprocess_node_edit_form__node_concernement(&$variables) {
-  // $variables['form']['advanced']['#group'] = "group_admin";
-  // $ph = $variables['form']['title']['widget'][0]['value']['#placeholder'];
-  // $variables['form']['title']['widget']['#description'] = $ph;
-  // $variables['form']['title']['widget'][0]['#description'] = $ph;
-  // $variables['form']['title']['widget'][0]['value']['#description'] = $ph;
+// function ouatminimal_preprocess_node_edit_form__node_concernement(&$variables) {
+//   // $variables['form']['advanced']['#group'] = "group_admin";
+//   // $ph = $variables['form']['title']['widget'][0]['value']['#placeholder'];
+//   // $variables['form']['title']['widget']['#description'] = $ph;
+//   // $variables['form']['title']['widget'][0]['#description'] = $ph;
+//   // $variables['form']['title']['widget'][0]['value']['#description'] = $ph;
   
   
-  // $variables['form']['title']['widget']['#title'] = $ph;
-  // $variables['form']['title']['widget'][0]['#title'] = $ph;
-  // $variables['form']['title']['widget'][0]['value']['#title'] = $ph;
-  // $variables['form']['title']['widget'][0]['value']['#placeholder'] = "";
-}
+//   // $variables['form']['title']['widget']['#title'] = $ph;
+//   // $variables['form']['title']['widget'][0]['#title'] = $ph;
+//   // $variables['form']['title']['widget'][0]['value']['#title'] = $ph;
+//   // $variables['form']['title']['widget'][0]['value']['#placeholder'] = "";
+// }
 
 function ouatminimal_preprocess_input(&$variables) {
   $element = &$variables['element'];

+ 2 - 4
src/web/themes/custom/ouatminimal_theme/templates/form/node-edit-form--node-concernement.html.twig

@@ -23,8 +23,6 @@
   <div class="layout-region  layout-region-node-center clearfix">
     <div class="layout-region layout-region-node-main">
       {{ form|without('title','advanced', 'footer', 'actions', 'group_internal') }}
-      {# {{ form|without('title','footer') }} #}
-      {# {{ form }} #}
     </div>
     <div class="layout-region layout-region-node-secondary">
       {{ form.group_internal }}
@@ -32,9 +30,9 @@
       {{ form.actions }}
     </div>
   </div> 
-  {# <div class="layout-region layout-region-node-footer">
+  <div class="layout-region layout-region-node-footer">
     <div class="layout-region-node-footer__content">
       {{ form.footer }}
     </div>
-  </div> #}
+  </div>
 </div>