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
72a28df1
"git@sites.upe.br:walter.felipe/submeta.git" did not exist on "a9c4c48ddbdf675a436c1719a0328cca69943964"
Commit
72a28df1
authored
May 29, 2021
by
Danillo Bion
Browse files
implementacao na tela de editais - buscar edital
parent
ac1f09fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
72a28df1
...
@@ -29,16 +29,22 @@ use Illuminate\Support\Facades\Mail;
...
@@ -29,16 +29,22 @@ use Illuminate\Support\Facades\Mail;
class
EventoController
extends
Controller
class
EventoController
extends
Controller
{
{
public
function
index
()
public
function
index
(
Request
$request
)
{
{
//
if
(
$request
->
buscar
==
null
){
$eventos
=
Evento
::
all
();
$eventos
=
Evento
::
all
();
// $comissaoEvento = ComissaoEvento::all();
// $comissaoEvento = ComissaoEvento::all();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
$hoje
=
$hoje
->
toDateString
();
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
]);
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
,
'palavra'
=>
''
,
'flag'
=>
'false'
]);
}
else
{
$eventos
=
Evento
::
where
(
'nome'
,
'ilike'
,
'%'
.
$request
->
buscar
.
'%'
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'coordenador.home'
,[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
,
'palavra'
=>
$request
->
buscar
,
'flag'
=>
'true'
]);
}
}
}
...
...
resources/views/coordenador/home.blade.php
View file @
72a28df1
...
@@ -6,13 +6,33 @@
...
@@ -6,13 +6,33 @@
{{
--
titulo
da
página
--
}}
{{
--
titulo
da
página
--
}}
<
div
class
=
"row justify-content-center"
style
=
"margin-top: 3rem; text-align:center"
>
<
div
class
=
"row justify-content-center"
style
=
"margin-top: 3rem; text-align:center"
>
<
div
class
=
"col-md-12"
style
=
"margin-bottom: -0.5rem"
>
@
if
(
count
(
$eventos
)
>
0
)
<
div
class
=
"col-md-12"
>
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Editais
</
h5
>
<
div
class
=
"row justify-content-between"
>
@
else
<
div
class
=
"col-sm"
></
div
>
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Edital
</
h5
>
<
div
class
=
"col-sm"
style
=
"margin-bottom: 10px"
>
@
endif
@
if
(
$flag
==
'false'
)
@
if
(
count
(
$eventos
)
>
0
)
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Editais
</
h5
>
@
else
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Edital
</
h5
>
@
endif
@
else
<
h5
class
=
"card-title mb-0"
style
=
"font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6"
>
Resultado
da
busca
por
:
<
span
style
=
"font-style: italic; font-weight:bold"
>
{{
$palavra
}}
</
span
></
h5
>
@
endif
</
div
>
<
div
class
=
"col-sm"
>
<
form
action
=
"
{
{route('coord.home')}
}
"
method
=
"get"
>
@
csrf
<
div
class
=
"btn-group"
>
<
input
type
=
"text"
class
=
"form-control shadow-sm"
name
=
"buscar"
placeholder
=
"Digite o nome do edital"
value
=
"
{
{$palavra}
}
"
style
=
"margin-right: 5px;border-radius:8px; border-color:#fff;"
>
<
button
type
=
"submit"
class
=
"btn btn-light shadow-sm"
style
=
"border-radius: 8px"
><
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
width
=
"20px"
></
button
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"col-md-12"
>
<
div
class
=
"col-md-12"
>
<
hr
>
<
hr
>
</
div
>
</
div
>
...
@@ -147,7 +167,11 @@
...
@@ -147,7 +167,11 @@
<
div
class
=
"col-md-12"
>
<
div
class
=
"col-md-12"
>
<
img
src
=
"
{
{asset('img/icons/logo_projeto.png')}
}
"
alt
=
"..."
width
=
"190px"
>
<
img
src
=
"
{
{asset('img/icons/logo_projeto.png')}
}
"
alt
=
"..."
width
=
"190px"
>
</
div
>
</
div
>
<
div
class
=
"col-md-5"
style
=
"text-align: center;margin-top:1rem"
><
h5
>
Nenhum
edital
cadastrado
!</
h5
></
div
>
@
if
(
$flag
==
'true'
)
<
div
class
=
"col-md-5"
style
=
"text-align: center;margin-top:1rem"
><
h5
>
Nenhum
edital
encontrado
!</
h5
></
div
>
@
else
<
div
class
=
"col-md-5"
style
=
"text-align: center;margin-top:1rem"
><
h5
>
Nenhum
edital
cadastrado
!</
h5
></
div
>
@
endif
</
div
>
</
div
>
@
endif
@
endif
</
div
>
</
div
>
...
...
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