Rename Admin views directory, add some functions on models
This commit is contained in:
28
resources/views/Admin/Shop/Unities/create.blade.php
Normal file
28
resources/views/Admin/Shop/Unities/create.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('unities.title'),
|
||||
'subtitle' => __('unities.create.title'),
|
||||
'breadcrumb' => [__('unities.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Shop.Unities.store', 'id' => 'unity-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Admin.Shop.Unities.index") }}" class="btn btn-default">
|
||||
{{ __('unities.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Admin.Shop.Unities.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
14
resources/views/Admin/Shop/Unities/edit.blade.php
Normal file
14
resources/views/Admin/Shop/Unities/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Unités',
|
||||
'subtitle' => 'Edition d\'une unité',
|
||||
'breadcrumb' => ['Unités']
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Shop.Unities.store', 'id' => 'unity-form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $unity['id'] ?? null }}">
|
||||
@include('Admin.Shop.Unities.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
14
resources/views/Admin/Shop/Unities/form.blade.php
Normal file
14
resources/views/Admin/Shop/Unities/form.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'value', 'value' => $unity['value'] ?? null, 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="float-right mt-3">
|
||||
@include('components.button-save')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
48
resources/views/Admin/Shop/Unities/index.blade.php
Normal file
48
resources/views/Admin/Shop/Unities/index.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.unities.title'),
|
||||
'subtitle' => __('Shop.unities.list'),
|
||||
'breadcrumb' => [__('Shop.unities.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.select2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<nav>
|
||||
<div class="nav nav-tabs">
|
||||
<a href="#families" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="families" aria-selected="true">
|
||||
{{ __('Shop.unities.title') }}
|
||||
</a>
|
||||
<a href="#values" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="values" aria-selected="false">
|
||||
{{ __('Shop.unities.title') }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content mb-0">
|
||||
|
||||
<div class="tab-pane fade" id="families">
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Admin.Shop.Unities.index'), 'model' => 'ArticleAttributefamilies'])
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="values">
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Admin.Shop.ArticleAttributeValues.index'), 'model' => 'Unities', 'with_filters' => true])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Admin.Shop.Unities.partials.filters')
|
||||
@endcomponent
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('components.js.datatable', ['route' => route('Admin.Shop.Unities.index'), 'model' => 'Unities'])
|
||||
@endpush
|
||||
16
resources/views/Admin/Shop/Unities/list.blade.php
Normal file
16
resources/views/Admin/Shop/Unities/list.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.unities.title'),
|
||||
'subtitle' => __('Shop.unities.list'),
|
||||
'breadcrumb' => [__('Shop.unities.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Admin.Shop.Unities.index'), 'model' => 'unities','with_filters' => true])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-unities-filters'])
|
||||
@include('Admin.Shop.Unities.partials.filters')
|
||||
@endcomponent
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,14 @@
|
||||
<form id="unities-filters">
|
||||
<div class="row">
|
||||
<label class="col-4">Familles d'articles</label>
|
||||
<div class="col-8">
|
||||
@include('components.select', ['name' => 'family_id', 'list' => (isset($families)) ? $families : [], 'value' => (isset($filters['family_id'])) ? $filters['family_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<label class="col-4">Packages</label>
|
||||
<div class="col-8">
|
||||
@include('components.select', ['name' => 'package_id', 'list' => (isset($packages)) ? $packages : [], 'value' => (isset($filters['package_id'])) ? $filters['package_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
36
resources/views/Admin/Shop/Unities/show.blade.php
Normal file
36
resources/views/Admin/Shop/Unities/show.blade.php
Normal file
@@ -0,0 +1,36 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('products.title'),
|
||||
'subtitle' => __('products.title'),
|
||||
'breadcrumb' => [__('products.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('Shop.Products') }}" method="GET">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-offset-2 col-md-8">
|
||||
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
<div class="col-md-6">
|
||||
<h3>{{ name }}</h3>
|
||||
<h4>
|
||||
{{ $product.section.name }}<br>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<h2>{{ $prix_total }} €</h2>
|
||||
<h4>{{ $residence['type_produit']['name'] }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
@include('Hestimmo.modules.Lot.partials.carousel')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user