|
|
@@ -4,6 +4,10 @@ namespace Dcat\Admin\Grid\Displayers;
|
|
|
|
|
|
use Dcat\Admin\Actions\Action;
|
|
|
use Dcat\Admin\Form;
|
|
|
+use Dcat\Admin\Grid\Actions\Delete;
|
|
|
+use Dcat\Admin\Grid\Actions\Edit;
|
|
|
+use Dcat\Admin\Grid\Actions\QuickEdit;
|
|
|
+use Dcat\Admin\Grid\Actions\Show;
|
|
|
use Dcat\Admin\Grid\RowAction;
|
|
|
use Dcat\Admin\Support\Helper;
|
|
|
use Illuminate\Contracts\Support\Htmlable;
|
|
|
@@ -229,11 +233,12 @@ class Actions extends AbstractDisplayer
|
|
|
{
|
|
|
$label = trans('admin.show');
|
|
|
|
|
|
- return <<<EOT
|
|
|
-<a href="{$this->resource()}/{$this->getKey()}" title="{$label}">
|
|
|
- <i class="feather icon-eye grid-action-icon"></i>
|
|
|
-</a>
|
|
|
-EOT;
|
|
|
+ return Show::make(
|
|
|
+ "<i title='{$label}' class=\"feather icon-eye grid-action-icon\"></i> "
|
|
|
+ )
|
|
|
+ ->setGrid($this->grid)
|
|
|
+ ->setRow($this->row)
|
|
|
+ ->render();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -245,11 +250,12 @@ EOT;
|
|
|
{
|
|
|
$label = trans('admin.edit');
|
|
|
|
|
|
- return <<<EOT
|
|
|
-<a href="{$this->grid->getEditUrl($this->getKey())}" title="{$label}">
|
|
|
- <i class="feather icon-edit-1 grid-action-icon"></i>
|
|
|
-</a>
|
|
|
-EOT;
|
|
|
+ return Edit::make(
|
|
|
+ "<i title='{$label}' class=\"feather icon-edit-1 grid-action-icon\"></i> "
|
|
|
+ )
|
|
|
+ ->setGrid($this->grid)
|
|
|
+ ->setRow($this->row)
|
|
|
+ ->render();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -270,11 +276,12 @@ EOT;
|
|
|
|
|
|
$label = trans('admin.quick_edit');
|
|
|
|
|
|
- return <<<EOF
|
|
|
-<a title="{$label}" class="{$this->grid->getRowName()}-edit" data-url="{$this->resource()}/{$this->getKey()}/edit" href="javascript:void(0);">
|
|
|
- <i class="feather icon-edit grid-action-icon"></i>
|
|
|
-</a>
|
|
|
-EOF;
|
|
|
+ return QuickEdit::make(
|
|
|
+ "<i title='{$label}' class=\"feather icon-edit grid-action-icon\"></i> "
|
|
|
+ )
|
|
|
+ ->setGrid($this->grid)
|
|
|
+ ->setRow($this->row)
|
|
|
+ ->render();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -286,10 +293,11 @@ EOF;
|
|
|
{
|
|
|
$label = trans('admin.delete');
|
|
|
|
|
|
- return <<<EOT
|
|
|
-<a title="{$label}" href="javascript:void(0);" data-message="ID - {$this->getKey()}" data-url="{$this->resource()}/{$this->getKey()}" data-action="delete">
|
|
|
- <i class="feather icon-trash grid-action-icon"></i>
|
|
|
-</a>
|
|
|
-EOT;
|
|
|
+ return Delete::make(
|
|
|
+ "<i class=\"feather icon-trash grid-action-icon\" title='{$label}'></i> "
|
|
|
+ )
|
|
|
+ ->setGrid($this->grid)
|
|
|
+ ->setRow($this->row)
|
|
|
+ ->render();
|
|
|
}
|
|
|
}
|