switch( action ) { @foreach ($action as $key => $value ) @switch($key) @case('delete') @case('competition_delete') @case('vote_delete') @case('video_delete') case 'delete' : var url = "{{ route($route.'.destroy', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); rowDelete( url, row, window.rowDelete_title, window.rowDelete_description, window.rowDelete_button, 'delete', function () { $('#create_button').prop('disabled', false); }); break; @break @case('edit') @case('competition_edit') @case('winner_video_edit') case 'edit' : var url = "{{ route($route.'.edit', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); rowEdit( url, row, '{!! __($title.' módosítása') !!}', '{!! __('button.save') !!}', function () { get_ckeditor(); }, ); break; @break @case('video_edit') case 'video_edit' : var url = "{{ route($route.'.edit', [app()->getLocale(), ':slug', ':slug1']) }}"; url = url.replace(':slug', data.id); url = url.replace(':slug1', '{{$type}}'); rowEdit( url, row, '{!! __($title.' módosítása') !!}', '{!! __('button.save') !!}', function () { get_ckeditor(); }, ); break; @break @case('bann') case 'bann' : var url = "{{ route($route.'.bann', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); rowEdit( url, row, '{!! __($title.' tiltása') !!}', '{!! __('button.save') !!}' ); break; @break @case('details') @case('competition_details') case 'details' : var url = "{{ $type ? route($route.'.details', [app()->getLocale(), ':slug', ':slug1']) : route($route.'.details', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); {!! $type ? "url = url.replace(':slug1', '$type');" : "" !!} showModal( url, '{!! __($title.' részletei') !!}', '{!! __('Bezárás') !!}' ); break; @break @case('activate') @case('message_activate') case 'activate' : var url = "{{ route($route.'.activate', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); dialogModal( null, row, '{!! __($title.' aktiválása') !!}', '{!! __('Valóban aktiválni akarod?') !!}', '{!! __('button.go') !!}', function () { }, function () { }, function () {window.location = url; }); break; @break @case('registration_repay') case 'registration_repay' : var url = "{{ route($route.'.repay', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); dialogModal( null, row, '{!! __($title.' visszafizetve') !!}', '{!! __('Valóban vissza van fizetve?') !!}', '{!! __('button.go') !!}', function () { }, function () { }, function () {window.location = url; }); break; @break @case('competition_close') case 'close' : var url = "{{ route($route.'.close', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); dialogModal( null, row, '{!! __($title.' zárása') !!}', '{!! __('Valóban le akarod zárni?') !!}', '{!! __('button.go') !!}', function () { }, function () { }, function () {window.location = url; }); break; @break @case('registration') case 'registration' : var url = "{{ route('registration.show', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); window.location = url; break; @break @case('payment') case 'payment' : var url = "{{ route('payment.show', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); window.location = url; break; @break @case('winner_payment') case 'winner_payment' : var url = "{{ route($route.'.winner_payment', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); rowEdit( url, row, '{!! __($title.' módosítása') !!}', '{!! __('Kifizetve') !!}' ); break; @break @case('competition_payment') case 'competition_payment' : var url = "{{ route('payment.competition', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); window.location = url; break; @break @case('registration_payment') case 'registration_payment' : var url = "{{ route('user.payment.index', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.id); window.location = url; break; @break @case('vote') case 'vote' : var url = "{{ route('vote.video', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', data.video_id); window.location = url; break; @break @case('congrat') case 'congrat' : var url = "{{ route('user.congrat.index', [app()->getLocale(), ':slug']) }}"; url = url.replace(':slug', $(this).data('registration-id')); window.location = url; break; @break @endswitch @endforeach }