@extends('su-admin.layout.master') @section('content')
@if (session()->has('message')) @endif @if (session()->has('error')) @endif

Modifica temi

{!! Form::open(['url' => Request::url(), 'method' => 'get', 'class' => 'form-horizontal']) !!}
{!! Form::label('theme_selected', 'Seleziona il tema:', ['class' => 'form-label'] ) !!} {!! Form::select('theme_selected', $themes, $theme_selected, ['class' => 'form-select form-select-sm' ]) !!} {!! Form::submit('Seleziona', ['class' => 'btn btn-secondary btn-sm'] ) !!}
{!! Form::close() !!}
@if(!empty($theme_selected))
@php $theme_file_exists = true; $theme_file = design_path() . '/themes/' . $theme_selected . '/' . $file_selected; if(!File::exists($theme_file)) { $theme_file_exists = false; } @endphp @if(!empty($file_selected) && $theme_file_exists) {!! Form::open(['url' => Request::url(), 'method' => 'post', 'class' => 'form-horizontal frm-theme-code']) !!}
{!! Form::hidden('theme_selected', $theme_selected) !!} {!! Form::hidden('file_selected', $file_selected) !!} @php $theme_file_content = File::get($theme_file); $theme_file_extension = pathinfo($theme_file, PATHINFO_EXTENSION); @endphp {!! Form::textarea('code', $theme_file_content, ['class' => 'form-textarea-codemirror', 'id' => 'code', 'style' => 'resize:none; width: 100%; height: 70vh;', 'data-type' => $theme_file_extension]) !!}
{!! Form::button('Aggiorna file', ['class' => 'btn btn-primary btn-save-theme-code'] ) !!}
{!! Form::close() !!} @else
Seleziona un file del tema per modificarlo
@endif
{!! Form::open(['url' => Request::url(), 'method' => 'get', 'class' => 'form-horizontal frm-theme-files']) !!} {!! Form::hidden('theme_selected', $theme_selected) !!} {!! Form::hidden('file_selected', $file_selected) !!} {!! Form::close() !!} {!! Form::open(['url' => Request::url(), 'method' => 'post', 'class' => 'form-horizontal frm-theme-files-delete']) !!} {!! Form::hidden('theme_selected', $theme_selected) !!} {!! Form::hidden('file_selected', $file_selected) !!} {!! Form::hidden('deleted', '0') !!} {!! Form::hidden('file_deleted', '') !!} {!! Form::close() !!} {!! Form::open(['url' => Request::url(), 'method' => 'post', 'class' => 'form-horizontal frm-theme-files-rename']) !!} {!! Form::hidden('theme_selected', $theme_selected) !!} {!! Form::hidden('file_selected', $file_selected) !!} {!! Form::hidden('renamed', '0') !!} {!! Form::hidden('type', '') !!} {!! Form::hidden('file_path', '') !!} {!! Form::hidden('file_renamed', '') !!} {!! Form::close() !!}
{!! Form::open(['url' => Request::url(), 'method' => 'post', 'class' => 'form-horizontal frm-theme-actions']) !!} {!! Form::hidden('theme_selected', $theme_selected) !!} {!! Form::hidden('file_selected', $file_selected) !!} {!! Form::hidden('action', '') !!} {!! Form::hidden('file_name', '') !!} {!! Form::hidden('file_label', '') !!} {!! Form::hidden('file_type', '') !!}
{!! Form::button(' Documentazione', ['class' => 'btn btn-dark btn-theme-docs'] ) !!}
{!! Form::button(' Scansiona traduzioni', ['class' => 'btn btn-primary btn-theme-scan-translations', 'style' => 'margin-bottom: 6px;'] ) !!} {!! Form::button(' Crea template pagina', ['class' => 'btn btn-secondary btn-theme-create-template', 'style' => 'margin-bottom: 6px;'] ) !!} {!! Form::button(' Crea template parts', ['class' => 'btn btn-secondary btn-theme-create-template-parts', 'style' => 'margin-bottom: 6px;'] ) !!} {!! Form::button(' Crea file php', ['class' => 'btn btn-secondary btn-theme-create-file-php', 'style' => 'margin-bottom: 6px;'] ) !!} {!! Form::button(' Crea file asset', ['class' => 'btn btn-secondary btn-theme-create-file-asset', 'style' => 'margin-bottom: 6px;'] ) !!} {!! Form::button(' Crea shortcode', ['class' => 'btn btn-secondary btn-theme-create-shortcode', 'style' => 'margin-bottom: 6px;'] ) !!}
{!! Form::button(' Sovrascrivi view', ['class' => 'btn btn-secondary btn-theme-overrides-view', 'disabled' => ((get_plus_status() || is_admin_role('admin')) ? false : true)] ) !!} {!! Form::button('', ['class' => 'btn btn-primary btn-theme-overrides-view-compare', 'style' => 'width: 50px;', 'disabled' => ((get_plus_status() || is_admin_role('admin')) ? false : true)] ) !!}
{!! Form::close() !!}
@else
Seleziona un tema
@endif
@if(get_plus_status() || is_admin_role('admin')) @endif @endsection @push('custom-scripts') @if(!empty($theme_selected)) @endif @endpush