Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
a68189ec
Commit
a68189ec
authored
Nov 19, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'William_001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into joel-001
parents
35824b34
eb3b4588
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
14 deletions
+98
-14
curriculumsearch/src/main/java/com/roshka/controller/CargoController.java
+13
-4
curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java
+1
-1
curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java
+13
-4
curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java
+7
-0
curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java
+7
-0
curriculumsearch/src/main/webapp/css/formPostulanteStyle.css
+2
-2
curriculumsearch/src/main/webapp/css/indexStyle.css
+2
-1
curriculumsearch/src/main/webapp/jsp/cargos.jsp
+24
-1
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
+29
-1
No files found.
curriculumsearch/src/main/java/com/roshka/controller/CargoController.java
View file @
a68189ec
package
com
.
roshka
.
controller
;
import
java.util.List
;
import
javax.validation.Valid
;
import
com.roshka.modelo.Cargo
;
import
com.roshka.repositorio.CargoRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.validation.BindingResult
;
...
...
@@ -27,10 +33,13 @@ public class CargoController {
}
@RequestMapping
(
"/cargos"
)
public
String
menuCargos
(
Model
model
,
@RequestParam
(
required
=
false
)
String
nombre
)
{
if
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
())
model
.
addAttribute
(
"cargos"
,
cargoRepo
.
findAll
());
public
String
menuCargos
(
Model
model
,
@RequestParam
(
required
=
false
)
String
nombre
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
{
final
Integer
CANTIDAD_POR_PAGINA
=
10
;
Pageable
page
=
PageRequest
.
of
(
nroPagina
,
CANTIDAD_POR_PAGINA
,
Sort
.
by
(
"id"
));
Page
<
Cargo
>
CargoPag
=
cargoRepo
.
findAllCargo
(
page
);
List
<
Cargo
>
cargo
=
CargoPag
.
getContent
();
model
.
addAttribute
(
"pages"
,
CargoPag
.
getTotalPages
());
if
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
())
model
.
addAttribute
(
"cargos"
,
cargo
);
else
model
.
addAttribute
(
"cargos"
,
cargoRepo
.
findByNombreContainingIgnoreCase
(
nombre
));
return
"cargos"
;
}
...
...
curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java
View file @
a68189ec
...
...
@@ -91,7 +91,7 @@ public class PostulanteRRHHController {
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
{
final
Integer
CANTIDAD_POR_PAGINA
=
5
;
final
Integer
CANTIDAD_POR_PAGINA
=
10
;
Pageable
page
=
PageRequest
.
of
(
nroPagina
,
CANTIDAD_POR_PAGINA
,
Sort
.
by
(
"id"
));
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
...
...
curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java
View file @
a68189ec
package
com
.
roshka
.
controller
;
import
java.util.List
;
import
javax.validation.Valid
;
import
com.roshka.modelo.Tecnologia
;
...
...
@@ -15,6 +17,10 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
@Controller
public
class
TecnologiaController
{
...
...
@@ -38,10 +44,13 @@ public String addtecnologiaView(Model model,@PathVariable(required = false) Long
}
@RequestMapping
(
"/tecnologias"
)
public
String
menuTecnologias
(
Model
model
,
@RequestParam
(
required
=
false
)
String
nombre
)
{
if
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
())
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
public
String
menuTecnologias
(
Model
model
,
@RequestParam
(
required
=
false
)
String
nombre
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
{
final
Integer
CANTIDAD_POR_PAGINA
=
10
;
Pageable
page
=
PageRequest
.
of
(
nroPagina
,
CANTIDAD_POR_PAGINA
,
Sort
.
by
(
"id"
));
Page
<
Tecnologia
>
tecnologiaPag
=
tecRepo
.
findAllTecnologia
(
page
);
List
<
Tecnologia
>
tecnologia
=
tecnologiaPag
.
getContent
();
model
.
addAttribute
(
"pages"
,
tecnologiaPag
.
getTotalPages
());
if
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
())
model
.
addAttribute
(
"tecnologias"
,
tecnologia
);
else
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findByNombreContainingIgnoreCase
(
nombre
));
return
"tecnologias"
;
}
...
...
curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java
View file @
a68189ec
...
...
@@ -4,9 +4,16 @@ import java.util.List;
import
com.roshka.modelo.Cargo
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
public
interface
CargoRepository
extends
JpaRepository
<
Cargo
,
Long
>{
public
List
<
Cargo
>
findByNombreContainingIgnoreCase
(
String
nombre
);
public
boolean
existsByNombreIgnoreCase
(
String
nombre
);
@Query
(
value
=
"SELECT * FROM cargo"
,
nativeQuery
=
true
)
public
Page
<
Cargo
>
findAllCargo
(
Pageable
pageable
);
}
curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java
View file @
a68189ec
package
com
.
roshka
.
repositorio
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
java.util.List
;
...
...
@@ -11,4 +14,8 @@ public interface TecnologiaRepository extends JpaRepository<Tecnologia,Long> {
public
List
<
Tecnologia
>
findByNombreContainingIgnoreCase
(
String
nombre
);
public
boolean
existsByNombreIgnoreCase
(
String
nombre
);
@Query
(
value
=
"SELECT * FROM tecnologia"
,
nativeQuery
=
true
)
public
Page
<
Tecnologia
>
findAllTecnologia
(
Pageable
pageable
);
}
curriculumsearch/src/main/webapp/css/formPostulanteStyle.css
View file @
a68189ec
body
{
background-color
:
#5078DA
;
/* background-image:url(/img/fondo2.png); */
/* background-color: #baebd8; */
background-image
:
url(/img/fondo.png)
;
/*background-size:cover;*/
background-repeat
:
repeat
;
height
:
100vh
;
width
:
100vw
;
...
...
curriculumsearch/src/main/webapp/css/indexStyle.css
View file @
a68189ec
...
...
@@ -3,6 +3,6 @@ body{
background-repeat
:
no-repeat
;
background-size
:
cover
;
height
:
100vh
;
width
:
100vw
;
position
:
absolute
;
-webkit-text-size-adjust
:
100%
;
}
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/cargos.jsp
View file @
a68189ec
...
...
@@ -45,8 +45,31 @@ contentType="text/html;charset=UTF-8" language="java" %>
</table>
</div>
</div>
<div class="card-footer">
<div>
<nav aria-label="Page navigation example">
<ul class="pagination">
<c:forEach begin="1" end="${pages}" var="nro">
<li class="page-item ${(param.nroPagina == null and nro == 1) or param.nroPagina == nro-1 ? 'active' : ''}"><a class="page-link" href="javascript:buscarPagina(${nro})">${nro}</a></li>
</c:forEach>
</ul>
</nav>
</div>
</div>
</div>
</layout:put>
<layout:put block="scripts" type="APPEND">
<script>
function buscarPagina(nro){
nro--
const aBuscar = 'nroPagina='+nro
if(!location.search) location.search = "?"+aBuscar
const inicial = location.search.search(aBuscar);
if(inicial==-1){//si no se encuentra y hay otros queries
location.search = "&"+aBuscar
}
location.search.replace('nroPagina=',aBuscar)
}
</script>
</layout:put>
</layout:extends>
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
View file @
a68189ec
...
...
@@ -39,5 +39,33 @@
</tbody>
</table>
</div>
</layout:put>
<div class="card-footer">
<div>
<nav aria-label="Page navigation example">
<ul class="pagination">
<c:forEach begin="1" end="${pages}" var="nro">
<li class="page-item ${(param.nroPagina == null and nro == 1) or param.nroPagina == nro-1 ? 'active' : ''}"><a class="page-link" href="javascript:buscarPagina(${nro})">${nro}</a></li>
</c:forEach>
</ul>
</nav>
</div>
</div>
</div>
</layout:put>
<layout:put block="scripts" type="APPEND">
<script>
function buscarPagina(nro){
nro--
const aBuscar = 'nroPagina='+nro
if(!location.search) location.search = "?"+aBuscar
const inicial = location.search.search(aBuscar);
if(inicial==-1){//si no se encuentra y hay otros queries
location.search = "&"+aBuscar
}
location.search.replace('nroPagina=',aBuscar)
}
</script>
</layout:put>
</layout:extends>
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