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
1febc555
Commit
1febc555
authored
May 14, 2021
by
Carlos André
Browse files
ajustes de fluxo
parent
b8e96d8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
1febc555
...
@@ -199,7 +199,7 @@ class EventoController extends Controller
...
@@ -199,7 +199,7 @@ class EventoController extends Controller
// Mail::to($user->email)
// Mail::to($user->email)
// ->send(new EventoCriado($user, $subject));
// ->send(new EventoCriado($user, $subject));
return
redirect
()
->
route
(
'
coord.home'
);
return
redirect
()
->
route
(
'
admin.editais'
)
->
with
([
'mensagem'
=>
'Edital criado com sucesso!'
]
);
}
}
public
function
armazenarAnexosTemp
(
Request
$request
){
public
function
armazenarAnexosTemp
(
Request
$request
){
...
@@ -403,7 +403,8 @@ class EventoController extends Controller
...
@@ -403,7 +403,8 @@ class EventoController extends Controller
$evento
->
update
();
$evento
->
update
();
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'administrador.editais'
,[
'eventos'
=>
$eventos
]);
return
redirect
(
route
(
'admin.editais'
)
)
->
with
([
'mensagem'
=>
'Edital salvo com sucesso!'
,
'eventos'
=>
$eventos
]);
}
}
/**
/**
...
...
app/Http/Controllers/HomeController.php
View file @
1febc555
...
@@ -6,6 +6,7 @@ use Illuminate\Http\Request;
...
@@ -6,6 +6,7 @@ use Illuminate\Http\Request;
use
Auth
;
use
Auth
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Storage
;
use
App\Evento
;
class
HomeController
extends
Controller
class
HomeController
extends
Controller
{
{
...
@@ -28,8 +29,10 @@ class HomeController extends Controller
...
@@ -28,8 +29,10 @@ class HomeController extends Controller
{
{
$eventos
=
\
App\Evento
::
all
();
$eventos
=
\
App\Evento
::
all
();
if
(
Auth
::
user
()
->
administradors
!=
null
){
if
(
Auth
::
user
()
->
administradors
!=
null
){
return
view
(
'administrador.index'
);
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'administrador.editais'
)
->
with
([
'eventos'
=>
$eventos
]);
}
}
else
if
(
Auth
::
user
()
->
AdministradorResponsavel
!=
null
)
{
else
if
(
Auth
::
user
()
->
AdministradorResponsavel
!=
null
)
{
return
view
(
'administradorResponsavel.index'
);
return
view
(
'administradorResponsavel.index'
);
...
...
resources/views/administrador/editais.blade.php
View file @
1febc555
...
@@ -28,88 +28,101 @@
...
@@ -28,88 +28,101 @@
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
hr
>
<
table
class
=
"table table-bordered"
>
@
if
(
session
(
'mensagem'
))
<
thead
>
<
div
class
=
"row"
>
<
tr
>
<
div
class
=
"col-md-12"
style
=
"margin-top: 30px;"
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
div
class
=
"alert alert-success"
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
p
>
{{
session
(
'mensagem'
)}}
</
p
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
div
>
</
tr
>
</
div
>
</
thead
>
</
div
>
<
tbody
id
=
"eventos"
>
@
endif
@
foreach
(
$eventos
as
$evento
)
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
tr
>
<
td
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
{{
$evento
->
nome
}}
<
th
scope
=
"col"
>
Opção
</
th
>
</
a
>
</
td
>
<
td
>
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
created_at
))
}}
</
td
>
<
td
>
@
if
(
auth
()
->
user
()
->
id
==
$evento
->
criador_id
)
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('evento.editar', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item text-center"
>
Editar
Edital
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
a
href
=
"{{route('admin.atribuir', ['evento_id' =>
$evento->id
])}}"
class
=
"dropdown-item text-center"
>
Atribuir
Avaliadores
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
a
href
=
"{{route('admin.pareceres', ['evento_id' =>
$evento->id
])}}"
class
=
"dropdown-item text-center"
>
Visualizar
Pareceres
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
a
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
])}}"
class
=
"dropdown-item text-center"
>
Analisar
projetos
</
a
>
<
hr
class
=
"dropdown-hr"
>
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"dropdown-item dropdown-item-delete text-center"
data
-
toggle
=
"modal"
data
-
target
=
"#exampleModal{{
$evento->id
}}"
>
<
img
src
=
"
{
{asset('img/icons/logo_lixeira.png')}
}
"
alt
=
""
>
Deletar
</
button
>
</
div
>
</
div
>
@
endif
</
td
>
</
tr
>
</
tr
>
<!--
Modal
-->
</
thead
>
<
div
class
=
"modal fade"
id
=
"exampleModal{{
$evento->id
}}"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
tbody
id
=
"eventos"
>
<
div
class
=
"modal-dialog"
>
@
foreach
(
$eventos
as
$evento
)
<
div
class
=
"modal-content"
>
<
tr
>
<
div
class
=
"modal-header"
>
<
td
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
edital
</
h5
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
{{
$evento
->
nome
}}
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
a
>
</
button
>
</
td
>
</
div
>
<
td
>
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
created_at
))
}}
</
td
>
<
div
class
=
"modal-body"
>
<
td
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
edital
:
{{
$evento
->
nome
}}
?</
p
>
@
if
(
auth
()
->
user
()
->
id
==
$evento
->
criador_id
)
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('evento.editar', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item text-center"
>
Editar
Edital
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
a
href
=
"{{route('admin.atribuir', ['evento_id' =>
$evento->id
])}}"
class
=
"dropdown-item text-center"
>
Atribuir
Avaliadores
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
a
href
=
"{{route('admin.pareceres', ['evento_id' =>
$evento->id
])}}"
class
=
"dropdown-item text-center"
>
Visualizar
Pareceres
</
a
>
<
hr
class
=
"dropdown-hr"
>
<
a
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
])}}"
class
=
"dropdown-item text-center"
>
Analisar
projetos
</
a
>
<
hr
class
=
"dropdown-hr"
>
<!--
Button
trigger
modal
-->
<
button
type
=
"button"
class
=
"dropdown-item dropdown-item-delete text-center"
data
-
toggle
=
"modal"
data
-
target
=
"#exampleModal{{
$evento->id
}}"
>
<
img
src
=
"
{
{asset('img/icons/logo_lixeira.png')}
}
"
alt
=
""
>
Deletar
</
button
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
@
endif
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
</
td
>
<
form
method
=
"POST"
action
=
"
{
{route('evento.deletar',$evento->id)}
}
"
class
=
"text-center"
>
</
tr
>
{{
csrf_field
()
}}
<!--
Modal
-->
{{
method_field
(
'DELETE'
)
}}
<
div
class
=
"modal fade"
id
=
"exampleModal{{
$evento->id
}}"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
Deletar
<
div
class
=
"modal-header"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
>
Deletar
edital
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
button
>
</
div
>
</
form
>
<
div
class
=
"modal-body"
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
edital
:
{{
$evento
->
nome
}}
?</
p
>
</
div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-secondary"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
<
form
method
=
"POST"
action
=
"
{
{route('evento.deletar',$evento->id)}
}
"
class
=
"text-center"
>
{{
csrf_field
()
}}
{{
method_field
(
'DELETE'
)
}}
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Deletar
</
button
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
@
endforeach
</
tbody
>
</
tbody
>
</
table
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
resources/views/layouts/app.blade.php
View file @
1febc555
...
@@ -146,8 +146,11 @@
...
@@ -146,8 +146,11 @@
</div>
</div>
<a
href=
"{{ route('register') }}"
class=
"btn navbar-text btn-azul-destaque negrito"
style=
"color: rgb(0, 140, 255);"
>
{{ __('Cadastre-se') }}
</a>
<a
href=
"{{ route('register') }}"
class=
"btn navbar-text btn-azul-destaque negrito"
style=
"color: rgb(0, 140, 255);"
>
{{ __('Cadastre-se') }}
</a>
@else
@else
<a
href=
"{{route('coord.home')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Home
</a>
@if(Auth::user()->administradors != null)
<a
href=
"{{route('admin.editais')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Home
</a>
@else
<a
href=
"{{route('coord.home')}}"
class=
"btn navbar-text negrito "
style=
"color: rgb(0, 140, 255);"
>
Home
</a>
@endif
<a
id=
"navbarDropdown"
class=
"btn navbar-text negrito dropdown-toggle"
style=
"color: rgb(0, 140, 255);"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
<a
id=
"navbarDropdown"
class=
"btn navbar-text negrito dropdown-toggle"
style=
"color: rgb(0, 140, 255);"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
</a>
...
...
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