Commit 3f8fe8ec by Francisco Salazar

ocultar objetos

parent ba9fd6e3
......@@ -5,6 +5,7 @@ return [
"slug-shop-category" => "categoria",
"tags-enable" => true,
"subcategory-enable" => true,
"version-minimal" => true,
"product-index" => [
"pagination" => 15,
"otros" => 3
......
......@@ -5,7 +5,15 @@
{!! Form::text('name', null, ["class"=>"form-control", "required"=>"required", "id"=>"first"]) !!}
</div>
</div>
<div class='col-md-6'>
<div class="form-group" >
{!! Form::label('active', 'Estado', ['class'=>'control-label'])!!}
{!! Form::select('active', [true=>'Activo', false=>'Inactivo'], null, ["class"=>"form-control", "required"=>"required"]) !!}
</div>
</div>
</div>
<div class='row {{config("shop.version-minimal") == false ? "" : "hide"}}' >
<div class="col-md-6">
<div class="form-group">
{!! Form::label('slug', 'URL Slug', ['class'=>'control-label'])!!}
......@@ -13,19 +21,8 @@
</div>
</div>
</div>
<div class='row'>
<div class='col-md-6'>
<div class="form-group" >
{!! Form::label('active', 'Estado', ['class'=>'control-label'])!!}
{!! Form::select('active', [true=>'Activo', false=>'Inactivo'], null, ["class"=>"form-control", "required"=>"required"]) !!}
</div>
</div>
<div class='col-md-6'>
<div class="form-group" >
{!! Form::label('publication_date', 'Fecha de publicación', ['class'=>'control-label'])!!}
{!! Form::text('publication_date', isset($product) ? null: date('Y-m-d'), ["class"=>"form-control", "required"=>"required", "id"=>"publication_date"]) !!}
</div>
......@@ -122,12 +119,13 @@
@endif
</div>
@if(config("shop.version-minimal") == false)
<div class="row">
<div class="col-md-6">
{!! Form::label('description', 'Descripción', ['class'=>'control-label'])!!}
{!! Form::textarea('description', null, ["class"=>"form-control", "required"=>"required", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
</div>
<div class="col-md-6">
{!! Form::label('features', 'Características', ['class'=>'control-label'])!!}
{!! Form::textarea('features', null, ["class"=>"form-control", "required"=>"required", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
......@@ -140,5 +138,14 @@
{!! Form::textarea('specifications', null, ["class"=>"form-control", "required"=>"required", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
</div>
</div>
@else
<div class="row">
<div class="col-md-12">
{!! Form::label('description', 'Descripción', ['class'=>'control-label'])!!}
{!! Form::textarea('description', null, ["class"=>"form-control", "required"=>"required", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
</div>
</div>
@endif
<div class="row">
<div class="col-md-6">
<div class="form-group">
{!! Form::label('purchase_price', 'Precio de compra', ['class'=>'control-label'])!!}
<div class="input-group">
<div class="input-group-addon">$</div>
{!! Form::text('purchase_price', null, ["class"=>"form-control", "required"=>"required"]) !!}
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{!! Form::label('sale_price', 'Precio de venta', ['class'=>'control-label'])!!}
......@@ -17,10 +9,6 @@
</div>
</div>
</div>
</div>
<div class='row'>
<div class='col-md-6'>
<div class="form-group" >
{!! Form::label('quantity', 'Cantidad', ['class'=>'control-label'])!!}
......@@ -30,12 +18,25 @@
</div>
</div>
</div>
</div>
<div class='row {{(config("shop.version-minimal") == false) ? "" : "hide"}}'>
<div class="col-md-6">
<div class="form-group">
{!! Form::label('purchase_price', 'Precio de compra', ['class'=>'control-label'])!!}
<div class="input-group">
<div class="input-group-addon">$</div>
{!! Form::text('purchase_price', 0, ["class"=>"form-control", "required"=>"required"]) !!}
</div>
</div>
</div>
<div class='col-md-6'>
<div class="form-group" >
{!! Form::label('reserve_amount', 'Cantidad de reserva', ['class'=>'control-label'])!!}
<div class="input-group">
<div class="input-group-addon"><i class="fa fa-shopping-cart" aria-hidden="true"></i></div>
{!! Form::text('reserve_amount', null, ["class"=>"form-control", "required"=>"required"]) !!}
{!! Form::text('reserve_amount', 0, ["class"=>"form-control", "required"=>"required"]) !!}
</div>
</div>
</div>
......@@ -44,7 +45,7 @@
<div class="row">
<div class="col-md-6">
{!! Form::label('unity', 'Unidad', ['class'=>'control-label'])!!}
{!! Form::select('unity', ['Pieza'=>'Pieza', 'Kilogramo'=>'Kilogramo','Metro'=>'Metro', 'Litro'=>'Litro', 'Gramo'=>'Gramo'],null, ["class"=>"form-control", "required"=>"required"]) !!}
{!! Form::select('unity', ['Pieza'=>'Pieza', 'm2'=>'m2', 'Kilogramo'=>'Kilogramo','Metro'=>'Metro', 'Litro'=>'Litro', 'Gramo'=>'Gramo', ],null, ["class"=>"form-control", "required"=>"required"]) !!}
</div>
</div>
......
......@@ -32,8 +32,10 @@
<th>#</th>
<th>Producto</th>
<th>Descripción</th>
@if(config("shop.version-minimal") == false)
<th>Características</th>
<th>Especificaciones</th>
@endif
<th></th>
</tr>
</thead>
......@@ -56,8 +58,10 @@
{data: 'id', name: 'id'},
{data: 'main', name: 'main'},
{data: 'description', name: 'description'},
@if(config("shop.version-minimal") == false)
{data: 'features', name: 'features'},
{data: 'specifications', name: 'specifications'},
@endif
{data: 'form', name: 'form'},
]
});
......
......@@ -20,11 +20,11 @@
</div>
<div class="form-group">
{!! Form::label('related_subcategories', '¿De cual(es) subcategorías seran los productos relacionados de esta subcategoría?') !!}
{!! Form::label('related_subcategories', '¿De cuáles subcategorías serán los productos relacionados?') !!}
</div>
<div class="row">
@foreach($related_subcategories as $index => $value)
<div class="col-md-2">
<div class="col-md-3">
{!! Form::checkbox('related_subcategories[]', $index, in_array($index,isset($subcategory->related_products) ? $subcategory->related_products->pluck("id")->toArray() : []) ? true : false) !!} {{$value}}
</div>
@endforeach
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment