enable/disable from index
This commit is contained in:
		| @@ -101,6 +101,8 @@ return [ | ||||
|     'partially'             => 'Partially', | ||||
|     'partially_paid'        => 'Partially Paid', | ||||
|     'export'                => 'Export', | ||||
|     'enable'                => 'Enable', | ||||
|     'disable'               => 'Disable', | ||||
|  | ||||
|     'title' => [ | ||||
|         'new'               => 'New :type', | ||||
|   | ||||
| @@ -8,6 +8,8 @@ return [ | ||||
|         'deleted'           => ':type deleted!', | ||||
|         'duplicated'        => ':type duplicated!', | ||||
|         'imported'          => ':type imported!', | ||||
|         'enabled'           => ':type enabled!', | ||||
|         'disabled'          => ':type disabled!', | ||||
|     ], | ||||
|     'error' => [ | ||||
|         'over_payment'      => 'Error: Payment not added! Amount passes the total.', | ||||
|   | ||||
| @@ -72,8 +72,13 @@ | ||||
|                                     <i class="fa fa-ellipsis-h"></i> | ||||
|                                 </button> | ||||
|                                 <ul class="dropdown-menu dropdown-menu-right"> | ||||
|                                     <li><a href="{{ url('auth/users/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li> | ||||
|                                     <li><a href="{{ url('auth/users/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>@if ($item->enabled) | ||||
|                                     <li><a href="{{ route('users.disable', $item->id) }}">{{ trans('general.disable') }}</a></li> | ||||
|                                     @else | ||||
|                                     <li><a href="{{ route('users.enable', $item->id) }}">{{ trans('general.enable') }}</a></li> | ||||
|                                     @endif | ||||
|                                     @permission('delete-auth-users') | ||||
|                                     <li class="divider"></li> | ||||
|                                     <li>{!! Form::deleteLink($item, 'auth/users') !!}</li> | ||||
|                                     @endpermission | ||||
|                                 </ul> | ||||
|   | ||||
| @@ -67,12 +67,17 @@ | ||||
|                                 </button> | ||||
|                                 <ul class="dropdown-menu dropdown-menu-right"> | ||||
|                                     <li><a href="{{ route('items.edit', $item->id) }}">{{ trans('general.edit') }}</a></li> | ||||
|                                     <li class="divider"></li> | ||||
|                                     @if ($item->enabled) | ||||
|                                         <li><a href="{{ route('items.disable', $item->id) }}">{{ trans('general.disable') }}</a></li> | ||||
|                                     @else | ||||
|                                         <li><a href="{{ route('items.enable', $item->id) }}">{{ trans('general.enable') }}</a></li> | ||||
|                                     @endif | ||||
|                                     @permission('create-common-items') | ||||
|                                     <li><a href="{{ route('items.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a></li> | ||||
|                                     <li class="divider"></li> | ||||
|                                     <li><a href="{{ route('items.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a></li> | ||||
|                                     @endpermission | ||||
|                                     @permission('delete-common-items') | ||||
|                                     <li class="divider"></li> | ||||
|                                     <li>{!! Form::deleteLink($item, 'common/items') !!}</li> | ||||
|                                     @endpermission | ||||
|                                 </ul> | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|         <h1> | ||||
|             @yield('title') | ||||
|             @yield('new_button') | ||||
|             @if ($suggestion_modules) | ||||
|             @if (!empty($suggestion_modules)) | ||||
|                 @foreach($suggestion_modules as $s_module) | ||||
|                     <span class="new-button"> | ||||
|                         <a href="{{ url($s_module->action_url) . '?' . http_build_query((array) $s_module->action_parameters) }}" class="btn btn-default btn-sm" target="{{ $s_module->action_target }}"><span class="fa fa-rocket"></span>  {{ $s_module->name }}</a> | ||||
|   | ||||
| @@ -59,6 +59,11 @@ | ||||
|                                 </button> | ||||
|                                 <ul class="dropdown-menu dropdown-menu-right"> | ||||
|                                     <li><a href="{{ url('settings/categories/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li> | ||||
|                                     @if ($item->enabled) | ||||
|                                     <li><a href="{{ route('categories.disable', $item->id) }}">{{ trans('general.disable') }}</a></li> | ||||
|                                     @else | ||||
|                                     <li><a href="{{ route('categories.enable', $item->id) }}">{{ trans('general.enable') }}</a></li> | ||||
|                                     @endif | ||||
|                                     @if ($item->id != $transfer_id) | ||||
|                                     @permission('delete-settings-categories') | ||||
|                                     <li class="divider"></li> | ||||
|   | ||||
| @@ -56,7 +56,13 @@ | ||||
|                                 </button> | ||||
|                                 <ul class="dropdown-menu dropdown-menu-right"> | ||||
|                                     <li><a href="{{ url('settings/currencies/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li> | ||||
|                                     @if ($item->enabled) | ||||
|                                     <li><a href="{{ route('currencies.disable', $item->id) }}">{{ trans('general.disable') }}</a></li> | ||||
|                                     @else | ||||
|                                     <li><a href="{{ route('currencies.enable', $item->id) }}">{{ trans('general.enable') }}</a></li> | ||||
|                                     @endif | ||||
|                                     @permission('delete-settings-currencies') | ||||
|                                     <li class="divider"></li> | ||||
|                                     <li>{!! Form::deleteLink($item, 'settings/currencies') !!}</li> | ||||
|                                     @endpermission | ||||
|                                 </ul> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user