Commit 2204bae74eae7f41d27599d3cef51f0c146c172f
1 parent
e4f2afb7
Exists in
master
Ajustes em grupos, recomendações e critérios.
git-svn-id: https://svn.bento.ifrs.edu.br/default/ASES/e-selo@9755 c2178572-b5ca-4887-91d2-9e3a90c7d55b
Showing
11 changed files
with
82 additions
and
56 deletions
Show diff stats
Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/criterios/form.jsp
... | ... | @@ -69,9 +69,11 @@ |
69 | 69 | <c:if test="${criterio.id != null}"> |
70 | 70 | |
71 | 71 | <c:if test="${parametroAvaliacao.tsFim == null}"> |
72 | - <div class="form-group"> | |
73 | - <a id="add-criterios" href="<c:url value="/conformidades/gerarForm/${criterio.id}/${criterio.recomendacao.tipoRecomendacao.maximoConformidade}" />" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span> Incluir Faixas</a> | |
74 | - </div> | |
72 | + <c:if test="${criterio.tipoTeste.id == 3}"> | |
73 | + <div class="form-group"> | |
74 | + <a id="add-criterios" href="<c:url value="/conformidades/gerarForm/${criterio.id}/${criterio.recomendacao.tipoRecomendacao.maximoConformidade}" />" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span> Incluir Faixas</a> | |
75 | + </div> | |
76 | + </c:if> | |
75 | 77 | </c:if> |
76 | 78 | |
77 | 79 | <div class="form-group"> | ... | ... |
Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/grupos/lista.jsp
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | |
6 | 6 | <tiles:insertTemplate template="/WEB-INF/jsp/template/template.jsp"> |
7 | 7 | <tiles:putAttribute name="body"> |
8 | - <a href="<c:url value="/grupos" />"><strong><span class="glyphicon glyphicon-check"></span> Grupos</strong></a> | |
8 | + <a href="<c:url value="/grupos" />"><strong><span class="glyphicon glyphicon-check"></span> Grupodds</strong></a> | |
9 | 9 | |
10 | 10 | <a href="<c:url value="/grupos/form" />" class="btn btn-default pull-right"><span class="glyphicon glyphicon-plus"></span> Incluir</a> |
11 | 11 | |
... | ... | @@ -29,6 +29,18 @@ |
29 | 29 | |
30 | 30 | <div class="row"> |
31 | 31 | <div class="col-md-12"> |
32 | + <form class="form-inline" role="form" action="<c:url value="/grupos/lista"/>"> | |
33 | + <div class="form-group"> | |
34 | + <label for="txtNome">Nome</label> | |
35 | + <input id="txtNome" name="grupo.nome" class="form-control input-sm" value="${grupo.nome}"> | |
36 | + </div> | |
37 | + <button type="submit" class="btn btn-default btn-sm" style="margin-top: 24px">Pesquisar</button> | |
38 | + </form> | |
39 | + </div> | |
40 | + </div> | |
41 | + | |
42 | + <div class="row"> | |
43 | + <div class="col-md-12"> | |
32 | 44 | <div class="table-responsive"> |
33 | 45 | <table id="gruposTable" pagesize="10" class="table table-striped table-bordered table-hover table-condensed"> |
34 | 46 | <thead> | ... | ... |
Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/parametroAvaliacao/form.jsp
... | ... | @@ -67,7 +67,6 @@ |
67 | 67 | <th>Número</th> |
68 | 68 | <th>Peso</th> |
69 | 69 | <th>Descrição</th> |
70 | - <th>Tipo</th> | |
71 | 70 | <th> </th> |
72 | 71 | </tr> |
73 | 72 | </thead> |
... | ... | @@ -77,7 +76,6 @@ |
77 | 76 | <td><a href="<c:url value="/recomendacao/form/${recomendacao.id}" />">${recomendacao.numeroRecomendacao}</a></td> |
78 | 77 | <td>${recomendacao.peso}</td> |
79 | 78 | <td>${recomendacao.descricao}</td> |
80 | - <td>${recomendacao.tipoRecomendacao.descricao}</td> | |
81 | 79 | <td width="30%"> |
82 | 80 | <div class="btn-group"> |
83 | 81 | <a href="<c:url value="/recomendacao/form/${recomendacao.id}" />" class="btn btn-default btn-sm">Consultar</a> | ... | ... |
Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/recomendacao/form.jsp
... | ... | @@ -50,24 +50,6 @@ |
50 | 50 | </div> |
51 | 51 | </div> |
52 | 52 | |
53 | - <div class="form-group"> | |
54 | - <label for="selectTipoConformidade" class="col-lg-2 control-label">Tipo de Recomendação</label> | |
55 | - <div class="col-lg-10"> | |
56 | - <select id="selectTipoConformidade" class="form-control required" name="recomendacao.tipoRecomendacao.id"> | |
57 | - <option value>Selecione</option> | |
58 | - <c:forEach items="${tipoRecomendacaoList}" var="tipoRecomendacao"> | |
59 | - <c:choose> | |
60 | - <c:when test="${recomendacao.tipoRecomendacao.id == tipoRecomendacao.id}"> | |
61 | - <option value="${tipoRecomendacao.id}" selected>${tipoRecomendacao.descricao}</option> | |
62 | - </c:when> | |
63 | - <c:otherwise> | |
64 | - <option value="${tipoRecomendacao.id}">${tipoRecomendacao.descricao}</option> | |
65 | - </c:otherwise> | |
66 | - </c:choose> | |
67 | - </c:forEach> | |
68 | - </select> | |
69 | - </div> | |
70 | - </div> | |
71 | 53 | |
72 | 54 | <c:if test="${recomendacao.id != null}"> |
73 | 55 | ... | ... |
Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/usuarios/loginForm.jsp
... | ... | @@ -36,9 +36,9 @@ |
36 | 36 | <p>Selo Brasileiro de Acessibilidade Digital</p> |
37 | 37 | </div> |
38 | 38 | |
39 | - <form class="form-signin" action="<c:url value="/login"/>" | |
40 | - method="post"> | |
41 | - <div class="control-group error"> | |
39 | +<center> | |
40 | + <form class="form-horizontal" style="max-width: 500px;" action="<c:url value="/login"/>" method="post"> | |
41 | + <div class="control-group error"> | |
42 | 42 | <c:if test="${not empty mensagem}"> |
43 | 43 | <div class="alert alert-success alert-dismissable"> |
44 | 44 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
... | ... | @@ -51,26 +51,51 @@ |
51 | 51 | </c:forEach> |
52 | 52 | </div> |
53 | 53 | </div> |
54 | + <fieldset> | |
55 | + <div class="form-group"> | |
56 | + <label for="inputCpf" class="col-lg-2 control-label required">CPF</label> | |
57 | + <div class="col-lg-10"> | |
58 | + <input id="inputCpf" name="usuario.cpf" type="text" class="form-control cpf required" placeholder="CPF" value="${usuario.cpf}" /> | |
59 | + </div> | |
60 | + </div> | |
54 | 61 | |
55 | - <input id="cpf" name="usuario.cpf" type="text" | |
56 | - class="form-control cpf" autofocus required placeholder="CPF"> | |
57 | - <input | |
58 | - id="senha" name="usuario.senha" type="password" class="form-control" | |
59 | - required placeholder="Senha"> | |
62 | + <div class="form-group"> | |
63 | + <label for="inputSenha" class="col-lg-2 control-label required">Senha</label> | |
64 | + <div class="col-lg-10"> | |
65 | + <c:choose> | |
66 | + <c:when test="${usuario.id == null}"> | |
67 | + <input id="inputSenha" name="usuario.senha" type="password" class="form-control required" placeholder="Senha" /> | |
68 | + </c:when> | |
69 | + <c:otherwise> | |
70 | + <input id="inputSenha" name="usuario.senha" type="password" class="form-control" placeholder="Senha" /> | |
71 | + </c:otherwise> | |
72 | + </c:choose> | |
73 | + </div> | |
74 | + </div> | |
60 | 75 | |
61 | - <button class="btn btn-lg btn-primary btn-block" type="submit">Entrar</button> | |
62 | - </form> | |
76 | + <div class="form-group"> | |
77 | + <div class="col-lg-10 col-lg-offset-2"> | |
78 | + <button type="submit" class="btn btn-primary btn-block">Entrar</button> | |
79 | + </div> | |
80 | + </div> | |
81 | + </fieldset> | |
82 | + </form> | |
83 | + | |
63 | 84 | |
85 | + | |
86 | + | |
87 | + <center> | |
64 | 88 | <div class="login-footer"> |
65 | 89 | <div class="row"> |
66 | - <div class="col-xs-6 col-md-6"> | |
90 | + <div > | |
67 | 91 | <div class="left-section"> |
68 | - <a href="${linkTo[UsuariosController].recuperarSenhaForm}">Esqueci minha senha</a> | |
92 | + <a href="${linkTo[UsuariosController].recuperarSenhaForm}"> Esqueci minha senha</a> | |
69 | 93 | </div> |
70 | 94 | </div> |
71 | 95 | </div> |
72 | 96 | </div> |
73 | - | |
97 | + </center> | |
98 | +</center> | |
74 | 99 | </div> |
75 | 100 | <!-- /container --> |
76 | 101 | ... | ... |
Desenvolvimento/Codificacao/e-Selo/WebContent/static/css/login.css
... | ... | @@ -5,7 +5,7 @@ body { |
5 | 5 | } |
6 | 6 | |
7 | 7 | .form-signin { |
8 | - max-width: 330px; | |
8 | + max-width: 370px; | |
9 | 9 | padding: 15px; |
10 | 10 | margin: 0 auto; |
11 | 11 | } |
... | ... | @@ -19,7 +19,7 @@ body { |
19 | 19 | .form-signin .form-control { |
20 | 20 | position: relative; |
21 | 21 | font-size: 16px; |
22 | - height: auto; | |
22 | + height: 70%; | |
23 | 23 | padding: 10px; |
24 | 24 | -webkit-box-sizing: border-box; |
25 | 25 | -moz-box-sizing: border-box; |
... | ... | @@ -28,6 +28,7 @@ body { |
28 | 28 | .form-signin .form-control:focus { |
29 | 29 | z-index: 2; |
30 | 30 | } |
31 | + | |
31 | 32 | .form-signin input[type="text"] { |
32 | 33 | margin-bottom: -1px; |
33 | 34 | border-bottom-left-radius: 0; | ... | ... |
Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/GruposController.java
... | ... | @@ -26,6 +26,13 @@ public class GruposController { |
26 | 26 | result = _result; |
27 | 27 | validator = _validator; |
28 | 28 | } |
29 | + | |
30 | + @Get("/grupos/lista") | |
31 | + @Restrito(descricao = "GRUPOS_LISTA") | |
32 | + public List<Grupo> lista(Grupo grupo) { | |
33 | + result.include("usuario", grupo); | |
34 | + return dao.listAll(grupo); | |
35 | + } | |
29 | 36 | |
30 | 37 | @Get("/grupos") |
31 | 38 | @Restrito(descricao = "GRUPOS_LISTA") | ... | ... |
Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/dao/GrupoDAO.java
... | ... | @@ -2,6 +2,7 @@ package br.com.eselo.dao; |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import org.hibernate.Criteria; | |
5 | 6 | import org.hibernate.HibernateException; |
6 | 7 | import org.hibernate.Session; |
7 | 8 | import org.hibernate.criterion.Order; |
... | ... | @@ -85,4 +86,17 @@ public class GrupoDAO extends GenericDAO<Grupo> { |
85 | 86 | return result; |
86 | 87 | } |
87 | 88 | |
89 | + @SuppressWarnings("unchecked") | |
90 | + public List<Grupo> listAll(Grupo grupo) { | |
91 | + Criteria criteria = getSession().createCriteria(getPersistentClass()); | |
92 | + | |
93 | + if (grupo.getNome() != null) { | |
94 | + criteria.add(Restrictions.ilike("nome", "%" + grupo.getNome() + "%")); | |
95 | + } | |
96 | + | |
97 | + criteria.addOrder(Order.asc("nome")); | |
98 | + | |
99 | + return criteria.list(); | |
100 | + } | |
101 | + | |
88 | 102 | } | ... | ... |
Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/model/Recomendacao.java
... | ... | @@ -16,8 +16,6 @@ import javax.persistence.OneToMany; |
16 | 16 | import javax.persistence.SequenceGenerator; |
17 | 17 | import javax.persistence.Table; |
18 | 18 | |
19 | -import org.hibernate.annotations.ForeignKey; | |
20 | - | |
21 | 19 | @Entity |
22 | 20 | @Table(name = "sel_recomendacao") |
23 | 21 | public class Recomendacao { |
... | ... | @@ -64,11 +62,6 @@ public class Recomendacao { |
64 | 62 | this.criterios.remove(criterio); |
65 | 63 | } |
66 | 64 | |
67 | - @ManyToOne(fetch = FetchType.LAZY) | |
68 | - @JoinColumn(name = "id_tipo_recomendacao", columnDefinition = "integer", nullable = false, insertable = true, updatable = true) | |
69 | - @ForeignKey(name = "fk_sel_diretriz_sel_tipo_diretriz") | |
70 | - private TipoRecomendacao tipoRecomendacao; | |
71 | - | |
72 | 65 | public String getDescricao() { |
73 | 66 | return descricao; |
74 | 67 | } |
... | ... | @@ -109,12 +102,4 @@ public class Recomendacao { |
109 | 102 | this.parametroAvaliacao = parametroAvaliacao; |
110 | 103 | } |
111 | 104 | |
112 | - public TipoRecomendacao getTipoRecomendacao() { | |
113 | - return tipoRecomendacao; | |
114 | - } | |
115 | - | |
116 | - public void setTipoRecomendacao(TipoRecomendacao tipoRecomendacao) { | |
117 | - this.tipoRecomendacao = tipoRecomendacao; | |
118 | - } | |
119 | - | |
120 | 105 | } | ... | ... |
Desenvolvimento/Codificacao/e-Selo/src/main/resources/hibernate.cfg.xml
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <hibernate-configuration> |
8 | 8 | <session-factory> |
9 | 9 | <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> |
10 | - <property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/eselo2</property> | |
10 | + <property name="hibernate.connection.url">jdbc:postgresql://10.10.100.32:5432/eselo4</property> | |
11 | 11 | <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> |
12 | 12 | <property name="hibernate.connection.username">postgres</property> |
13 | 13 | <property name="hibernate.connection.password">postgres</property> | ... | ... |
Desenvolvimento/Codificacao/e-Selo/target/classes/hibernate.cfg.xml
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <hibernate-configuration> |
8 | 8 | <session-factory> |
9 | 9 | <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> |
10 | - <property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/eselo2</property> | |
10 | + <property name="hibernate.connection.url">jdbc:postgresql://10.10.100.32:5432/eselo4</property> | |
11 | 11 | <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> |
12 | 12 | <property name="hibernate.connection.username">postgres</property> |
13 | 13 | <property name="hibernate.connection.password">postgres</property> | ... | ... |