@extends('admin.layout.base') @section('content') @php $params = ($object != NULL && $object->params != '' ? json_decode($object->params) : NULL); $form = new \App\Http\Controllers\FormCtrl(); $video_width = $video_height = ''; $gallery = array(); if($params != NULL && is_object($params)) { if(isset($params->video_width)) $video_width = $params->video_width; if(isset($params->video_height)) $video_height = $params->video_height; if(isset($params->gallery) && is_array($params->gallery)) { for($g = 0; $g < count($params->gallery); $g++) { $obj = (object)[]; $obj->id = $params->gallery[$g]->id; $obj->ordine = $params->gallery[$g]->ordine; $obj->filename = $params->gallery[$g]->file; $gallery[] = $obj; } } } $label_sezione = 'Sezione'; $back_url = $store_url = url('/admin/'.$path); if(isset($type_block)) { if($type_block == 2) { $label_sezione = 'News'; $store_url = url('/admin/news/'.$ref_id.'/content/2/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/news/'.$ref_id.'/content/2/list'); } else if($type_block == 3) { $label_sezione = 'Evento'; $store_url = url('/admin/eventi/'.$ref_id.'/content/3/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/eventi/'.$ref_id.'/content/3/list'); } else if($type_block == 4) { $label_sezione = 'Press'; $store_url = url('/admin/press/'.$ref_id.'/content/4/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/press/'.$ref_id.'/content/4/list'); } else if($type_block == 5) { $label_sezione = 'Soluzione'; $store_url = url('/admin/soluzioni/'.$ref_id.'/content/5/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/soluzioni/'.$ref_id.'/content/5/list'); } else if($type_block == 6) { $label_sezione = 'Case study'; $store_url = url('/admin/casestudy/'.$ref_id.'/content/6/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/casestudy/'.$ref_id.'/content/6/list'); } else if($type_block == 7) { $label_sezione = 'Applicazioni'; $store_url = url('/admin/applicazioni/'.$ref_id.'/content/7/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/applicazioni/'.$ref_id.'/content/7/list'); } else if($type_block == 8) { $label_sezione = 'Tecnologie'; $store_url = url('/admin/tecnologie/'.$ref_id.'/content/8/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/tecnologie/'.$ref_id.'/content/8/list'); } else if($type_block == 9) { $label_sezione = 'Unity'; $store_url = url('/admin/unity/'.$ref_id.'/content/9/'.(!empty($object) ? $object->id : 0)); $back_url = url('/admin/unity/'.$ref_id.'/content/9/list'); } } @endphp

@if($object == NULL) Crea @else Modifica @endif Contenuto

  TORNA ALL'ELENCO @if($object != NULL && isset($object->path)) PAGINA PUBBLICA @endif
