Просмотр исходного кода

try to disable delete button on root disk

andre 4 лет назад
Родитель
Сommit
95f0c9e4f7
1 измененных файлов с 5 добавлено и 13 удалено
  1. 5 13
      app/UI/Disk/Pages/DiskDataTable.php

+ 5 - 13
app/UI/Disk/Pages/DiskDataTable.php

@@ -64,7 +64,7 @@ class DiskDataTable extends DataTable implements ClientArea
         //Update
         $this->addActionButton(new UpdateButton());
         //Delete
-        $this->addActionButton(new DeleteButton());
+//        $this->addActionButton(new DeleteButton());
     }
 
     protected function loadHtml()
@@ -134,23 +134,15 @@ class DiskDataTable extends DataTable implements ClientArea
                 "bytes"  => $entity->getBytes(),
                 "master" => $entity->isMaster(),
             ];
-            if ( $entity->getName() =='disk-1' ) {
+/*            if ( $entity->getName() =='disk-1' ) {
                 $actionButtons = $this->getActionButtons();
                 $disableButton = $actionButtons['deleteDiskButton'];
-            }
+            } */
+            $this->addActionButton(new DeleteButton());
         }
         $dataProv = new ArrayDataProvider();
         $dataProv->setDefaultSorting("name", 'ASC');
         $dataProv->setData($data);
         $this->setDataProvider($dataProv);
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            $disableButton,
-            'Debug',
-            ''
-        );
-}
-
-
+    }
 }