Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
d0884ea0
Commit
d0884ea0
authored
Oct 22, 2021
by
Gabriel-31415
Browse files
new view of naturezas
parent
b638aa88
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/Area.php
View file @
d0884ea0
...
...
@@ -40,4 +40,8 @@ class Area extends Model
public
function
grandeArea
()
{
return
$this
->
belongsTo
(
'App\GrandeArea'
,
'grande_area_id'
);
}
public
function
subAreas
()
{
return
$this
->
hasMany
(
'App\SubArea'
);
}
}
resources/views/naturezas/grandeArea/collapse-area.blade.php
0 → 100644
View file @
d0884ea0
<div
id=
"accordion2"
>
@foreach ($grandeArea->areas as $area)
<h5
class=
"mb-0 ml-2"
>
<button
class=
"btn btn-link mb-0"
data-toggle=
"collapse"
data-target=
"#collapse{{ $area->id }}"
aria-expanded=
"true"
aria-controls=
"collapseOne"
>
<i
class=
"fas fa-sort-down fa-1x"
></i>
{{ $area->nome }}
</button>
</h5>
<div
id=
"collapse{{ $area->id }}"
class=
"collapse"
aria-labelledby=
"headingOne"
data-parent=
"#accordion2"
>
@include('naturezas.grandeArea.collapse-sub-area')
</div>
@endforeach
</div>
\ No newline at end of file
resources/views/naturezas/grandeArea/collapse-grande-area.blade.php
0 → 100644
View file @
d0884ea0
<div
id=
"accordion1"
>
<div
class=
"card"
>
<div
class=
"row"
>
<div
class=
"col-11 "
>
<h2
class=
"m-2"
>
Grande Áreas
</h2>
</div>
<div
class=
"col-1 text-center"
>
<a
href=
"{{route('grandearea.criar')}}"
>
<i
class=
"fas fa-plus-circle fa-2x m-2"
style=
"color: green"
></i>
</a>
</div>
</div>
</div>
@foreach ($grandesAreas as $grandeArea)
{{-- @dd($grandeArea->areas) --}}
<div
class=
"card"
>
<h5
class=
"mb-0"
>
<div
class=
"row"
>
<div
class=
"col-11"
>
<button
class=
"btn btn-link"
data-toggle=
"collapse"
data-target=
"#collapse{{ $grandeArea->id }}"
aria-expanded=
"true"
aria-controls=
"collapseOne"
>
<i
class=
"fas fa-sort-down fa-1x"
></i>
{{ $grandeArea->nome }}
</button>
</div>
<div
class=
"col-1 text-center"
>
<div
class=
" dropright mt-2 "
>
<a
id=
"options"
class=
"dropdown-toggle "
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
{{--
<i
class=
"fas fa-cogs"
></i>
--}}
<i
class=
"fas fa-cog"
></i>
</a>
<div
class=
"dropdown-menu"
>
<a
href=
"{{ route('grandearea.show', ['id' => $grandeArea->id ]) }}"
class=
"dropdown-item text-center"
>
Detalhes
</a>
<hr
class=
"dropdown-hr"
>
<a
href=
"{{ route('grandearea.editar', ['id' => $grandeArea->id]) }}"
class=
"dropdown-item text-center"
>
Editar
</a>
<hr
class=
"dropdown-hr"
>
<form
method=
"POST"
action=
"{{ route('grandearea.deletar', ['id' => $grandeArea->id]) }}"
>
{{ csrf_field() }}
<button
type=
"submit"
class=
"dropdown-item dropdown-item-delete text-center"
>
<img
src=
"{{asset('img/icons/logo_lixeira.png')}}"
alt=
""
>
Deletar
</button>
</form>
</div>
</div>
</div>
</div>
</h5>
<div
id=
"collapse{{ $grandeArea->id }}"
class=
"collapse ml-3"
aria-labelledby=
"headingOne"
data-parent=
"#accordion1"
>
@include('naturezas.grandeArea.collapse-area')
</div>
</div>
@endforeach
</div>
\ No newline at end of file
resources/views/naturezas/grandeArea/collapse-sub-area.blade.php
0 → 100644
View file @
d0884ea0
<div
id=
"accordion3"
>
@forelse ($area->subAreas as $subArea)
<div
class=
"mt-0 ml-5"
>
{{ $subArea->nome }}
</div>
@empty
<div
class=
"mt-0 ml-5"
>
Não há sub-áreas
</div>
@endforelse
</div>
\ No newline at end of file
resources/views/naturezas/grandeArea/index.blade.php
View file @
d0884ea0
...
...
@@ -18,15 +18,24 @@
Voltar
</
a
>
</
div
>
<
div
class
=
"col-sm-9"
style
=
"text-align: center;"
>
{{
--
<
div
class
=
"col-sm-9"
style
=
"text-align: center;"
>
<
h2
class
=
"titulo-table"
>
{{
__
(
'Grandes áreas'
)
}}
</
h2
>
</
div
>
<
div
class
=
"col-sm-2"
>
<
a
href
=
"
{
{route('grandearea.criar')}
}
"
class
=
"btn btn-info"
style
=
"float: right;"
>
{{
__
(
'Criar grande área'
)
}}
</
a
>
</
div
>
</
div
>
--
}}
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
div
class
=
"row"
>
<
div
class
=
"col"
>
@
include
(
'naturezas.grandeArea.collapse-grande-area'
)
</
div
>
</
div
>
{{
--
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
</
th
>
...
...
@@ -68,7 +77,7 @@
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
table
>
--
}}
</
div
>
@
endsection
\ No newline at end of file
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