@if(isset($objmenu))
{{$objmenu->parent}} - {{$objmenu->title}}
@elseif($object != NULL)
{{$object->section}}
@endif
@if(isset($objmenu)) @else {!!$form->insertSelectField($label_sezione, 'menu_id', 0, 'Seleziona', ($object != NULL && !empty($object) ? $object->menu_id : 0), true, $sezioni, "resetStepSelect(this.id)");!!} @endif {!!$form->insertSelectField('Layout', 'layout', 0, 'Seleziona', ($object != NULL && !empty($object) ? $object->layout : 0), false, $form_data->layout, "resetStepSelect(this.id)");!!} @if(count($languages) > 0) @if(count($languages) > 1) @endif @for($l = 0; $l < count($languages); $l++) @php $lang_id = $languages[$l]->id; $boxlang = NULL; if($object != NULL && $l > 0) { $boxlang = isset($object->translations[$lang_id]) ? $object->translations[$lang_id] : NULL; } else if($object != NULL) $boxlang = $object; $boxClass = (!$languages[$l]->selected ? " displaynone" : ""); @endphp @if(count($languages) > 1)
@endif @php $value = str_replace('"', '"', ($boxlang != NULL ? $boxlang->title : '')); echo $form->insertTextInputField("Titolo", "title_".$lang_id, $value, "", "#555", false, 0, 0, 255); $value = str_replace('"', '"', ($boxlang != NULL ? $boxlang->pretext : '')); echo $form->insertTextareaInputField("Testo", "pretext_".$lang_id, $value, "", "#666666", false, 0, 0, 30000, false, true, false); $value = str_replace('"', '"', ($boxlang != NULL ? $boxlang->description : '')); echo $form->insertTextareaInputField("Descrizione", "text_".$lang_id, $value, "", "#666666", false, 0, 0, 30000, false, true, false); $value = str_replace('"', '"', (($boxlang != NULL) ? $boxlang->alt_img : '')); echo $form->insertTextInputField("Alt immagine", "alt_img_".$lang_id, $value, "", "#555", false, 0, 0, 155); @endphp @if(count($languages) > 1)
@endif @endfor @endif
@php $element = array(); $obj = (object)[]; $obj->checked = $object != NULL && isset($params->allinea_immagine) && $params->allinea_immagine == 1; $obj->value = 1; $obj->text = "Selezione per inserire titolo e testo accanto all'immagine ( Solo per tipo layout con immagine a destra o sinistra )"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "allinea_immagine", $element, 0, count($element), 0, false, true, true, true); $element = array(); $obj = (object)[]; $obj->checked = $object != NULL && strpos($object->box_class, "center") !== FALSE; $obj->value = 1; $obj->text = "Selezione per centrare il testo"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "centrato", $element, 0, count($element), 0, false, true, true, true); $element = array(); $obj = (object)[]; $obj->checked = $object != NULL && strpos($object->box_class, "didascalia") !== FALSE; $obj->value = 1; $obj->text = "Selezione per usare il font 'Antic Didone'"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "didascalia", $element, 0, count($element), 0, false, true, true, true); @endphp
{!!$form->insertSelectField('Colore titolo', 'title_color', 0, 'Seleziona', ($params != NULL && isset($params->title_color) ? $params->title_color : ''), false, $form_data->color, "resetStepSelect(this.id)");!!} {!!$form->insertSelectField('Dimensione titolo', 'title_size', 0, 'Seleziona', ($params != NULL && isset($params->title_size) ? $params->title_size : ''), false, $form_data->sizes, "resetStepSelect(this.id)");!!} {!!$form->insertSelectField('Font testo', 'subtitle_family', 0, 'Seleziona', ($params != NULL && isset($params->subtitle_family) ? $params->subtitle_family : ''), false, $form_data->family, "resetStepSelect(this.id)");!!} {!!$form->insertSelectField('Livello opacità
Solo per tipo layout banner o layer testo', 'opacity_level', 0, 'Seleziona', ($params != NULL && isset($params->opacity_level) ? $params->opacity_level : 0), false, $form_data->opacity, "resetStepSelect(this.id)");!!}
@include('admin.page.form.file', array( 'index' => 1, 'placeholder' => 'Immagine', 'field' => 'img', 'base_img_url' => asset('img/block/'), 'singleimage' => true, 'dimension' => 'W: 1200', 'extensions' => 'jpg, jpeg, gif, png', 'fieldstatus' => 0, )) @php $element = array(); $obj = (object)[]; $obj->checked = $object != NULL && $object->gif_animata == 1; $obj->value = 1; $obj->text = "Selezione per caricare una gif animata"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "gif_animata", $element, 0, count($element), 0, false, true, true, true); $element = array(); $obj = (object)[]; $obj->checked = $object != NULL && strpos($object->box_class, "smallimage") !== FALSE; $obj->value = 1; $obj->text = "Selezione per ridurre l'immagine"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "smallimage", $element, 0, count($element), 0, false, true, true, true); @endphp @if(!isset($type_block)) @php $element = array(); $obj = (object)[]; $obj->checked = $params != NULL && isset($params->image_resize) && $params->image_resize == 1; $obj->value = 1; $obj->text = "Selezione per visualizzare completamente l'immagine"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "image_resize", $element, 0, count($element), 0, false, true, true, true); $element = array(); $obj = (object)[]; $obj->checked = $params != NULL && isset($params->image_right) && $params->image_right == 1; $obj->value = 1; $obj->text = "Selezione per posizionare l'immagine alla destra del contenuto"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "image_right", $element, 0, count($element), 0, false, true, true, true); @endphp @endif
@php $value = str_replace('"', '"', ($object != NULL ? $object->video : '')); echo $form->insertTextInputField("", "video", $value, "URL", "#555", false, 0, 0, 255, false, false, "col-sm-12 nopadding_left_right"); @endphp
@php echo $form->insertTextInputField("", "video_width", $video_width, "W", "#555", false, 1, 0, 4, false, false, "col-sm-12 nopadding_left_right"); @endphp
@php echo $form->insertTextInputField("", "video_height", $video_height, "H", "#555", false, 1, 0, 4, false, false, "col-sm-12 nopadding_left_right"); @endphp
@php $form->setUseArray(true); @endphp @if(!empty($object) && count($object->button) > 0) @for($i = 0; $i < count($object->button); $i++) @include('admin.page.contenuti.include.button', array('button' => $object->button[$i], 'index' => $i)) @endfor @endif @php $form->setUseArray(false); @endphp
{!!$form->insertFileUpload('Gallery', 'gallery', 10, false, $gallery, asset('img/block/gallery')."/", 0, "
W: 1200", "
jpg, jpeg, gif, png", -1, -1, true, "")!!}
@php $element = array(); $obj = (object)[]; $obj->checked = ($object == NULL || ($object != NULL && $object->status == 1)); $obj->value = 1; $obj->text = "Selezione per abilitare la visualizzazione del contenuto"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "status", $element, 0, count($element), 0, false, true, true, true); @endphp
@stop