| @@ 9-42 (lines=34) @@ | ||
| 6 | use Yaro\Jarboe\Table\Fields\Traits\Nullable; |
|
| 7 | use Yaro\Jarboe\Table\Fields\Traits\Orderable; |
|
| 8 | ||
| 9 | class IconPicker extends AbstractField |
|
| 10 | { |
|
| 11 | use Orderable; |
|
| 12 | ||
| 13 | public function value(Request $request) |
|
| 14 | { |
|
| 15 | return (string) parent::value($request); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function getListView($model) |
|
| 19 | { |
|
| 20 | return view('jarboe::crud.fields.icon-picker.list', [ |
|
| 21 | 'model' => $model, |
|
| 22 | 'field' => $this, |
|
| 23 | ]); |
|
| 24 | } |
|
| 25 | ||
| 26 | public function getEditFormView($model) |
|
| 27 | { |
|
| 28 | $template = $this->isReadonly() ? 'readonly' : 'edit'; |
|
| 29 | ||
| 30 | return view('jarboe::crud.fields.icon-picker.'. $template, [ |
|
| 31 | 'model' => $model, |
|
| 32 | 'field' => $this, |
|
| 33 | ]); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function getCreateFormView() |
|
| 37 | { |
|
| 38 | return view('jarboe::crud.fields.icon-picker.create', [ |
|
| 39 | 'field' => $this, |
|
| 40 | ]); |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||
| @@ 8-41 (lines=34) @@ | ||
| 5 | use Illuminate\Http\Request; |
|
| 6 | use Yaro\Jarboe\Table\Fields\Traits\Orderable; |
|
| 7 | ||
| 8 | class Markdown extends AbstractField |
|
| 9 | { |
|
| 10 | use Orderable; |
|
| 11 | ||
| 12 | public function value(Request $request) |
|
| 13 | { |
|
| 14 | return (string) parent::value($request); |
|
| 15 | } |
|
| 16 | ||
| 17 | public function getListView($model) |
|
| 18 | { |
|
| 19 | return view('jarboe::crud.fields.markdown.list', [ |
|
| 20 | 'model' => $model, |
|
| 21 | 'field' => $this, |
|
| 22 | ]); |
|
| 23 | } |
|
| 24 | ||
| 25 | public function getEditFormView($model) |
|
| 26 | { |
|
| 27 | $template = $this->isReadonly() ? 'readonly' : 'edit'; |
|
| 28 | ||
| 29 | return view('jarboe::crud.fields.markdown.'. $template, [ |
|
| 30 | 'model' => $model, |
|
| 31 | 'field' => $this, |
|
| 32 | ]); |
|
| 33 | } |
|
| 34 | ||
| 35 | public function getCreateFormView() |
|
| 36 | { |
|
| 37 | return view('jarboe::crud.fields.markdown.create', [ |
|
| 38 | 'field' => $this, |
|
| 39 | ]); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||