Mejora de productos
This commit is contained in:
@ -16,15 +16,15 @@
|
||||
<div class="fields">
|
||||
<div class="field">
|
||||
<label>Dirección</label>
|
||||
<input type="text" name="direccion" value="{{$producto->direccion ?? ''}}" />
|
||||
<input type="text" name="direccion" value="{{$producto->direccion->calle ?? ''}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Comuna</label>
|
||||
<input type="text" name="comuna" value="{{$producto->comuna ?? ''}}" />
|
||||
<input type="text" name="comuna" value="{{$producto->direccion->comuna ?? ''}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Ciudad</label>
|
||||
<input type="text" name="ciudad" value="{{$producto->ciudad ?? ''}}" />
|
||||
<input type="text" name="ciudad" value="{{$producto->direccion->ciudad ?? ''}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -105,11 +105,11 @@
|
||||
<div class="fields">
|
||||
<div class="field">
|
||||
<label>Tamaño Mínimo</label>
|
||||
<input type="text" name="tamaño_min" value="{{(isset($producto->tamaño)) ? explode(' - ', rtrim($producto->tamaño, ' m²'))[0] : ''}}" />
|
||||
<input type="text" name="tamaño_min" value="{{(property_exists($producto, 'tamaños')) ? explode(' - ', rtrim($producto->tamaños, ' m²'))[0] : ''}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Tamaño Máximo</label>
|
||||
<input type="text" name="tamaño_max" value="{{(isset($producto->tamaño)) ? explode(' - ', rtrim($producto->tamaño, ' m²'))[1] : ''}}" />
|
||||
<input type="text" name="tamaño_max" value="{{(property_exists($producto, 'tamaños')) ? explode(' - ', rtrim($producto->tamaños, ' m²'))[1] : ''}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -144,7 +144,7 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
*/?>
|
||||
*/?>
|
||||
</div>
|
||||
<br />
|
||||
<button class="ui button">GUARDAR</button>
|
||||
@ -208,7 +208,7 @@
|
||||
var entrega = new Date('{{str_pad(implode('-', array_reverse(explode('/', $producto->entrega))), 7, '20', STR_PAD_LEFT)}}-01T01:00')
|
||||
$('.calendar').calendar('set date', entrega)
|
||||
$('.checkbox').checkbox()
|
||||
@if ($producto->destacado)
|
||||
@if ($producto->destacado())
|
||||
$('.checkbox').checkbox('set checked')
|
||||
@endif
|
||||
$("input[name='imagen']").change(function() {
|
||||
@ -228,7 +228,7 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
@foreach ($producto->images as $image)
|
||||
@foreach ($producto->imagenes() as $image)
|
||||
listImage('{{$image}}')
|
||||
@endforeach
|
||||
$("input[name='video']").change(function() {
|
||||
|
@ -22,19 +22,19 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($productos as $i => $producto)
|
||||
@foreach ($productos as $producto)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{$urls->admin}}/producto/{{$i}}">
|
||||
<a href="{{$urls->admin}}/producto/{{$producto->id}}">
|
||||
{{$producto->nombre}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="center aligned">
|
||||
<a href="{{$urls->admin}}/producto/{{$i}}">
|
||||
<a href="{{$urls->admin}}/producto/{{$producto->id}}">
|
||||
<i class="edit icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="center aligned"><i class="trash alternate outline icon" data-id="{{$i}}"></i></td>
|
||||
<td class="center aligned"><i class="trash alternate outline icon" data-id="{{$producto->id}}"></i></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@ -89,7 +89,7 @@
|
||||
$('<div></div>').attr('class', 'value').html(data.valor)
|
||||
)
|
||||
)
|
||||
div.find('.header').popup(9)
|
||||
div.find('.header').popup()
|
||||
$(indicadores.id).find('.slideshow').append(div)
|
||||
},
|
||||
setup: () => {
|
||||
|
@ -7,19 +7,19 @@
|
||||
{{$producto->segmento}}
|
||||
</div>
|
||||
<div class="descripcion">
|
||||
{{$producto->comuna}}
|
||||
{{$producto->direccion->comuna}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium image">
|
||||
@if ($producto->destacado)
|
||||
@if ($producto->destacado())
|
||||
<div class="overlay">Destacado</div>
|
||||
@endif
|
||||
<img src="{{$urls->images}}/{{$producto->imagen}}" />
|
||||
<img src="{{$urls->images}}/{{$producto->imagen()}}" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="ui basic segment">
|
||||
<span class="right floated">
|
||||
{{$producto->valor}} UF
|
||||
{{$producto->valor()}} UF
|
||||
</span>
|
||||
Valor depto
|
||||
</div>
|
||||
|
@ -55,6 +55,10 @@
|
||||
$(".tab[data-tab='" + segmento + "']").find('.grid').append(
|
||||
$('<div></div>').attr('class', 'ui active centered inline loader')
|
||||
)
|
||||
if (data.productos.length == 0) {
|
||||
$(".tab[data-tab='" + segmento + "']").find('.grid').html('No hay productos en este segmento.')
|
||||
return
|
||||
}
|
||||
$.each(data.productos, (i, el) => {
|
||||
getProducto(segmento, el)
|
||||
})
|
||||
|
@ -15,7 +15,7 @@
|
||||
Precio:
|
||||
</div>
|
||||
<div class="column">
|
||||
{{$producto->valor ?? ''}} UF
|
||||
{{$producto->valor() ?? ''}} UF
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -39,7 +39,11 @@
|
||||
Ubicación:
|
||||
</div>
|
||||
<div class="column">
|
||||
{{$producto->comuna ?? ''}}, {{$producto->ciudad ?? ''}}
|
||||
{{implode(', ', [
|
||||
$producto->direccion->calle,
|
||||
$producto->direccion->comuna ?? '',
|
||||
$producto->direccion->ciudad ?? ''
|
||||
])}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -63,7 +67,7 @@
|
||||
Tamaño
|
||||
</div>
|
||||
<div class="column">
|
||||
{{$producto->tamaño ?? ''}}
|
||||
{{$producto->tamaños ?? ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -75,9 +79,9 @@
|
||||
</div>
|
||||
<div class="ui bottom attached basic segment tab" data-tab="mapa">
|
||||
<div class="ui embed" id="map" data-source="Google Maps"
|
||||
data-url="https://maps.google.com/maps?hl=es&amp;q={{(isset($producto->direccion)) ? str_replace(' ', '%20', implode(', ', [
|
||||
$producto->direccion, $producto->comuna
|
||||
])) : 'Santiago,%20Chile'}}&amp;ie=UTF8&amp;z={{(isset($producto->direccion)) ? 16 : 11}}&amp;iwloc=B&amp;output=embed"></div>
|
||||
data-url="https://maps.google.com/maps?hl=es&amp;q={{($producto->direccion) ? str_replace(' ', '%20', implode(', ', [
|
||||
$producto->direccion->calle, $producto->direccion->comuna
|
||||
])) : 'Santiago,%20Chile'}}&amp;ie=UTF8&amp;z={{($producto->direccion) ? 16 : 11}}&amp;iwloc=B&amp;output=embed"></div>
|
||||
</div>
|
||||
@if (isset($producto->descripcion))
|
||||
<div class="ui bottom attached basic segment tab" data-tab="descripcion">
|
||||
|
@ -1,10 +1,10 @@
|
||||
<div id="galeria">
|
||||
@if (count($producto->images))
|
||||
@if (count($producto->imagenes()))
|
||||
<div class="ui image" data-id="0">
|
||||
<img src="{{$urls->images}}/{{mb_strtolower($producto->nombre)}}/{{$producto->imagen}}" />
|
||||
<img src="{{$urls->images}}/{{mb_strtolower($producto->nombre)}}/{{$producto->imagen()}}" />
|
||||
</div>
|
||||
<div class="ui grid" id="thumbnails">
|
||||
@foreach ($producto->images as $i => $image)
|
||||
@foreach ($producto->imagenes() as $i => $image)
|
||||
@if ($i == 0)
|
||||
@continue
|
||||
@endif
|
||||
@ -21,7 +21,7 @@
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var images = [
|
||||
@foreach ($producto->images as $image)
|
||||
@foreach ($producto->imagenes() as $image)
|
||||
'{{$urls->images}}/{{mb_strtolower($producto->nombre)}}/{{$image}}',
|
||||
@endforeach
|
||||
]
|
||||
|
@ -10,7 +10,7 @@
|
||||
{{$producto->nombre}}
|
||||
</span>
|
||||
<span class="direccion">
|
||||
{{$producto->direccion ?? ''}}, {{$producto->comuna ?? ''}}, {{$producto->ciudad ?? ''}}
|
||||
{{'' . ($producto->direccion ?? '')}}
|
||||
</span>
|
||||
<div class="publicado">
|
||||
Publicado el {{$producto->publicacion ?? ''}}
|
||||
|
Reference in New Issue
Block a user