Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
4 years ago
by
Carlos André
Browse files
Options
Download
Email Patches
Plain Diff
ajustes de fluxo
parent
b8e96d8a
master
carl-branch
dependabot/composer/dompdf/dompdf-1.2.2
dependabot/composer/guzzlehttp/guzzle-6.5.8
dependabot/composer/guzzlehttp/psr7-1.8.5
dependabot/composer/symfony/http-kernel-4.4.50
dependabot/npm_and_yarn/axios-0.21.2
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/express-4.18.2
dependabot/npm_and_yarn/json5-and-json5-2.2.3
dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
dependabot/npm_and_yarn/qs-and-express-6.11.0
excluir_projeto_submetido
minha_conta
modificacoes_aviso
modificacoes_layout_6
modificacoes_layout_7
modificacoes_layout_8
modificacoes_layout_9
modificacoes_layout_igor
modificacoes_layout_minha_conta
modificacoes_perfil_avaliador
updates_mar
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app/Http/Controllers/EventoController.php
+3
-2
app/Http/Controllers/EventoController.php
app/Http/Controllers/HomeController.php
+5
-2
app/Http/Controllers/HomeController.php
resources/views/administrador/editais.blade.php
+88
-75
resources/views/administrador/editais.blade.php
resources/views/layouts/app.blade.php
+5
-2
resources/views/layouts/app.blade.php
with
101 additions
and
81 deletions
+101
-81
app/Http/Controllers/EventoController.php
View file @
1febc555
...
...
@@ -199,7 +199,7 @@ class EventoController extends Controller
// Mail::to($user->email)
// ->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
){
...
...
@@ -403,7 +403,8 @@ class EventoController extends Controller
$evento
->
update
();
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'administrador.editais'
,[
'eventos'
=>
$eventos
]);
return
redirect
(
route
(
'admin.editais'
)
)
->
with
([
'mensagem'
=>
'Edital salvo com sucesso!'
,
'eventos'
=>
$eventos
]);
}
/**
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/HomeController.php
View file @
1febc555
...
...
@@ -6,6 +6,7 @@ use Illuminate\Http\Request;
use
Auth
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Storage
;
use
App\Evento
;
class
HomeController
extends
Controller
{
...
...
@@ -28,8 +29,10 @@ class HomeController extends Controller
{
$eventos
=
\
App\Evento
::
all
();
if
(
Auth
::
user
()
->
administradors
!=
null
){
return
view
(
'administrador.index'
);
if
(
Auth
::
user
()
->
administradors
!=
null
){
$eventos
=
Evento
::
orderBy
(
'nome'
)
->
get
();
return
view
(
'administrador.editais'
)
->
with
([
'eventos'
=>
$eventos
]);
}
else
if
(
Auth
::
user
()
->
AdministradorResponsavel
!=
null
)
{
return
view
(
'administradorResponsavel.index'
);
...
...
This diff is collapsed.
Click to expand it.
resources/views/administrador/editais.blade.php
View file @
1febc555
...
...
@@ -28,88 +28,101 @@
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
id
=
"eventos"
>
@
foreach
(
$eventos
as
$evento
)
@
if
(
session
(
'mensagem'
))
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
style
=
"margin-top: 30px;"
>
<
div
class
=
"alert alert-success"
>
<
p
>
{{
session
(
'mensagem'
)}}
</
p
>
</
div
>
</
div
>
</
div
>
@
endif
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
td
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
{{
$evento
->
nome
}}
</
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
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"exampleModal{{
$evento->id
}}"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
<
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
>
</
div
>
<
div
class
=
"modal-body"
>
<
p
>
Você
tem
certeza
que
deseja
deletar
o
edital
:
{{
$evento
->
nome
}}
?</
p
>
</
thead
>
<
tbody
id
=
"eventos"
>
@
foreach
(
$eventos
as
$evento
)
<
tr
>
<
td
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
{{
$evento
->
nome
}}
</
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
>
<
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
@
endif
</
td
>
</
tr
>
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"exampleModal{{
$evento->id
}}"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog"
>
<
div
class
=
"modal-content"
>
<
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
>
</
form
>
</
div
>
<
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
>
@
endforeach
</
tbody
>
</
table
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/layouts/app.blade.php
View file @
1febc555
...
...
@@ -146,8 +146,11 @@
</div>
<a
href=
"{{ route('register') }}"
class=
"btn navbar-text btn-azul-destaque negrito"
style=
"color: rgb(0, 140, 255);"
>
{{ __('Cadastre-se') }}
</a>
@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
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
...
...
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
Menu
Projects
Groups
Snippets
Help