Rename Admin views directory, add some functions on models
This commit is contained in:
13
resources/views/Admin/Botanic/Species/create.blade.php
Normal file
13
resources/views/Admin/Botanic/Species/create.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Botanic.species.title'),
|
||||
'subtitle' => __('Botanic.species.add'),
|
||||
'breadcrumb' => [__('Botanic.species.title'), __('Botanic.species.add')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Botanic.Species.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
@include('Admin.Botanic.Species.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
14
resources/views/Admin/Botanic/Species/edit.blade.php
Normal file
14
resources/views/Admin/Botanic/Species/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Botanic.species.title'),
|
||||
'subtitle' => __('Botanic.species.edit'),
|
||||
'breadcrumb' => [__('Botanic.species.title'), __('Botanic.species.list')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Botanic.Species.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
<input type="hidden" name="id" value="{{ $specie['id'] }}">
|
||||
@include('Admin.Botanic.Species.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
56
resources/views/Admin/Botanic/Species/form.blade.php
Normal file
56
resources/views/Admin/Botanic/Species/form.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@include('boilerplate::load.fileinput')
|
||||
@include('boilerplate::load.select2')
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8">
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'name', 'value' => $specie['name'] ?? null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('latin', 'Nom latin') }}
|
||||
@include('components.input', ['name' => 'latin', 'value' => $specie['latin'] ?? null, 'required' => false])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
{{ Form::label('genre', 'Genre') }}
|
||||
@include('components.select', ['name' => 'genre_id', 'list' => $genres, 'value' => $specie['genre_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => false])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('alias', 'Alias') }}
|
||||
@include('components.input', ['name' => 'alias', 'value' => $specie['alias'] ?? null])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('description', 'Description') }}
|
||||
@include('components.textarea', ['name' => 'description', 'value' => $specie['description'] ?? null, 'class' => 'editor', 'required' => false])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ Form::label('photo', 'Photos') }}
|
||||
@include('components.file', ['name' => 'name', 'value' => $specie['name'] ?? null])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('components.save')
|
||||
|
||||
@include('load.form.upload.fileinput')
|
||||
@include('load.form.select2')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
initSelect2();
|
||||
initEditor();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
12
resources/views/Admin/Botanic/Species/list.blade.php
Normal file
12
resources/views/Admin/Botanic/Species/list.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Botanic.species.title'),
|
||||
'subtitle' => __('Botanic.species.list'),
|
||||
'breadcrumb' => [__('Botanic.species.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Admin.Botanic.Species.index'), 'model' => 'species'])
|
||||
@endcomponent
|
||||
@endsection
|
||||
|
||||
30
resources/views/Admin/Botanic/Species/show.blade.php
Normal file
30
resources/views/Admin/Botanic/Species/show.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('products.title'),
|
||||
'subtitle' => __('products.title'),
|
||||
'breadcrumb' => [__('products.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
<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-12">
|
||||
@include('components.carousel')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user