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
b6bf0069
Commit
b6bf0069
authored
Oct 21, 2022
by
unknown
Browse files
Permitir que o ADM adicione novas ODS's
parent
fbeda595
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/GrandeAreaController.php
View file @
b6bf0069
...
...
@@ -6,6 +6,7 @@ use App\AreaTematica;
use
Illuminate\Http\Request
;
use
App\GrandeArea
;
use
App\Area
;
use
App\ObjetivoDeDesenvolvimentoSustentavel
;
class
GrandeAreaController
extends
Controller
{
...
...
@@ -18,7 +19,8 @@ class GrandeAreaController extends Controller
{
$grandesAreas
=
GrandeArea
::
orderBy
(
'nome'
)
->
get
();
$areasTematicas
=
AreaTematica
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'naturezas.grandeArea.index'
)
->
with
([
'grandesAreas'
=>
$grandesAreas
,
'areasTematicas'
=>
$areasTematicas
]);
$ODSs
=
ObjetivoDeDesenvolvimentoSustentavel
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'naturezas.grandeArea.index'
)
->
with
([
'grandesAreas'
=>
$grandesAreas
,
'areasTematicas'
=>
$areasTematicas
,
'odss'
=>
$ODSs
]);
}
/**
...
...
resources/views/naturezas/grandeArea/collapse-grande-area.blade.php
View file @
b6bf0069
...
...
@@ -79,6 +79,8 @@
@endforeach
</div>
<div
id=
"accordion2"
>
<div
class=
"card"
>
<div
class=
"row"
>
...
...
@@ -148,4 +150,76 @@
</div>
</div>
@endforeach
</div>
<div
id=
"accordion3"
>
<div
class=
"card"
>
<div
class=
"row"
>
<div
class=
"col-11 "
>
<h2
class=
"m-2"
>
ODS(Objetivos de Desenvolvimento Sustentável)
</h2>
</div>
<div
class=
"col-1 text-center"
>
<a
href=
"{{route('objetivoDeDenvolvimentoSustentavel.criar')}}"
>
<i
class=
"fas fa-plus-circle fa-2x m-2"
style=
"color: green"
></i>
</a>
</div>
</div>
</div>
@foreach ($odss as $ods)
<div
class=
"card"
>
<h5
class=
"mb-0"
>
<div
class=
"row"
>
<div
class=
"col-11"
>
<button
class=
"btn btn-link font-size-naturezas"
aria-expanded=
"true"
>
{{ $ods->nome }}
</button>
</div>
<div
class=
"col-1 text-center"
>
<div
class=
" dropright mt-2 text-center"
>
<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 fa-1x"
></i>
</a>
<div
class=
"dropdown-menu"
>
<a
href=
"{{ route('objetivoDeDenvolvimentoSustentavel.edit', ['id' => $ods->id]) }}"
class=
"dropdown-item text-center"
>
Editar
</a>
<hr
class=
"dropdown-hr"
>
<button
data-toggle=
"modal"
data-target=
"#removerODS{{ $ods->id }}"
class=
"dropdown-item dropdown-item-delete text-center"
>
<img
src=
"{{asset('img/icons/logo_lixeira.png')}}"
alt=
""
>
Deletar
</button>
</div>
</div>
</div>
</div>
</h5>
</div>
<!-- Modal Remover -->
<div
class=
"modal fade"
id=
"removerODS{{ $ods->id }}"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-lg"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Remover ODS
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
<p>
Você tem certeza que deseja remover a ODS: {{ $ods->nome }}?
</p>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
Cancelar
</button>
<form
method=
"POST"
action=
"{{ route('objetivoDeDenvolvimentoSustentavel.deletar', ['id' => $ods->id]) }}"
>
@csrf
<button
type=
"submit"
class=
"btn btn-danger"
>
Remover
</button>
</form>
</div>
</div>
</div>
</div>
@endforeach
</div>
\ 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