From 3500570b92d4713c5fab227b9a4e2db1b24d8788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Thu, 19 Mar 2020 22:57:28 +0300 Subject: [PATCH] Form group add show feature in attribute.. --- .../form/bulk_action_row_group.blade.php | 186 +++++++++--------- .../views/partials/form/date_group.blade.php | 4 + .../partials/form/date_time_group.blade.php | 4 + .../views/partials/form/money_group.blade.php | 4 + .../form/multi_select_add_new_group.blade.php | 4 + .../form/multi_select_group.blade.php | 4 + .../form/select_add_new_group.blade.php | 4 + .../partials/form/select_group.blade.php | 4 + .../form/select_group_add_new_group.blade.php | 4 + .../form/select_group_group.blade.php | 4 + .../form/select_remote_group.blade.php | 4 + .../views/partials/form/time_group.blade.php | 4 + 12 files changed, 137 insertions(+), 93 deletions(-) diff --git a/resources/views/partials/form/bulk_action_row_group.blade.php b/resources/views/partials/form/bulk_action_row_group.blade.php index 55d77160c..0929ce30f 100644 --- a/resources/views/partials/form/bulk_action_row_group.blade.php +++ b/resources/views/partials/form/bulk_action_row_group.blade.php @@ -1,106 +1,106 @@ @stack('bulk_action_row_input_start') -@php - if (is_array($path)) { - $path = route('bulk-actions.action', $path); - } else { - $path = url('common/bulk-actions/' . $path); - } - - $actions_to_show = []; - foreach ($actions as $key => $action) { - if ((isset($action['permission']) && !user()->can($action['permission']))) { - continue; + @php + if (is_array($path)) { + $path = route('bulk-actions.action', $path); + } else { + $path = url('common/bulk-actions/' . $path); } - $actions_to_show[$key] = true; - } -@endphp + $actions_to_show = []; + foreach ($actions as $key => $action) { + if ((isset($action['permission']) && !user()->can($action['permission']))) { + continue; + } -@if(!empty($actions_to_show)) -
-
- - - - {{ strtolower(trans_choice($text, 1)) }} + $actions_to_show[$key] = true; + } + @endphp + + @if(!empty($actions_to_show)) +
+
+ + + + {{ strtolower(trans_choice($text, 1)) }} + + + {{ strtolower(trans_choice($text, 2)) }} + + {{ trans('bulk_actions.selected') }} - - {{ strtolower(trans_choice($text, 2)) }} - - {{ trans('bulk_actions.selected') }} - -
+
-
-
- +
+
+ - + +
+
+ +
+ + +
+ +
+ +
-
-
- - -
+ + + + @else +
{{ trans('bulk_actions.no_action') }}
+ @endif @stack('bulk_action_row_input_end') diff --git a/resources/views/partials/form/date_group.blade.php b/resources/views/partials/form/date_group.blade.php index 2cfcece7b..e072095d4 100644 --- a/resources/views/partials/form/date_group.blade.php +++ b/resources/views/partials/form/date_group.blade.php @@ -55,6 +55,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/date_time_group.blade.php b/resources/views/partials/form/date_time_group.blade.php index 4f3b6bea8..4e8d71273 100644 --- a/resources/views/partials/form/date_time_group.blade.php +++ b/resources/views/partials/form/date_time_group.blade.php @@ -60,6 +60,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/money_group.blade.php b/resources/views/partials/form/money_group.blade.php index 15c2ab3c1..b01366b58 100644 --- a/resources/views/partials/form/money_group.blade.php +++ b/resources/views/partials/form/money_group.blade.php @@ -19,6 +19,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['masked'])) :masked="{{ ($attributes['masked']) ? 'true' : 'false' }}" @endif diff --git a/resources/views/partials/form/multi_select_add_new_group.blade.php b/resources/views/partials/form/multi_select_add_new_group.blade.php index 4538b96fb..6a2700ae4 100644 --- a/resources/views/partials/form/multi_select_add_new_group.blade.php +++ b/resources/views/partials/form/multi_select_add_new_group.blade.php @@ -71,6 +71,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/multi_select_group.blade.php b/resources/views/partials/form/multi_select_group.blade.php index d1a8e6f1c..60c913a60 100644 --- a/resources/views/partials/form/multi_select_group.blade.php +++ b/resources/views/partials/form/multi_select_group.blade.php @@ -49,6 +49,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_add_new_group.blade.php b/resources/views/partials/form/select_add_new_group.blade.php index f64b5268b..8251743ec 100644 --- a/resources/views/partials/form/select_add_new_group.blade.php +++ b/resources/views/partials/form/select_add_new_group.blade.php @@ -65,6 +65,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group.blade.php b/resources/views/partials/form/select_group.blade.php index 3a5205c7e..fa55d0e28 100644 --- a/resources/views/partials/form/select_group.blade.php +++ b/resources/views/partials/form/select_group.blade.php @@ -43,6 +43,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group_add_new_group.blade.php b/resources/views/partials/form/select_group_add_new_group.blade.php index 6da0cbce9..9227a2596 100644 --- a/resources/views/partials/form/select_group_add_new_group.blade.php +++ b/resources/views/partials/form/select_group_add_new_group.blade.php @@ -67,6 +67,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group_group.blade.php b/resources/views/partials/form/select_group_group.blade.php index 33bf2863a..524ea79c4 100644 --- a/resources/views/partials/form/select_group_group.blade.php +++ b/resources/views/partials/form/select_group_group.blade.php @@ -45,6 +45,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_remote_group.blade.php b/resources/views/partials/form/select_remote_group.blade.php index d043ec069..ccc8dae82 100644 --- a/resources/views/partials/form/select_remote_group.blade.php +++ b/resources/views/partials/form/select_remote_group.blade.php @@ -43,6 +43,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if (isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/time_group.blade.php b/resources/views/partials/form/time_group.blade.php index b3f3ab1f9..d4adaf532 100644 --- a/resources/views/partials/form/time_group.blade.php +++ b/resources/views/partials/form/time_group.blade.php @@ -48,6 +48,10 @@ :disabled="{{ $attributes['disabled'] }}" @endif + @if (isset($attributes['show'])) + v-if="{{ $attributes['show'] }}" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else