| @@ 7-24 (lines=18) @@ | ||
| 4 | ||
| 5 | use Encore\Admin\Admin; |
|
| 6 | ||
| 7 | class Datetime extends AbstractDisplayer |
|
| 8 | { |
|
| 9 | public function display($format = '') |
|
| 10 | { |
|
| 11 | return Admin::component('admin::grid.inline-edit.datetime', [ |
|
| 12 | 'key' => $this->getKey(), |
|
| 13 | 'value' => $this->getValue(), |
|
| 14 | 'display' => $this->getValue(), |
|
| 15 | 'name' => $this->getPayloadName(), |
|
| 16 | 'resource' => $this->getResource(), |
|
| 17 | 'trigger' => "ie-trigger-{$this->getClassName()}", |
|
| 18 | 'target' => "ie-content-{$this->getClassName()}-{$this->getKey()}", |
|
| 19 | ||
| 20 | 'format' => $format, |
|
| 21 | 'locale' => config('app.locale'), |
|
| 22 | ]); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ||
| @@ 7-22 (lines=16) @@ | ||
| 4 | ||
| 5 | use Encore\Admin\Admin; |
|
| 6 | ||
| 7 | class Input extends AbstractDisplayer |
|
| 8 | { |
|
| 9 | public function display($mask = '') |
|
| 10 | { |
|
| 11 | return Admin::component('admin::grid.inline-edit.input', [ |
|
| 12 | 'key' => $this->getKey(), |
|
| 13 | 'value' => $this->getValue(), |
|
| 14 | 'display' => $this->getValue(), |
|
| 15 | 'name' => $this->getPayloadName(), |
|
| 16 | 'resource' => $this->getResource(), |
|
| 17 | 'trigger' => "ie-trigger-{$this->getClassName()}", |
|
| 18 | 'target' => "ie-content-{$this->getClassName()}-{$this->getKey()}", |
|
| 19 | 'mask' => $mask, |
|
| 20 | ]); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| @@ 8-23 (lines=16) @@ | ||
| 5 | use Encore\Admin\Admin; |
|
| 6 | use Illuminate\Support\Arr; |
|
| 7 | ||
| 8 | class Radio extends AbstractDisplayer |
|
| 9 | { |
|
| 10 | public function display($options = []) |
|
| 11 | { |
|
| 12 | return Admin::component('admin::grid.inline-edit.radio', [ |
|
| 13 | 'key' => $this->getKey(), |
|
| 14 | 'name' => $this->getPayloadName(), |
|
| 15 | 'value' => $this->getValue(), |
|
| 16 | 'resource' => $this->getResource(), |
|
| 17 | 'trigger' => "ie-trigger-{$this->getClassName()}", |
|
| 18 | 'target' => "ie-content-{$this->getClassName()}-{$this->getKey()}", |
|
| 19 | 'display' => Arr::get($options, $this->getValue(), ''), |
|
| 20 | 'options' => $options, |
|
| 21 | ]); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| @@ 8-23 (lines=16) @@ | ||
| 5 | use Encore\Admin\Admin; |
|
| 6 | use Illuminate\Support\Arr; |
|
| 7 | ||
| 8 | class Select extends AbstractDisplayer |
|
| 9 | { |
|
| 10 | public function display($options = []) |
|
| 11 | { |
|
| 12 | return Admin::component('admin::grid.inline-edit.select', [ |
|
| 13 | 'key' => $this->getKey(), |
|
| 14 | 'value' => $this->getValue(), |
|
| 15 | 'display' => Arr::get($options, $this->getValue(), ''), |
|
| 16 | 'name' => $this->getPayloadName(), |
|
| 17 | 'resource' => $this->getResource(), |
|
| 18 | 'trigger' => "ie-trigger-{$this->getClassName()}", |
|
| 19 | 'target' => "ie-content-{$this->getClassName()}-{$this->getKey()}", |
|
| 20 | 'options' => $options, |
|
| 21 | ]); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| @@ 7-22 (lines=16) @@ | ||
| 4 | ||
| 5 | use Encore\Admin\Admin; |
|
| 6 | ||
| 7 | class Textarea extends AbstractDisplayer |
|
| 8 | { |
|
| 9 | public function display($rows = 5) |
|
| 10 | { |
|
| 11 | return Admin::component('admin::grid.inline-edit.textarea', [ |
|
| 12 | 'key' => $this->getKey(), |
|
| 13 | 'value' => $this->getValue(), |
|
| 14 | 'display' => $this->getValue(), |
|
| 15 | 'name' => $this->getPayloadName(), |
|
| 16 | 'resource' => $this->getResource(), |
|
| 17 | 'trigger' => "ie-trigger-{$this->getClassName()}", |
|
| 18 | 'target' => "ie-content-{$this->getClassName()}-{$this->getKey()}", |
|
| 19 | 'rows' => $rows, |
|
| 20 | ]); |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||