Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-product
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Angel Martin
onestartup-product
Commits
8c5fac2e
Commit
8c5fac2e
authored
6 years ago
by
Francisco Salazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocultar secciones
parent
8f7ea1b9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
product.php
src/config/product.php
+10
-0
index.blade.php
src/views/category/index.blade.php
+6
-0
fields.blade.php
src/views/product/fields.blade.php
+8
-2
No files found.
src/config/product.php
View file @
8c5fac2e
...
@@ -20,4 +20,13 @@ return [
...
@@ -20,4 +20,13 @@ return [
"pagination"
=>
15
,
"pagination"
=>
15
,
"otros"
=>
6
"otros"
=>
6
],
],
//Show elements
"show-form"
=>
[
"subcategory"
=>
true
,
"description"
=>
true
,
"features"
=>
true
,
"specifications"
=>
true
,
"gallery"
=>
true
],
];
];
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/views/category/index.blade.php
View file @
8c5fac2e
...
@@ -58,7 +58,9 @@
...
@@ -58,7 +58,9 @@
<th>Categoría</th>
<th>Categoría</th>
<th>Descripción</th>
<th>Descripción</th>
<th>Productos</th>
<th>Productos</th>
@if(config('product.show-form.subcategory'))
<th>Subcategorias</th>
<th>Subcategorias</th>
@endif
<th></th>
<th></th>
</tr>
</tr>
@foreach (
$categories
as
$category
)
@foreach (
$categories
as
$category
)
...
@@ -73,12 +75,16 @@
...
@@ -73,12 +75,16 @@
</td>
</td>
<td>
{
{$category->description}
}
</td>
<td>
{
{$category->description}
}
</td>
<td class="
text
-
center
">
{
{$category->products->count()}
}
</td>
<td class="
text
-
center
">
{
{$category->products->count()}
}
</td>
@if(config('product.show-form.subcategory'))
<td class="
text
-
center
">
{
{$category->subcategories->count()}
}
</td>
<td class="
text
-
center
">
{
{$category->subcategories->count()}
}
</td>
@endif
<td class="
text
-
center
">
<td class="
text
-
center
">
@if(config('product.show-form.subcategory'))
<a class='btn btn-xs btn-success button-mb' href="
{{
route
(
'admin.product.subcategory.index'
,
$category
->
id
)}}
">
<a class='btn btn-xs btn-success button-mb' href="
{{
route
(
'admin.product.subcategory.index'
,
$category
->
id
)}}
">
<i class='fas fa-plus icon-special-size'></i>
<i class='fas fa-plus icon-special-size'></i>
Subcategorías
Subcategorías
</a>
</a>
@endif
{!! Form::open(['route'=> ['admin.product.category.destroy',
$category->id
],'method'=>'DELETE'])!!}
{!! Form::open(['route'=> ['admin.product.category.destroy',
$category->id
],'method'=>'DELETE'])!!}
<button class='btn btn-danger btn-xs button-mb' onclick="
return
confirm
(
'¿Estás seguro de eliminar este elemento?'
);
" type='submit'>
<button class='btn btn-danger btn-xs button-mb' onclick="
return
confirm
(
'¿Estás seguro de eliminar este elemento?'
);
" type='submit'>
<i class='fas fa-trash-alt icon-special-size'></i>
<i class='fas fa-trash-alt icon-special-size'></i>
...
...
This diff is collapsed.
Click to expand it.
src/views/product/fields.blade.php
View file @
8c5fac2e
...
@@ -37,14 +37,14 @@
...
@@ -37,14 +37,14 @@
{!! Form::text('publication_date', null, ["class"=>"form-control", "required"=>"required", "id"=>"publication_date"]) !!}
{!! Form::text('publication_date', null, ["class"=>"form-control", "required"=>"required", "id"=>"publication_date"]) !!}
</div>
</div>
</div>
</div>
@if(config('product.show-form.subcategory'))
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
{!! Form::label('subcategory_id', 'Subcategoría', ['class'=>'control-label'])!!}
{!! Form::label('subcategory_id', 'Subcategoría', ['class'=>'control-label'])!!}
{!! Form::select('subcategory_id', $subcategories, null, ["class"=>"form-control", "placeholder"=>"Selecciona una subcategoría"]) !!}
{!! Form::select('subcategory_id', $subcategories, null, ["class"=>"form-control", "placeholder"=>"Selecciona una subcategoría"]) !!}
</div>
</div>
</div>
</div>
@endif
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
...
@@ -172,21 +172,27 @@
...
@@ -172,21 +172,27 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
@if(config('product.show-form.description'))
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
{!! Form::label('description', 'Detalles', ['class'=>'control-label'])!!}
{!! Form::label('description', 'Detalles', ['class'=>'control-label'])!!}
{!! Form::textarea('description', null, ["class"=>"form-control", "required"=>"required", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
{!! Form::textarea('description', null, ["class"=>"form-control", "required"=>"required", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
</div>
</div>
@endif
@if(config('product.show-form.features'))
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
{!! Form::label('features', 'Características', ['class'=>'control-label'])!!}
{!! Form::label('features', 'Características', ['class'=>'control-label'])!!}
{!! Form::textarea('features', null, ["class"=>"form-control", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
{!! Form::textarea('features', null, ["class"=>"form-control", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
</div>
</div>
@endif
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
@if(config('product.show-form.specifications'))
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
{!! Form::label('specifications', 'Información adicional', ['class'=>'control-label'])!!}
{!! Form::label('specifications', 'Información adicional', ['class'=>'control-label'])!!}
{!! Form::textarea('specifications', null, ["class"=>"form-control", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
{!! Form::textarea('specifications', null, ["class"=>"form-control", 'id'=>'body', 'rows'=>"30", 'cols'=>"80"]) !!}
</div>
</div>
@endif
</div>
</div>
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment