Browse Source

Show link should be used if we doesn't have the edit route

If we have the EDIT role but not the edit route, the identifier doesn't contains a link to the show action
Benoît Lévêque 10 years ago
parent
commit
ff45197497
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Datagrid/ListMapper.php

+ 1 - 1
Datagrid/ListMapper.php

@@ -52,7 +52,7 @@ class ListMapper extends BaseMapper
         $fieldDescriptionOptions['identifier'] = true;
 
         if (!isset($fieldDescriptionOptions['route']['name'])) {
-            $routeName = $this->admin->isGranted('EDIT') ? 'edit' : 'show';
+            $routeName = ($this->admin->isGranted('EDIT') && $this->admin->hasRoute('edit')) ? 'edit' : 'show';
             $fieldDescriptionOptions['route']['name'] = $routeName;
         }