@extends('layouts.dashboard') @section('content') .row .col-md-8 .box .box-header.dark %h2 Actualizar información .box-body {!! Form::model($product,['route'=> ['product.update',$product->id],"method"=>"PUT", 'enctype'=>'multipart/form-data']) !!} @include('dashboard.products.fields') .dker.p-a.text-right .btn-group {!! Form::submit('Actualizar información', ['class'=>'btn dark']) !!} {!! Form::close() !!} {{ Form::open(['route'=> ['product.destroy',$product->id],'method'=>'DELETE']) }} {!! Form::submit('Eliminar', ['class'=>'btn danger', 'onclick'=> 'return confirm("¿Estas seguro de eliminar este producto?");']) !!} {{ Form::close() }} .col-md-4 .box .box-header.dark %h3 %a{"data-toggle"=>"collapse", "href"=>"#xxx", "aria-expanded"=>"false"} Galeria de imagénes #xxx.box-body.collapse {!! Form::open(['route'=> ['image.product',$product->id],'method'=>'POST', 'enctype'=>'multipart/form-data']) !!} .row .col-md-12 {!! Form::file('image', null, ["class"=>"form-control", "required"=>"required"]) !!} - if ($errors->has('image')) %span.help-block %strong {{ $errors->first('image') }} .row .col-md-12 {!! Form::submit('Subir', ['class'=>'btn btn-block accent']) !!} %br %br {!! Form::close() !!} .row .col-md-12 - if ($product->images()->count() > 0) @foreach($product->images as $image) %img.img-thumbnail.img-responsive{:src=>"{{asset('storage/'.$image->link)}}", :style=>"height:200px;"} {{ Form::open(['route'=> ['image.destroy',$image->id],'method'=>'DELETE']) }} {!! Form::submit('Eliminar', ['class'=>'btn danger btn-block', 'onclick'=> 'return confirm("¿Estas seguro de eliminar esta imagen?");']) !!} {{ Form::close() }} %br @endforeach - else %h3 No se han cargado imagénes .box .box-header.dark %h3 %a{"data-toggle"=>"collapse", "href"=>"#aditional", "aria-expanded"=>"false"} Información adicional #aditional.collapse.box-body {!! Form::open(['route'=> ['aditional.product',$product->id],'method'=>'POST']) !!} .row .col-md-12 {!! Form::label('link', 'Enlace del recurso') !!} {!! Form::text('link', null, ["class"=>"form-control", "required"=>"required"]) !!} - if ($errors->has('link')) %span.help-block %strong {{ $errors->first('link') }} .row .col-md-12 {!! Form::label('type', 'Tipo de recurso') !!} {!! Form::select('type', ['manual'=>'Manual de instalación', 'video'=>'Video tutorial', 'ficha'=>'Ficha técnica', 'marcas'=>'Marcas compatibles'], null, ["class"=>"form-control", "required"=>"required"]) !!} - if ($errors->has('type')) %span.help-block %strong {{ $errors->first('type') }} %br .row .col-md-12 {!! Form::submit('Subir', ['class'=>'btn btn-block accent']) !!} {!! Form::close() !!} %br %br .row .col-md-12 .table-responsive %table.table.table-hover %tr %th Detalles - if ($product->aditionals()->count() > 0) @foreach($product->aditionals as $aditional) %tr %td %p = $aditional->type %p = $aditional->link %p {{ Form::open(['route'=> ['aditional.destroy',$aditional->id],'method'=>'DELETE']) }} {!! Form::submit('Eliminar', ['class'=>'btn danger btn-block', 'onclick'=> 'return confirm("¿Estas seguro de eliminar esto ?");']) !!} {{ Form::close() }} @endforeach - else %h3 Sin información adicional @endsection @section('script_extras') %script{:src => "https://cdn.ckeditor.com/4.8.0/standard/ckeditor.js"} :javascript CKEDITOR.replace('specifications'); CKEDITOR.replace('aspects'); @endsection