Bladeren bron

Merge branch 'master' of https://figureslibres.io/gogs/bachir/drupal-reha

ouidade 9 maanden geleden
bovenliggende
commit
c2f11b9856

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

@@ -22,7 +22,7 @@ display:
     display_plugin: default
     position: 0
     display_options:
-      title: 'Mes fichiers'
+      title: 'Mon espace de travail'
       fields: {  }
       pager:
         type: none

+ 19 - 19
web/modules/reha_mod/src/Plugin/Block/PrevNext.php

@@ -52,25 +52,25 @@ class PrevNext extends BlockBase {
           }
         }
   
-      }
-      $return = [
-        '#cache' => [
-          'max-age' => 0,
-        ]
-      ];
-  
-      if ($prevnode) {
-        $prev_link_title = Markup::create('<span>Site pilote précédent</span>');
-        $prev_options = ['absolute' => FALSE, 'attributes' => ['class' => 'prev-site']];
-        $prev_link_object = Link::createFromRoute($prev_link_title, 'entity.node.canonical', ['node' => $prevnode->id()], $prev_options);
-        $return[] = $prev_link_object->toRenderable();
-      }
-  
-      if ($nextnode) {
-        $next_link_title = Markup::create('<span>Site pilote suivant</span>');
-        $next_options = ['absolute' => FALSE, 'attributes' => ['class' => 'next-site']];
-        $next_link_object = Link::createFromRoute($next_link_title, 'entity.node.canonical', ['node' => $nextnode->id()], $next_options);
-        $return[] = $next_link_object->toRenderable();
+        $return = [
+          '#cache' => [
+            'max-age' => 0,
+          ]
+        ];
+    
+        if (isset($prevnode)) {
+          $prev_link_title = Markup::create('<span>Site pilote précédent</span>');
+          $prev_options = ['absolute' => FALSE, 'attributes' => ['class' => 'prev-site']];
+          $prev_link_object = Link::createFromRoute($prev_link_title, 'entity.node.canonical', ['node' => $prevnode->id()], $prev_options);
+          $return[] = $prev_link_object->toRenderable();
+        }
+    
+        if (isset($nextnode)) {
+          $next_link_title = Markup::create('<span>Site pilote suivant</span>');
+          $next_options = ['absolute' => FALSE, 'attributes' => ['class' => 'next-site']];
+          $next_link_object = Link::createFromRoute($next_link_title, 'entity.node.canonical', ['node' => $nextnode->id()], $next_options);
+          $return[] = $next_link_object->toRenderable();
+        }
       }
     }