Commit 101b087000bf57268cd4c0536cb8fb1773a6649b
Exists in
master
Merge branch 'tarefa-268' into desenvolvimento
Conflicts: cit-ecm-api/pom.xml cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ProcessoServiceImpl.java cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java
Showing
11 changed files
with
665 additions
and
290 deletions
Show diff stats
cit-ecm-api/pom.xml
@@ -82,5 +82,10 @@ | @@ -82,5 +82,10 @@ | ||
82 | <artifactId>json-simple</artifactId> | 82 | <artifactId>json-simple</artifactId> |
83 | <version>1.1</version> | 83 | <version>1.1</version> |
84 | </dependency> | 84 | </dependency> |
85 | + <dependency> | ||
86 | + <groupId>org.jsoup</groupId> | ||
87 | + <artifactId>jsoup</artifactId> | ||
88 | + <version>1.8.3</version> | ||
89 | + </dependency> | ||
85 | </dependencies> | 90 | </dependencies> |
86 | </project> | 91 | </project> |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/AnexoGedServiceImpl.java
@@ -105,9 +105,9 @@ public class AnexoGedServiceImpl extends GenericServiceImpl<AnexoGed, Long> impl | @@ -105,9 +105,9 @@ public class AnexoGedServiceImpl extends GenericServiceImpl<AnexoGed, Long> impl | ||
105 | 105 | ||
106 | // FAZ OCR DO DOCUMENTO ANEXADO E JÁ MANDA PARA INDEXAÇÃO | 106 | // FAZ OCR DO DOCUMENTO ANEXADO E JÁ MANDA PARA INDEXAÇÃO |
107 | 107 | ||
108 | -// documentoGed.setConteudo(this.gedFileService.doOcr(anexo)); | 108 | + documentoGed.setConteudo(this.gedFileService.doOcr(anexo)); |
109 | 109 | ||
110 | -// this.solrService.addDocumento(documentoGed); | 110 | + this.solrService.addDocumento(documentoGed); |
111 | 111 | ||
112 | anexo.setDocumentoGed(documentoGed); | 112 | anexo.setDocumentoGed(documentoGed); |
113 | 113 |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/DocumentoGedServiceImpl.java
@@ -222,8 +222,11 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | @@ -222,8 +222,11 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | ||
222 | private void saveSolr(DocumentoGed entity) { | 222 | private void saveSolr(DocumentoGed entity) { |
223 | 223 | ||
224 | try { | 224 | try { |
225 | + // Verifica se o documento é sigiloso | ||
226 | + if (!UtilObjeto.isReferencia(entity.getSigilo())) { | ||
225 | 227 | ||
226 | -// this.solrService.addDocumento(entity); | 228 | + this.solrService.addDocumento(entity); |
229 | + } | ||
227 | 230 | ||
228 | } catch (Exception e) { | 231 | } catch (Exception e) { |
229 | 232 | ||
@@ -572,7 +575,7 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | @@ -572,7 +575,7 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | ||
572 | 575 | ||
573 | this.validarEntidade(entity, this.validator); | 576 | this.validarEntidade(entity, this.validator); |
574 | AnexoGed anexo = null; | 577 | AnexoGed anexo = null; |
575 | - | 578 | + |
576 | if (entity.getAnexo() != null) { | 579 | if (entity.getAnexo() != null) { |
577 | anexo = this.anexoGedService.getReference(entity.getAnexo().getId()); | 580 | anexo = this.anexoGedService.getReference(entity.getAnexo().getId()); |
578 | } | 581 | } |
@@ -595,7 +598,7 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | @@ -595,7 +598,7 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | ||
595 | 598 | ||
596 | entity.setConteudo(this.decrypted(entity.getConteudoCriptografado())); | 599 | entity.setConteudo(this.decrypted(entity.getConteudoCriptografado())); |
597 | 600 | ||
598 | - // this.saveSolr(entity); | 601 | + this.saveSolr(entity); |
599 | 602 | ||
600 | try { | 603 | try { |
601 | if (anexo != null) { | 604 | if (anexo != null) { |
@@ -839,11 +842,10 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | @@ -839,11 +842,10 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | ||
839 | */ | 842 | */ |
840 | private void vincularAnexo(DocumentoGed documentoGedOrigem, Processo processoDestinoAnexo, Processo processoOrigem) { | 843 | private void vincularAnexo(DocumentoGed documentoGedOrigem, Processo processoDestinoAnexo, Processo processoOrigem) { |
841 | 844 | ||
842 | -/* Processo processoDestinoAnexo = this.processoService.getReference(anexarProcessoVH.getProcesso().getId());*/ | 845 | + /* Processo processoDestinoAnexo = this.processoService.getReference(anexarProcessoVH.getProcesso().getId()); */ |
843 | 846 | ||
844 | AnexoGed anexoDocumentoOrigem = null; | 847 | AnexoGed anexoDocumentoOrigem = null; |
845 | 848 | ||
846 | - | ||
847 | DocumentoGed documentoGed = new DocumentoGed(); | 849 | DocumentoGed documentoGed = new DocumentoGed(); |
848 | 850 | ||
849 | documentoGed = documentoGedOrigem.clone(); | 851 | documentoGed = documentoGedOrigem.clone(); |
@@ -857,26 +859,26 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | @@ -857,26 +859,26 @@ public class DocumentoGedServiceImpl extends GenericServiceImpl<DocumentoGed, Lo | ||
857 | 859 | ||
858 | documentoGed.setInteressados(new LinkedList<InteressadoDocumento>()); | 860 | documentoGed.setInteressados(new LinkedList<InteressadoDocumento>()); |
859 | 861 | ||
860 | - //Monta os dados do novo interessado para o novo documento. | ||
861 | - for(InteressadoDocumento interessadoDocumento : documentoGedOrigem.getInteressados()){ | ||
862 | - | 862 | + // Monta os dados do novo interessado para o novo documento. |
863 | + for (InteressadoDocumento interessadoDocumento : documentoGedOrigem.getInteressados()) { | ||
864 | + | ||
863 | InteressadoDocumento interessadoDocumentoDestino = new InteressadoDocumento(); | 865 | InteressadoDocumento interessadoDocumentoDestino = new InteressadoDocumento(); |
864 | interessadoDocumentoDestino.setInteressado(interessadoDocumento.getInteressado()); | 866 | interessadoDocumentoDestino.setInteressado(interessadoDocumento.getInteressado()); |
865 | interessadoDocumentoDestino.setDocumentoGed(documentoGed); | 867 | interessadoDocumentoDestino.setDocumentoGed(documentoGed); |
866 | documentoGed.getInteressados().add(interessadoDocumentoDestino); | 868 | documentoGed.getInteressados().add(interessadoDocumentoDestino); |
867 | } | 869 | } |
868 | - | 870 | + |
869 | } | 871 | } |
870 | 872 | ||
871 | documentoGed = super.save(documentoGed); | 873 | documentoGed = super.save(documentoGed); |
872 | 874 | ||
873 | if (documentoGedOrigem.getFormaCriacao() != null && !documentoGedOrigem.getFormaCriacao().getCodigo().equals(1L)) { | 875 | if (documentoGedOrigem.getFormaCriacao() != null && !documentoGedOrigem.getFormaCriacao().getCodigo().equals(1L)) { |
874 | - | 876 | + |
875 | if (documentoGedOrigem.getAnexo() != null) { | 877 | if (documentoGedOrigem.getAnexo() != null) { |
876 | anexoDocumentoOrigem = this.anexoGedService.getReference(documentoGedOrigem.getAnexo().getId()); | 878 | anexoDocumentoOrigem = this.anexoGedService.getReference(documentoGedOrigem.getAnexo().getId()); |
877 | } | 879 | } |
878 | } | 880 | } |
879 | - | 881 | + |
880 | try { | 882 | try { |
881 | if (anexoDocumentoOrigem != null) { | 883 | if (anexoDocumentoOrigem != null) { |
882 | File file = this.gedFileService.restoreFile(anexoDocumentoOrigem); | 884 | File file = this.gedFileService.restoreFile(anexoDocumentoOrigem); |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ProcessoServiceImpl.java
@@ -168,13 +168,8 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl | @@ -168,13 +168,8 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl | ||
168 | this.gerarNUP(processo); | 168 | this.gerarNUP(processo); |
169 | } | 169 | } |
170 | 170 | ||
171 | - try { | ||
172 | - | ||
173 | -// this.solrService.addProcesso(processo); | ||
174 | - } catch (final Exception e) { | 171 | + this.saveSolr(processo); |
175 | 172 | ||
176 | - e.printStackTrace(); | ||
177 | - } | ||
178 | if (entity.getSigilo() == null) { | 173 | if (entity.getSigilo() == null) { |
179 | this.startBusinessProcess(processo); | 174 | this.startBusinessProcess(processo); |
180 | } | 175 | } |
@@ -200,6 +195,32 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl | @@ -200,6 +195,32 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl | ||
200 | } | 195 | } |
201 | 196 | ||
202 | /** | 197 | /** |
198 | + * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | ||
199 | + * | ||
200 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | ||
201 | + * | ||
202 | + * Método responsável por | ||
203 | + * | ||
204 | + * @author rogerio.costa | ||
205 | + * | ||
206 | + * @param processo | ||
207 | + */ | ||
208 | + private void saveSolr(Processo processo) { | ||
209 | + | ||
210 | + try { | ||
211 | + | ||
212 | + if (!UtilObjeto.isReferencia(processo.getSigilo())) { | ||
213 | + | ||
214 | + this.solrService.addProcesso(processo); | ||
215 | + } | ||
216 | + | ||
217 | + } catch (final Exception e) { | ||
218 | + | ||
219 | + e.printStackTrace(); | ||
220 | + } | ||
221 | + } | ||
222 | + | ||
223 | + /** | ||
203 | * | 224 | * |
204 | * <p> | 225 | * <p> |
205 | * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | 226 | * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/SolrServiceImpl.java
@@ -7,12 +7,14 @@ import org.apache.solr.client.solrj.SolrClient; | @@ -7,12 +7,14 @@ import org.apache.solr.client.solrj.SolrClient; | ||
7 | import org.apache.solr.client.solrj.SolrServerException; | 7 | import org.apache.solr.client.solrj.SolrServerException; |
8 | import org.apache.solr.client.solrj.impl.HttpSolrClient; | 8 | import org.apache.solr.client.solrj.impl.HttpSolrClient; |
9 | import org.apache.solr.common.SolrInputDocument; | 9 | import org.apache.solr.common.SolrInputDocument; |
10 | +import org.jsoup.Jsoup; | ||
10 | import org.springframework.beans.factory.annotation.Value; | 11 | import org.springframework.beans.factory.annotation.Value; |
11 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
12 | 13 | ||
13 | import br.com.centralit.api.model.DocumentoGed; | 14 | import br.com.centralit.api.model.DocumentoGed; |
14 | import br.com.centralit.api.model.Processo; | 15 | import br.com.centralit.api.model.Processo; |
15 | import br.com.centralit.api.service.SolrService; | 16 | import br.com.centralit.api.service.SolrService; |
17 | +import br.com.centralit.framework.util.UtilObjeto; | ||
16 | 18 | ||
17 | /** | 19 | /** |
18 | * <p> | 20 | * <p> |
@@ -62,6 +64,8 @@ import br.com.centralit.api.service.SolrService; | @@ -62,6 +64,8 @@ import br.com.centralit.api.service.SolrService; | ||
62 | @Service("solrService") | 64 | @Service("solrService") |
63 | public class SolrServiceImpl implements SolrService { | 65 | public class SolrServiceImpl implements SolrService { |
64 | 66 | ||
67 | + private static final String INFORMAÇÃO_RESTRITA = "Informação restrita"; | ||
68 | + | ||
65 | @Value("${ecm.solr.server}") | 69 | @Value("${ecm.solr.server}") |
66 | public String solrServer; | 70 | public String solrServer; |
67 | 71 | ||
@@ -87,7 +91,6 @@ public class SolrServiceImpl implements SolrService { | @@ -87,7 +91,6 @@ public class SolrServiceImpl implements SolrService { | ||
87 | processoDoc.setField("unidadeGeradora", processo.getUnidade().getNome()); | 91 | processoDoc.setField("unidadeGeradora", processo.getUnidade().getNome()); |
88 | processoDoc.setField("dataCriacao", out.format(processo.getDataCriacao().getTime())); | 92 | processoDoc.setField("dataCriacao", out.format(processo.getDataCriacao().getTime())); |
89 | processoDoc.setField("situacao", ""); | 93 | processoDoc.setField("situacao", ""); |
90 | - | ||
91 | processoDoc.setField("nivelAcesso", processo.getNivelAcesso().getNivelAcesso().getDescricao()); | 94 | processoDoc.setField("nivelAcesso", processo.getNivelAcesso().getNivelAcesso().getDescricao()); |
92 | processoDoc.setField("formatoDocumento", ""); | 95 | processoDoc.setField("formatoDocumento", ""); |
93 | 96 | ||
@@ -108,31 +111,36 @@ public class SolrServiceImpl implements SolrService { | @@ -108,31 +111,36 @@ public class SolrServiceImpl implements SolrService { | ||
108 | SolrClient solrClient = new HttpSolrClient(solrServer); | 111 | SolrClient solrClient = new HttpSolrClient(solrServer); |
109 | 112 | ||
110 | // Add some example docs | 113 | // Add some example docs |
111 | - SolrInputDocument processoDoc = new SolrInputDocument(); | 114 | + SolrInputDocument documentoDoc = new SolrInputDocument(); |
112 | 115 | ||
113 | StringBuilder sb = new StringBuilder(); | 116 | StringBuilder sb = new StringBuilder(); |
114 | 117 | ||
115 | sb.append("doc_").append(documentoGed.getIdRaiz() != null ? documentoGed.getIdRaiz() : documentoGed.getId()); | 118 | sb.append("doc_").append(documentoGed.getIdRaiz() != null ? documentoGed.getIdRaiz() : documentoGed.getId()); |
116 | 119 | ||
117 | - processoDoc.setField("id", "doc_" + sb.toString()); | ||
118 | - processoDoc.setField("nup", documentoGed.getNumero()); | ||
119 | - processoDoc.setField("objeto", "Documento"); | ||
120 | - processoDoc.setField("tipoProcesso", ""); | ||
121 | - processoDoc.setField("tipoDocumento", documentoGed.getTipoDocumento().getNome()); | ||
122 | - processoDoc.setField("assunto", documentoGed.getPlanoClassificacao().getNome()); | ||
123 | - processoDoc.setField("assuntoComplementar", documentoGed.getAssuntoComplementar()); | ||
124 | - processoDoc.setField("autor", documentoGed.getAutor().getUsername()); | ||
125 | - processoDoc.setField("destinatario", ""); | ||
126 | - processoDoc.setField("atribuidoA", ""); | ||
127 | - processoDoc.setField("unidadeGeradora", documentoGed.getUnidade().getNome()); | ||
128 | - processoDoc.setField("dataCriacao", out.format(documentoGed.getDataCriacao().getTime())); | ||
129 | - processoDoc.setField("situacao", ""); | ||
130 | - | ||
131 | - // processoDoc.setField("nivelAcesso", documentoGed.getNivelAcesso().getNivelAcessoDescricao()); | ||
132 | - processoDoc.setField("formatoDocumento", ""); | ||
133 | - processoDoc.setField("conteudo", documentoGed.getConteudo()); | ||
134 | - | ||
135 | - solrClient.add(processoDoc); | 120 | + documentoDoc.setField("id", "doc_" + sb.toString()); |
121 | + documentoDoc.setField("nup", documentoGed.getNumero()); | ||
122 | + documentoDoc.setField("objeto", "Documento"); | ||
123 | + documentoDoc.setField("tipoDocumento", documentoGed.getTipoDocumento().getNome()); | ||
124 | + documentoDoc.setField("assunto", documentoGed.getPlanoClassificacao().getNome()); | ||
125 | + documentoDoc.setField("assuntoComplementar", documentoGed.getAssuntoComplementar()); | ||
126 | + documentoDoc.setField("autor", documentoGed.getAutor().getUsername()); | ||
127 | + documentoDoc.setField("destinatario", UtilObjeto.isReferencia(documentoGed.getDestinatario()) ? documentoGed.getDestinatario().getNome() : ""); | ||
128 | + documentoDoc.setField("atribuidoA", ""); | ||
129 | + documentoDoc.setField("unidadeGeradora", documentoGed.getUnidade().getNome()); | ||
130 | + documentoDoc.setField("dataCriacao", out.format(documentoGed.getDataCriacao().getTime())); | ||
131 | + documentoDoc.setField("situacao", ""); | ||
132 | + documentoDoc.setField("nivelAcesso", documentoGed.getNivelAcesso().getNivelAcesso().getDescricao()); | ||
133 | + documentoDoc.setField("formatoDocumento", documentoGed.getFormaCriacao().getDescricao()); | ||
134 | + // verifica se o nivel de acesso é restrito | ||
135 | + if (!documentoGed.getNivelAcesso().getNivelAcesso().getCodigo().equals(1L)) { | ||
136 | + | ||
137 | + documentoDoc.setField("conteudo", documentoGed.getFormaCriacao().getCodigo().equals(1L) ? Jsoup.parse(documentoGed.getConteudo()).text() : documentoGed.getConteudo()); | ||
138 | + } else { | ||
139 | + | ||
140 | + documentoDoc.setField("conteudo", INFORMAÇÃO_RESTRITA); | ||
141 | + } | ||
142 | + | ||
143 | + solrClient.add(documentoDoc); | ||
136 | 144 | ||
137 | // Make the docs we just added searchable using a "hard" commit | 145 | // Make the docs we just added searchable using a "hard" commit |
138 | solrClient.commit(true, true); | 146 | solrClient.commit(true, true); |
cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java
@@ -203,6 +203,18 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | @@ -203,6 +203,18 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | ||
203 | 203 | ||
204 | list.add(new Dominio("statusProcesso", "Concluído", "CONCLUIDO", 1L)); | 204 | list.add(new Dominio("statusProcesso", "Concluído", "CONCLUIDO", 1L)); |
205 | list.add(new Dominio("statusProcesso", "Em andamento", "EM_ANDAMENTO", 2L)); | 205 | list.add(new Dominio("statusProcesso", "Em andamento", "EM_ANDAMENTO", 2L)); |
206 | + | ||
207 | + list.add(new Dominio("filtroPesquisa", "Ambos", "AMBOS", 0L)); | ||
208 | + list.add(new Dominio("filtroPesquisa", "Processo", "PROCESSO", 1L)); | ||
209 | + list.add(new Dominio("filtroPesquisa", "Documento", "DOCUMENTO", 2L)); | ||
210 | + | ||
211 | + list.add(new Dominio("filtroData", "Em qualquer data", "QUAL_QUER_DATA", 0L)); | ||
212 | + list.add(new Dominio("filtroData", "Na última hora", "ULTIMA_HORA", 1L)); | ||
213 | + list.add(new Dominio("filtroData", "Nas últimas 24 horas", "ULTIMAS_24_HORA", 2L)); | ||
214 | + list.add(new Dominio("filtroData", "Na última semana", "ULTIMA_SEMANA", 3L)); | ||
215 | + list.add(new Dominio("filtroData", "No último mês", "ULTIMO_MES", 4L)); | ||
216 | + list.add(new Dominio("filtroData", "No último ano", "ULTIMO_ANO", 5L)); | ||
217 | + list.add(new Dominio("filtroData", "Intervalo personalizado", "INTERVALO_PERSONALIZADO", 6L)); | ||
206 | 218 | ||
207 | list.add(new Dominio("tipoAssinatura", "Assinatura interna", "ASSINATURA_INTERNA", 1L)); | 219 | list.add(new Dominio("tipoAssinatura", "Assinatura interna", "ASSINATURA_INTERNA", 1L)); |
208 | list.add(new Dominio("tipoAssinatura", "Assinatura por certificado digital", "ASSINATURA_CERTIFICADO_DIGITAL", 2L)); | 220 | list.add(new Dominio("tipoAssinatura", "Assinatura por certificado digital", "ASSINATURA_CERTIFICADO_DIGITAL", 2L)); |
@@ -424,6 +436,11 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | @@ -424,6 +436,11 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen | ||
424 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.CERTIFICADO_DIGITAL", "Certificado Digital", dominio, modulo)); | 436 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.CERTIFICADO_DIGITAL", "Certificado Digital", dominio, modulo)); |
425 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINATURA_DOCUMENTO", "Assinatura de Documento", dominio, modulo)); | 437 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINATURA_DOCUMENTO", "Assinatura de Documento", dominio, modulo)); |
426 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINAR", "Assinar", dominio, modulo)); | 438 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINAR", "Assinar", dominio, modulo)); |
439 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.UNIDADE_GESTORA ", "Unidade gestora", dominio, modulo)); | ||
440 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DATA_CRIACAO ", "Data criação", dominio, modulo)); | ||
441 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.PLACEHOLDER_PESQUISA ", "Digite o Nup, tipo de processo, tipo de documento, conteúdo do documento, autor, assunto, destinatário...", dominio, modulo)); | ||
442 | + internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ATE ", "Até", dominio, modulo)); | ||
443 | + | ||
427 | } | 444 | } |
428 | 445 | ||
429 | /** | 446 | /** |
cit-ecm-web/src/main/webapp/assets/css/gerenciarProcesso.css
@@ -93,6 +93,13 @@ | @@ -93,6 +93,13 @@ | ||
93 | vertical-align: middle; | 93 | vertical-align: middle; |
94 | } | 94 | } |
95 | 95 | ||
96 | +.profile-info-label { | ||
97 | + | ||
98 | + font-weight: 400; | ||
99 | + color: #667E99; | ||
100 | + background-color: transparent; | ||
101 | +} | ||
102 | + | ||
96 | .profile-info-row:first-child .profile-info-name,.profile-info-row:first-child .profile-info-value | 103 | .profile-info-row:first-child .profile-info-name,.profile-info-row:first-child .profile-info-value |
97 | { | 104 | { |
98 | border-top: none; | 105 | border-top: none; |
@@ -143,3 +150,66 @@ | @@ -143,3 +150,66 @@ | ||
143 | margin-top: 10px; | 150 | margin-top: 10px; |
144 | } | 151 | } |
145 | 152 | ||
153 | +.filters{ | ||
154 | + border-radius: .3em; | ||
155 | + background-clip: padding-box; | ||
156 | + background: #fff; | ||
157 | + left: 0; | ||
158 | + top: -0.1em; | ||
159 | + display: block; | ||
160 | + content: ""; | ||
161 | +} | ||
162 | + | ||
163 | +.itens{ | ||
164 | + color: #757575; | ||
165 | + padding: 0 | ||
166 | +} | ||
167 | + | ||
168 | +.qtd{ | ||
169 | + | ||
170 | + background: #fff; | ||
171 | + border-radius: 5px; | ||
172 | + background-clip: padding-box; | ||
173 | + float: right; | ||
174 | + font-size: 1em; | ||
175 | + font-weight: normal; | ||
176 | + color: #ccc; | ||
177 | + text-align: right; | ||
178 | +} | ||
179 | + | ||
180 | +.filters_list { | ||
181 | + color: #757575; | ||
182 | + margin: 0; | ||
183 | + list-style: none; | ||
184 | + padding: 0 0 1em 0; | ||
185 | +} | ||
186 | + | ||
187 | +.result_pesquisa{ | ||
188 | + | ||
189 | + color: #545454; | ||
190 | + padding-bottom: 20px; | ||
191 | + padding-top: 20px; | ||
192 | +} | ||
193 | + | ||
194 | +.result_metadado{ | ||
195 | + font-weight: bold; | ||
196 | +} | ||
197 | +.result_metadado_restrito{ | ||
198 | + color: #F0AD4E; | ||
199 | +} | ||
200 | + | ||
201 | +.odd_result_metadado{ | ||
202 | + background-color: #f4f4f4; | ||
203 | +} | ||
204 | + | ||
205 | +.even_result_metadado{ | ||
206 | + | ||
207 | +background-color: #f2f2f2; | ||
208 | +} | ||
209 | + | ||
210 | +.filter_list_layout{ | ||
211 | + | ||
212 | +background-color: rgba(245, 245, 245, 0.61); | ||
213 | +} | ||
214 | + | ||
215 | + | ||
146 | \ No newline at end of file | 216 | \ No newline at end of file |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/SolrSearchController.js
@@ -26,15 +26,10 @@ | @@ -26,15 +26,10 @@ | ||
26 | * @param Utils | 26 | * @param Utils |
27 | */ | 27 | */ |
28 | 28 | ||
29 | -citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route','$routeParams','$window','$timeout','SolrSearchService','Utils', | ||
30 | - function SolrSearchController($scope, $attrs, $location, $route, $routeParams, $window, $timeout, SolrSearchService, Utils) { | 29 | +citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route','$routeParams','$window','$timeout','SolrSearchService','Utils', "$compile", 'DominioRepository', '$filter', |
30 | + function SolrSearchController($scope, $attrs, $location, $route, $routeParams, $window, $timeout, SolrSearchService, Utils, $compile, DominioRepository, $filter) { | ||
31 | 31 | ||
32 | $scope.searchHintsField = 'tipoProcesso,tipoDocumento,objeto,assunto,autor,atribuidoA,destinatario,unidadeGeradora,situacao,nivelAcesso,dataCriacao'; | 32 | $scope.searchHintsField = 'tipoProcesso,tipoDocumento,objeto,assunto,autor,atribuidoA,destinatario,unidadeGeradora,situacao,nivelAcesso,dataCriacao'; |
33 | - | ||
34 | - var KEY_ENTER = '13'; | ||
35 | - var KEY_ESCAPE = '27'; | ||
36 | - var KEY_ARROW_UP = '38'; | ||
37 | - var KEY_ARROW_DOWN = '40'; | ||
38 | 33 | ||
39 | // instructional message to aid the user in constructing a query | 34 | // instructional message to aid the user in constructing a query |
40 | $scope.messages = [ | 35 | $scope.messages = [ |
@@ -99,8 +94,16 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -99,8 +94,16 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
99 | 94 | ||
100 | // user query | 95 | // user query |
101 | $scope.userquery = ''; | 96 | $scope.userquery = ''; |
97 | + | ||
98 | + //parametro para pesquisa | ||
99 | + $scope.parameterPesquisa = {}; | ||
100 | + | ||
101 | + //Parameters | ||
102 | + $scope.queryParameters = []; | ||
102 | 103 | ||
103 | - /////////////////////////////////////////////////////////////////////////// | 104 | + //Date parameter |
105 | + $scope.dateMathFilter = ""; | ||
106 | + | ||
104 | 107 | ||
105 | /** | 108 | /** |
106 | * A page in a pagination list | 109 | * A page in a pagination list |
@@ -124,7 +127,13 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -124,7 +127,13 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
124 | query.setOption("rows", "10"); | 127 | query.setOption("rows", "10"); |
125 | query.setOption("facet", "true"); | 128 | query.setOption("facet", "true"); |
126 | query.setOption("facet.limit", $scope.maxHints); | 129 | query.setOption("facet.limit", $scope.maxHints); |
127 | - query.setOption('start', $scope.start * $scope.documentsPerPage); | 130 | + query.setOption('start', $scope.start * $scope.documentsPerPage - 10); |
131 | + | ||
132 | + //Verifica se foi selecionado filtro de data | ||
133 | + if($scope.dateMathFilter != ""){ | ||
134 | + | ||
135 | + query.setOption("fq", $scope.dateMathFilter); | ||
136 | + } | ||
128 | 137 | ||
129 | var hints = $scope.searchHintsField.split(','); | 138 | var hints = $scope.searchHintsField.split(','); |
130 | for(var i = 0; i < hints.length; i++){ | 139 | for(var i = 0; i < hints.length; i++){ |
@@ -133,6 +142,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -133,6 +142,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
133 | 142 | ||
134 | query.setNearMatch($scope.nearMatch); | 143 | query.setNearMatch($scope.nearMatch); |
135 | query.setUserQuery($scope.userQuery); | 144 | query.setUserQuery($scope.userQuery); |
145 | + query.setQueryParameters($scope.queryParameters); | ||
136 | SolrSearchService.setQuery($scope.queryName, query); | 146 | SolrSearchService.setQuery($scope.queryName, query); |
137 | SolrSearchService.updateQuery($scope.queryName); | 147 | SolrSearchService.updateQuery($scope.queryName); |
138 | }, 350); | 148 | }, 350); |
@@ -152,6 +162,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -152,6 +162,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
152 | // get new results | 162 | // get new results |
153 | var results = SolrSearchService.getResponse($scope.queryName); | 163 | var results = SolrSearchService.getResponse($scope.queryName); |
154 | if (results && results.docs) { | 164 | if (results && results.docs) { |
165 | + | ||
155 | $scope.totalResults = results.numFound; | 166 | $scope.totalResults = results.numFound; |
156 | // calculate the total number of pages and sets | 167 | // calculate the total number of pages and sets |
157 | $scope.totalPages = Math.ceil($scope.totalResults / $scope.documentsPerPage); | 168 | $scope.totalPages = Math.ceil($scope.totalResults / $scope.documentsPerPage); |
@@ -161,6 +172,24 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -161,6 +172,24 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
161 | // clean up document fields | 172 | // clean up document fields |
162 | results.docs[i].fromDate = Utils.formatDate(results.docs[i].fromDate); | 173 | results.docs[i].fromDate = Utils.formatDate(results.docs[i].fromDate); |
163 | results.docs[i].toDate = Utils.formatDate(results.docs[i].toDate); | 174 | results.docs[i].toDate = Utils.formatDate(results.docs[i].toDate); |
175 | + | ||
176 | + if(results.docs[i].objeto == 'Documento' && SolrSearchService.queries.defaultQuery.highlighting){ | ||
177 | + | ||
178 | + var object = results.docs[i].id; | ||
179 | + | ||
180 | + if(SolrSearchService.queries.defaultQuery.highlighting[object].conteudo){ | ||
181 | + | ||
182 | + var highlightings = SolrSearchService.queries.defaultQuery.highlighting[object]; | ||
183 | + | ||
184 | + results.docs[i].conteudo = ""; | ||
185 | + | ||
186 | + angular.forEach(highlightings, function (item) { | ||
187 | + results.docs[i].conteudo = results.docs[i].conteudo + item; | ||
188 | + }); | ||
189 | + | ||
190 | + } | ||
191 | + } | ||
192 | + | ||
164 | // add to result list | 193 | // add to result list |
165 | $scope.documents.push(results.docs[i]); | 194 | $scope.documents.push(results.docs[i]); |
166 | } | 195 | } |
@@ -187,23 +216,37 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -187,23 +216,37 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
187 | if (result) { | 216 | if (result) { |
188 | var myArray = new Array(); | 217 | var myArray = new Array(); |
189 | for (var i = 0; i < result.length; i += 2) { | 218 | for (var i = 0; i < result.length; i += 2) { |
190 | - var hint = { | 219 | + //Verifica se o filtro está vazio |
220 | + if(result[i] != "" && result[i + 1] > 0){ | ||
221 | + var hint = { | ||
191 | name: Object.keys(results.facet_fields)[j], | 222 | name: Object.keys(results.facet_fields)[j], |
192 | title: result[i], | 223 | title: result[i], |
193 | quantidade: result[i + 1], | 224 | quantidade: result[i + 1], |
194 | selected: false | 225 | selected: false |
195 | - }; | ||
196 | - myArray.push(hint); | 226 | + }; |
227 | + myArray.push(hint); | ||
228 | + } | ||
197 | } | 229 | } |
198 | 230 | ||
199 | $scope.hints[$scope.hintFields[j]] = myArray; | 231 | $scope.hints[$scope.hintFields[j]] = myArray; |
200 | } | 232 | } |
201 | } | 233 | } |
202 | } | 234 | } |
235 | + | ||
203 | }else{ | 236 | }else{ |
204 | 237 | ||
205 | $scope.apresentarMsgSemResultado = true; | 238 | $scope.apresentarMsgSemResultado = true; |
206 | } | 239 | } |
240 | + $timeout(function(){ | ||
241 | + angular.forEach($scope.documents, function (item) { | ||
242 | + | ||
243 | + if(item.objeto == 'Documento'){ | ||
244 | + | ||
245 | + document.getElementById(item.id).innerHTML = item.conteudo ; | ||
246 | + } | ||
247 | + | ||
248 | + }); | ||
249 | + }); | ||
207 | 250 | ||
208 | // update the page index | 251 | // update the page index |
209 | $scope.updatePageIndex(); | 252 | $scope.updatePageIndex(); |
@@ -283,60 +326,38 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -283,60 +326,38 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
283 | * @param event | 326 | * @param event |
284 | */ | 327 | */ |
285 | $scope.onkeyup = function (event) { | 328 | $scope.onkeyup = function (event) { |
286 | - $scope.showHints = true; | ||
287 | - if (event.keyCode == KEY_ENTER) { | ||
288 | - if ($scope.selectedHint != -1) { | ||
289 | - $scope.selectHint($scope.selectedHint); | ||
290 | - } | ||
291 | - $scope.handleSubmit(); | ||
292 | - $scope.onblur(); | ||
293 | - } | ||
294 | - else if (event.keyCode == KEY_ESCAPE) { | ||
295 | - $scope.showHints = false; | ||
296 | - $scope.resetHintSelection(); | ||
297 | - $scope.$apply(); | ||
298 | - } | ||
299 | - else if (event.keyCode == KEY_ARROW_UP) { | ||
300 | - $scope.clearHintSelection(); | ||
301 | - if ($scope.selectedHint < 1) { | ||
302 | - $scope.selectedHint = $scope.hints.length - 1; | ||
303 | - } else { | ||
304 | - $scope.selectedHint -= 1; | ||
305 | - } | ||
306 | - $scope.highlightHint($scope.selectedHint); | ||
307 | - } | ||
308 | - else if (event.keyCode == KEY_ARROW_DOWN) { | ||
309 | - $scope.clearHintSelection(); | ||
310 | - if ($scope.selectedHint < $scope.hints.length - 1) { | ||
311 | - $scope.selectedHint += 1; | ||
312 | - } else { | ||
313 | - $scope.selectedHint = 0; | ||
314 | - } | ||
315 | - $scope.highlightHint($scope.selectedHint); | ||
316 | - } | ||
317 | - // if the current query meets the minimum requirements, | ||
318 | - // get the list of search hints | ||
319 | - else if ($scope.userQuery.length >= $scope.minSearchLength) { | 329 | + |
330 | + if ($scope.userQuery && $scope.userQuery.length >= $scope.minSearchLength) { | ||
320 | if ($scope.timeout) $timeout.cancel($scope.timeout); | 331 | if ($scope.timeout) $timeout.cancel($scope.timeout); |
321 | - $scope.timeout = $timeout(function () { | ||
322 | - var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | ||
323 | - query.setOption("rows", "10"); | ||
324 | - query.setOption("facet", "true"); | ||
325 | - query.setOption("facet.limit", $scope.maxHints); | ||
326 | - | ||
327 | - var hints = $scope.searchHintsField.split(','); | ||
328 | - for(var i = 0; i < hints.length; i++){ | ||
329 | - query.setOption("facet.field#" + i, hints[i]); | ||
330 | - } | ||
331 | - | ||
332 | - query.setNearMatch($scope.nearMatch); | ||
333 | - query.setUserQuery($scope.userQuery); | ||
334 | - SolrSearchService.setQuery($scope.queryName, query); | ||
335 | - SolrSearchService.updateQuery($scope.queryName); | 332 | + $scope.timeout = $timeout(function () { |
333 | + var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | ||
334 | + query.setOption("rows", "10"); | ||
335 | + query.setOption("facet", "true"); | ||
336 | + query.setOption("facet.limit", $scope.maxHints); | ||
337 | + | ||
338 | + //Verifica se foi selecionado filtro de data | ||
339 | + if($scope.dateMathFilter != ""){ | ||
340 | + | ||
341 | + query.setOption("fq", $scope.dateMathFilter); | ||
342 | + } | ||
343 | + | ||
344 | + var hints = $scope.searchHintsField.split(','); | ||
345 | + for(var i = 0; i < hints.length; i++){ | ||
346 | + query.setOption("facet.field#" + i, hints[i]); | ||
347 | + } | ||
348 | + | ||
349 | + query.setNearMatch($scope.nearMatch); | ||
350 | + query.setUserQuery($scope.userQuery); | ||
351 | + query.setQueryParameters($scope.queryParameters); | ||
352 | + | ||
353 | + SolrSearchService.setQuery($scope.queryName, query); | ||
354 | + SolrSearchService.updateQuery($scope.queryName); | ||
336 | }, 350); | 355 | }, 350); |
337 | }else{ | 356 | }else{ |
338 | 357 | ||
339 | $scope.apresentarMsgSemResultado = false; | 358 | $scope.apresentarMsgSemResultado = false; |
359 | + | ||
360 | + $scope.documents = []; | ||
340 | } | 361 | } |
341 | }; | 362 | }; |
342 | 363 | ||
@@ -404,14 +425,183 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | @@ -404,14 +425,183 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route | ||
404 | SolrSearchService.updateQuery($scope.queryName); | 425 | SolrSearchService.updateQuery($scope.queryName); |
405 | }, 350); | 426 | }, 350); |
406 | 427 | ||
407 | - console.log("ally "+ query) | ||
408 | }; | 428 | }; |
409 | 429 | ||
410 | $scope.selectHint = function (nameIndex, index) { | 430 | $scope.selectHint = function (nameIndex, index) { |
411 | var hint = $scope.hints[nameIndex][index]; | 431 | var hint = $scope.hints[nameIndex][index]; |
412 | - $scope.userQuery = hint.title; | 432 | + var userQuery = hint.title; |
433 | + $scope.aplicarFilter(userQuery); | ||
413 | }; | 434 | }; |
414 | 435 | ||
436 | + $scope.aplicarFilter = function(valueFilter){ | ||
437 | + // clean up the user query | ||
438 | + var trimmed = Utils.trim(valueFilter); | ||
439 | + if (trimmed === '') { | ||
440 | + valueFilter = "*:*"; | ||
441 | + } | ||
442 | + $scope.timeout = $timeout(function () { | ||
443 | + var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | ||
444 | + query.setOption("rows", "10"); | ||
445 | + query.setOption("facet", "true"); | ||
446 | + query.setOption("facet.limit", $scope.maxHints); | ||
447 | + | ||
448 | + var hints = $scope.searchHintsField.split(','); | ||
449 | + for(var i = 0; i < hints.length; i++){ | ||
450 | + query.setOption("facet.field#" + i, hints[i]); | ||
451 | + } | ||
452 | + | ||
453 | + query.setNearMatch($scope.nearMatch); | ||
454 | + query.setUserQuery(valueFilter); | ||
455 | + SolrSearchService.setQuery($scope.queryName, query); | ||
456 | + SolrSearchService.updateQuery($scope.queryName); | ||
457 | + }, 350); | ||
458 | + }; | ||
459 | + | ||
460 | + //limpar os filtros da tela | ||
461 | + $scope.cleanFilters = function(){ | ||
462 | + | ||
463 | + $scope.documents = []; | ||
464 | + $scope.userQuery = ""; | ||
465 | + $scope.hints = []; | ||
466 | + $scope.parameterDatePesquisa = $.grep($scope.filtroDateList, function(e){ return e.codigo == 0; })[0].originalElement; | ||
467 | + }; | ||
468 | + | ||
469 | + //Adicionar os parametro processo | ||
470 | + $scope.addParameter = function(){ | ||
471 | + | ||
472 | + $timeout(function () { | ||
473 | + //verifica se o parametro é ambos | ||
474 | + if($scope.parameterPesquisa.codigo == 0){ | ||
475 | + | ||
476 | + $scope.removeQueryParameter("AND objeto: Processo "); | ||
477 | + | ||
478 | + $scope.removeQueryParameter("AND objeto: Documento "); | ||
479 | + $scope.onkeyup(); | ||
480 | + | ||
481 | + //verifica se o parametro é processo | ||
482 | + }else if($scope.parameterPesquisa.codigo == 1){ | ||
483 | + | ||
484 | + $scope.addQueryParameter("AND objeto: Processo "); | ||
485 | + $scope.removeQueryParameter("AND objeto: Documento "); | ||
486 | + $scope.onkeyup(); | ||
487 | + //verifica se o parametro é documento | ||
488 | + }else if($scope.parameterPesquisa.codigo == 2){ | ||
489 | + | ||
490 | + $scope.addQueryParameter("AND objeto: Documento "); | ||
491 | + $scope.removeQueryParameter("AND objeto: Processo "); | ||
492 | + $scope.onkeyup(); | ||
493 | + } | ||
494 | + }); | ||
495 | + | ||
496 | + }; | ||
497 | + | ||
498 | + //adicionar o parametro de data | ||
499 | + $scope.addParameterDate = function(){ | ||
500 | + | ||
501 | + $timeout(function () { | ||
502 | + | ||
503 | + if($scope.parameterDatePesquisa.codigo == 0){ | ||
504 | + | ||
505 | + $scope.dateMathFilter = ""; | ||
506 | + | ||
507 | + $scope.onkeyup(); | ||
508 | + | ||
509 | + //Última Hora | ||
510 | + }else if($scope.parameterDatePesquisa.codigo == 1){ | ||
511 | + | ||
512 | + var date = new Date(); | ||
513 | + date.setHours(date.getHours() - 1); | ||
514 | + | ||
515 | + var dataUltimaHora = $filter('date')(date, "yyyy-MM-dd'T'HH:mm:ss'Z'"); | ||
516 | + | ||
517 | + $scope.dateMathFilter = "dataCriacao:["+dataUltimaHora+" TO NOW]"; | ||
518 | + $scope.onkeyup(); | ||
519 | + //Útimas 24 horas | ||
520 | + }else if($scope.parameterDatePesquisa.codigo == 2){ | ||
521 | + | ||
522 | + $scope.dateMathFilter = "dataCriacao:[NOW-1DAY TO NOW]"; | ||
523 | + $scope.onkeyup(); | ||
524 | + //Última semana | ||
525 | + }else if($scope.parameterDatePesquisa.codigo == 3){ | ||
526 | + | ||
527 | + $scope.dateMathFilter = "dataCriacao:[NOW-7DAY TO NOW]"; | ||
528 | + $scope.onkeyup(); | ||
529 | + //Último mês | ||
530 | + }else if($scope.parameterDatePesquisa.codigo == 4){ | ||
531 | + | ||
532 | + $scope.dateMathFilter = "dataCriacao:[NOW-31DAY TO NOW]"; | ||
533 | + $scope.onkeyup(); | ||
534 | + //Útimo ano | ||
535 | + }else if($scope.parameterDatePesquisa.codigo == 5){ | ||
536 | + | ||
537 | + $scope.dateMathFilter = "dataCriacao:[NOW-365DAY TO NOW]"; | ||
538 | + $scope.onkeyup(); | ||
539 | + } | ||
540 | + }); | ||
541 | + | ||
542 | + }; | ||
543 | + | ||
544 | + //adiciona o filtro entre datas | ||
545 | + $scope.addParameterDatePersonalisada = function(){ | ||
546 | + | ||
547 | + var dataInicioFormat = $filter('date')($scope.dataInicioFiltro, "yyyy-MM-dd'T'HH:mm:ss'Z'"); | ||
548 | + | ||
549 | + var dataFimFormat = $filter('date')($scope.dataFimFiltro, "yyyy-MM-dd'T'HH:mm:ss'Z'"); | ||
550 | + | ||
551 | + if($scope.dataInicioFiltro && $scope.dataFimFiltro){ | ||
552 | + | ||
553 | + $scope.dateMathFilter = "dataCriacao:["+dataInicioFormat+" TO "+dataFimFormat+ "]"; | ||
554 | + | ||
555 | + $scope.onkeyup(); | ||
556 | + }else{ | ||
557 | + | ||
558 | + $scope.dateMathFilter = ""; | ||
559 | + } | ||
560 | + | ||
561 | + | ||
562 | + }; | ||
563 | + | ||
564 | + /** | ||
565 | + * Add a query parameter. The parameter setting is added only if it is | ||
566 | + * unique. | ||
567 | + * @param Parameter | ||
568 | + */ | ||
569 | + $scope.addQueryParameter = function(Parameter) { | ||
570 | + for (var i=0; i<$scope.queryParameters.length;i++) { | ||
571 | + if ($scope.queryParameters[i] == Parameter) { | ||
572 | + return; | ||
573 | + } | ||
574 | + } | ||
575 | + $scope.queryParameters.push(Parameter); | ||
576 | + }; | ||
577 | + | ||
578 | + /** | ||
579 | + * remove a query parameter | ||
580 | + * unique. | ||
581 | + * @param Parameter | ||
582 | + */ | ||
583 | + $scope.removeQueryParameter = function(Parameter) { | ||
584 | + for (var i=0;i<$scope.queryParameters.length;i++) { | ||
585 | + if ($scope.queryParameters[i] == Parameter) { | ||
586 | + $scope.queryParameters.splice(i, 1); | ||
587 | + } | ||
588 | + } | ||
589 | + }; | ||
590 | + | ||
591 | + DominioRepository.findAllDominio('filtroPesquisa').then(function(result) { | ||
592 | + $scope.filtroPesquisaList = result; | ||
593 | + | ||
594 | + $scope.parameterPesquisa = $.grep($scope.filtroPesquisaList, function(e){ return e.codigo == 0; })[0].originalElement; | ||
595 | + }); | ||
596 | + | ||
597 | + DominioRepository.findAllDominio('filtroData').then(function(result) { | ||
598 | + $scope.filtroDateList = $filter('orderBy')(result, "codigo"); | ||
599 | + | ||
600 | + $scope.parameterDatePesquisa = $.grep($scope.filtroDateList, function(e){ return e.codigo == 0; })[0].originalElement; | ||
601 | + | ||
602 | + }); | ||
603 | + | ||
604 | + | ||
415 | $scope.init(); | 605 | $scope.init(); |
416 | }]); | 606 | }]); |
417 | 607 |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/service/solr.js
@@ -135,6 +135,19 @@ function SolrQuery(Url) { | @@ -135,6 +135,19 @@ function SolrQuery(Url) { | ||
135 | } | 135 | } |
136 | self.queryParameters.push(Parameter); | 136 | self.queryParameters.push(Parameter); |
137 | }; | 137 | }; |
138 | + | ||
139 | + /** | ||
140 | + * remove a query parameter | ||
141 | + * unique. | ||
142 | + * @param Parameter | ||
143 | + */ | ||
144 | + self.removeQueryParameter = function(Parameter) { | ||
145 | + for (var i=0;i<self.queryParameters.length;i++) { | ||
146 | + if (self.queryParameters[i] == Parameter) { | ||
147 | + self.queryParameters.splice(i, 1); | ||
148 | + } | ||
149 | + } | ||
150 | + }; | ||
138 | 151 | ||
139 | /** | 152 | /** |
140 | * Create a new facet. | 153 | * Create a new facet. |
@@ -611,6 +624,7 @@ citApp.provider('SolrSearchService', function solrSearchServiceProvider() { | @@ -611,6 +624,7 @@ citApp.provider('SolrSearchService', function solrSearchServiceProvider() { | ||
611 | // get the named query, reset error state, get the query url | 624 | // get the named query, reset error state, get the query url |
612 | var query = svc.queries[QueryName]; | 625 | var query = svc.queries[QueryName]; |
613 | var url = query.getSolrQueryUrl(); | 626 | var url = query.getSolrQueryUrl(); |
627 | + url = url + "&hl=true&hl.fl=conteudo&hl.fragsize=300" | ||
614 | $log.debug("GET " + QueryName + ": " + url); | 628 | $log.debug("GET " + QueryName + ": " + url); |
615 | // execute the query | 629 | // execute the query |
616 | return $http.jsonp(url).then( | 630 | return $http.jsonp(url).then( |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/gerenciarProcessoList.html
@@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
4 | <div class="bar-buttons-action fixed"> | 4 | <div class="bar-buttons-action fixed"> |
5 | <div class="row"> | 5 | <div class="row"> |
6 | <div class="col-sm-12 text-left"> | 6 | <div class="col-sm-12 text-left"> |
7 | - <div ng-include src="urlCabecalho" /> </div> | ||
8 | - | 7 | + <div ng-include src="urlCabecalho" /> |
8 | + </div> | ||
9 | </div> | 9 | </div> |
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
cit-ecm-web/src/main/webapp/html/pesquisa/pesquisa.html
1 | +<link rel="stylesheet" href="/cit-ecm-web/assets/css/gerenciarProcesso.css" /> | ||
1 | <div id="searchProcesso" class="page-content" ng-controller="SolrSearchController as solrController"> | 2 | <div id="searchProcesso" class="page-content" ng-controller="SolrSearchController as solrController"> |
2 | <div class="bar-buttons-action fixed"> | 3 | <div class="bar-buttons-action fixed"> |
3 | <div class="row"> | 4 | <div class="row"> |
4 | <div class="col-sm-8 text-left"></div> | 5 | <div class="col-sm-8 text-left"></div> |
5 | - <!-- .col --> | ||
6 | 6 | ||
7 | <div class="col-sm-4 text-right"> | 7 | <div class="col-sm-4 text-right"> |
8 | <favorito /> | 8 | <favorito /> |
9 | <help-button workspace="workspace" /> | 9 | <help-button workspace="workspace" /> |
10 | </div> | 10 | </div> |
11 | - <!-- .col --> | ||
12 | </div> | 11 | </div> |
13 | - <!-- .row --> | ||
14 | </div> | 12 | </div> |
15 | - <!-- .bar-buttons-action --> | ||
16 | - | ||
17 | - <h1 class="title" align="center"> | ||
18 | - <translate>ECM.LABEL.SOLR_SEARCH_INTERFACE</translate> | ||
19 | - </h1> | ||
20 | - | ||
21 | <div class="row"> | 13 | <div class="row"> |
22 | - <div class="col-sm-12"> | ||
23 | - <form class="searchbox" name="solrForm"> | ||
24 | - <div class="input-group" id="inputs"> | ||
25 | - <input type="text" class="form-control" id="query" type="text" placeholder="{{placeHolder}}" ng-model="userQuery" autocomplete="off" ng-focus="onfocus()" ng-blur="onblur()" | ||
26 | - ng-keyup="onkeyup($event)"> | ||
27 | - <div class="input-group-btn"> | ||
28 | - <button class="btn btn-default" type="button" id="submit" name="submit" ng-click="handleSubmit()"> | ||
29 | - <i class="ace-icon fa fa-search icon-on-right bigger-110"></i> | ||
30 | - </button> | 14 | + <div class="col-sm-12" style="text-align: center;"> |
15 | + <h3> | ||
16 | + <translate>ECM.LABEL.SOLR_SEARCH_INTERFACE</translate> | ||
17 | + </h3> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | + <div class="widget-main clearfix"> | ||
21 | + <form class="searchbox" name="solrForm"> | ||
22 | + <div class="row"> | ||
23 | + <div class="col-sm-10"> | ||
24 | + <div class="input-group" id="inputs"> | ||
25 | + <input type="text" class="form-control" id="query" type="text" placeholder="{{$translate.instant('ECM.LABEL.PLACEHOLDER_PESQUISA')}}" ng-model="userQuery" autocomplete="off" ng-focus="onfocus()" | ||
26 | + ng-keyup="onkeyup($event)"> | ||
27 | + <div class="input-group-btn"> | ||
28 | + <button class="btn btn-default" type="button" id="submit" name="submit" ng-click="handleSubmit()"> | ||
29 | + <i class="ace-icon fa fa-search icon-on-right bigger-110"></i> | ||
30 | + </button> | ||
31 | + </div> | ||
31 | </div> | 32 | </div> |
32 | </div> | 33 | </div> |
33 | - | ||
34 | - <div class="row"> | ||
35 | - <div class="col-md-8" ng-show='userQuery != "" && apresentarMsgSemResultado'> | ||
36 | - </p><translate>ECM.LABEL.SUA_PESQUISA</translate>: <label style="font-weight: bold;">{{userQuery}} </label> | ||
37 | - </p><translate>ECM.LABEL.NENHUM_DOCUMENTO_CORRESPONDENTE</translate> | ||
38 | - </p><translate>ECM.LABEL.SUGESTOES</translate> | ||
39 | - <ul> | ||
40 | - <li style="list-style-type: disc;"><translate>ECM.LABEL.CERTIFIQUE_PALAVRAS_ESCRITAS_CORRETAMENTE</translate></li> | ||
41 | - <li style="list-style-type: disc;"> <translate>ECM.LABEL.TENTE_PALAVRAS_CHAVES_DIFERENTE</translate></li> | ||
42 | - <li style="list-style-type: disc;"><translate>ECM.LABEL.TENTE_PALAVRAS_CHAVES_MAIS_GENERICAS</translate></li> | ||
43 | - <li style="list-style-type: disc;"><translate>ECM.LABEL.TENTE_MENOS_PALAVRAS_CHAVES</translate></li> | ||
44 | - </ul> | ||
45 | - </div> | 34 | + <div class="col-sm-2"> |
35 | + <button class="btn btn-primary btn-inline btn-white table-header-item" ng-click="$showAdvancedFilters = !$showAdvancedFilters" type="button"> | ||
36 | + <i class="fa fa-filter"></i> | ||
37 | + <translate>LABEL.FILTROS_AVANCADOS</translate> | ||
38 | + </button> | ||
39 | + <button class="btn btn-primary btn-inline btn-white table-header-item" ng-click="cleanFilters()" type="button"> | ||
40 | + <i class="fa fa-eraser"></i> | ||
41 | + </button> | ||
46 | </div> | 42 | </div> |
47 | - | ||
48 | - <!-- div class="alert alert-warning" ng-show="loading" ng-cloak> | ||
49 | - <img | ||
50 | - src="http://upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif" | ||
51 | - class="icon" /> | ||
52 | - <h5> | ||
53 | - Processing... | ||
54 | - <button type="button" class="close" style="float: none;" | ||
55 | - data-dismiss="modal" aria-hidden="true">�</button> | ||
56 | - </h5> | ||
57 | </div> | 43 | </div> |
58 | 44 | ||
59 | - <div class="summary" ng-show="documents.length > 0" ng-cloak> | ||
60 | - <div style="padding-bottom: 20px;"> | ||
61 | - Search Results <span class="badge">{{totalResults}}</span> found | ||
62 | - </div> | ||
63 | - <div class="alert alert-warning" ng-show="error">{{error}}</div> | ||
64 | - <div class="alert alert-info" ng-show="message">{{message}}</div> | ||
65 | - </div--> | ||
66 | - | ||
67 | - </form> | ||
68 | - </div> | ||
69 | - </div> | 45 | + <div class="row"> |
70 | 46 | ||
71 | - <div class="row"> | ||
72 | - <div class="col-sm-2"> | ||
73 | - <div class="ecm-search-wrapper"> | ||
74 | - <div class="ecm-content-wrapper"> | ||
75 | - <ul class="list-group"> | ||
76 | - <li class="list-group-item document" ng-show="hints['tipoProcesso']"> | ||
77 | - <h5> | ||
78 | - <b translate>ECM.LABEL.DATACRIACAO</b> | ||
79 | - </h5> | ||
80 | - <ul> | ||
81 | - <li ng-repeat="hint in hints['dataCriacao']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('dataCriacao',$index);handleSubmit()">{{hint.title | date:'dd/MM/yyyy | ||
82 | - HH:mm:ss'}}</a> {{hint.quantidade}}</li> | ||
83 | - </ul> | ||
84 | - </li> | ||
85 | - <li class="list-group-item document" ng-show="hints['tipoProcesso']"> | ||
86 | - <h5> | ||
87 | - <b translate>ECM.LABEL.TIPOPROCESSO</b> | ||
88 | - </h5> | ||
89 | - <ul> | ||
90 | - <li ng-repeat="hint in hints['tipoProcesso']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('tipoProcesso',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 47 | + <div class="col-sm-2" ng-if="documents.length > 0"> |
48 | + <div class="ecm-search-wrapper"> | ||
49 | + <div class="ecm-content-wrapper"> | ||
50 | + <ul class="list-group"> | ||
51 | + <li class="list-group-item document" ng-show="hints['objeto']"> | ||
52 | + <h5> | ||
53 | + <b translate>ECM.LABEL.OBJETO</b> | ||
54 | + </h5> | ||
55 | + <ul class="filters_list"> | ||
56 | + <li ng-repeat="hint in hints['objeto']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('objeto',$index);" class="filters" | ||
57 | + ng-show="hint.quantidade > 0"> <span class="itens">{{hint.title}}</span> <span class="qtd">{{hint.quantidade}}</span> | ||
58 | + </a></li> | ||
59 | + </ul> | ||
91 | </li> | 60 | </li> |
92 | - </ul> | ||
93 | - </li> | ||
94 | - <li class="list-group-item document" ng-show="hints['tipoDocumento']"> | ||
95 | - <h5> | ||
96 | - <b translate>ECM.LABEL.DADOS_TIPODOCUMENTO</b> | ||
97 | - </h5> | ||
98 | - <ul> | ||
99 | - <li ng-repeat="hint in hints['tipoDocumento']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('tipoDocumento',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 61 | + |
62 | + <li class="list-group-item document" ng-show="hints['tipoProcesso'].length > 0"> | ||
63 | + <h5> | ||
64 | + <b translate>ECM.LABEL.TIPOPROCESSO</b> | ||
65 | + </h5> | ||
66 | + <ul class="filters_list"> | ||
67 | + <li ng-repeat="hint in hints['tipoProcesso']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('tipoProcesso',$index);" class="filters"> | ||
68 | + <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
69 | + </a></li> | ||
70 | + </ul> | ||
100 | </li> | 71 | </li> |
101 | - </ul> | ||
102 | - </li> | ||
103 | - <li class="list-group-item document" ng-show="hints['objeto']"> | ||
104 | - <h5> | ||
105 | - <b translate>ECM.LABEL.OBJETO</b> | ||
106 | - </h5> | ||
107 | - <ul> | ||
108 | - <li ng-repeat="hint in hints['objeto']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('objeto',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 72 | + |
73 | + <li class="list-group-item document" ng-show="hints['tipoDocumento'].length > 0"> | ||
74 | + <h5> | ||
75 | + <b translate>ECM.LABEL.TIPODOCUMENTO</b> | ||
76 | + </h5> | ||
77 | + <ul class="filters_list"> | ||
78 | + <li ng-repeat="hint in hints['tipoDocumento']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('tipoDocumento',$index);" class="filters"> | ||
79 | + <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
80 | + </a></li> | ||
81 | + </ul> | ||
109 | </li> | 82 | </li> |
110 | - </ul> | ||
111 | - </li> | ||
112 | - <li class="list-group-item document" ng-show="hints['assunto']"> | ||
113 | - <h5> | ||
114 | - <b translate>ECM.LABEL.ASSUNTO</b> | ||
115 | - </h5> | ||
116 | - <ul> | ||
117 | - <li ng-repeat="hint in hints['assunto']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('assunto',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 83 | + |
84 | + <li class="list-group-item document" ng-show="hints['assunto'].length > 0"> | ||
85 | + <h5> | ||
86 | + <b translate>ECM.LABEL.ASSUNTO</b> | ||
87 | + </h5> | ||
88 | + <ul class="filters_list"> | ||
89 | + <li ng-repeat="hint in hints['assunto']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('assunto',$index)" class="filters"> <span | ||
90 | + class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
91 | + </a></li> | ||
92 | + </ul> | ||
118 | </li> | 93 | </li> |
119 | - </ul> | ||
120 | - </li> | ||
121 | - <li class="list-group-item document" ng-show="hints['autor']"> | ||
122 | - <h5> | ||
123 | - <b translate>ECM.LABEL.AUTOR</b> | ||
124 | - </h5> | ||
125 | - <ul> | ||
126 | - <li ng-repeat="hint in hints['autor']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('autor',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 94 | + |
95 | + <li class="list-group-item document" ng-show="hints['autor'].length > 0"> | ||
96 | + <h5> | ||
97 | + <b translate>ECM.LABEL.AUTOR</b> | ||
98 | + </h5> | ||
99 | + <ul class="filters_list"> | ||
100 | + <li ng-repeat="hint in hints['autor']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('autor',$index)" class="filters"> <span | ||
101 | + class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
102 | + </a></li> | ||
103 | + </ul> | ||
127 | </li> | 104 | </li> |
128 | - </ul> | ||
129 | - </li> | ||
130 | - <li class="list-group-item document" ng-show="hints['atribuidoA']"> | ||
131 | - <h5> | ||
132 | - <b translate>ECM.LABEL.ATRIBUIDOA</b> | ||
133 | - </h5> | ||
134 | - <ul> | ||
135 | - <li ng-repeat="hint in hints['atribuidoA']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('atribuidoA',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 105 | + |
106 | + <li class="list-group-item document" ng-show="hints['destinatario'].length > 0"> | ||
107 | + <h5> | ||
108 | + <b translate>ECM.LABEL.DESTINATARIO</b> | ||
109 | + </h5> | ||
110 | + <ul class="filters_list"> | ||
111 | + <li ng-repeat="hint in hints['destinatario']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('destinatario',$index)" class="filters"> | ||
112 | + <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
113 | + </a></li> | ||
114 | + </ul> | ||
136 | </li> | 115 | </li> |
137 | - </ul> | ||
138 | - </li> | ||
139 | - <li class="list-group-item document" ng-show="hints['destinatario']"> | ||
140 | - <h5> | ||
141 | - <b translate>ECM.LABEL.DESTINATARIO</b> | ||
142 | - </h5> | ||
143 | - <ul> | ||
144 | - <li ng-repeat="hint in hints['destinatario']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('destinatario',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 116 | + |
117 | + <li class="list-group-item document" ng-show="hints['atribuidoA'].length > 0"> | ||
118 | + <h5> | ||
119 | + <b translate>ECM.LABEL.ATRIBUIDOA</b> | ||
120 | + </h5> | ||
121 | + <ul class="filters_list"> | ||
122 | + <li ng-repeat="hint in hints['atribuidoA']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('atribuidoA',$index)" class="filters"> <span | ||
123 | + class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
124 | + </a></li> | ||
125 | + </ul> | ||
145 | </li> | 126 | </li> |
146 | - </ul> | ||
147 | - </li> | ||
148 | - <li class="list-group-item document" ng-show="hints['unidadeGeradora']"> | ||
149 | - <h5> | ||
150 | - <b translate>ECM.LABEL.UNIDADE_GERADORA</b> | ||
151 | - </h5> | ||
152 | - <ul> | ||
153 | - <li ng-repeat="hint in hints['unidadeGeradora']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('unidadeGeradora',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 127 | + |
128 | + <li class="list-group-item document" ng-show="hints['unidadeGeradora'].length > 0"> | ||
129 | + <h5> | ||
130 | + <b translate>ECM.LABEL.UNIDADE_GERADORA</b> | ||
131 | + </h5> | ||
132 | + <ul class="filters_list"> | ||
133 | + <li ng-repeat="hint in hints['unidadeGeradora']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('unidadeGeradora',$index)" | ||
134 | + class="filters"> <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
135 | + </a></li> | ||
136 | + </ul> | ||
154 | </li> | 137 | </li> |
155 | - </ul> | ||
156 | - </li> | ||
157 | - <li class="list-group-item document" ng-show="hints['situacao']"> | ||
158 | - <h5> | ||
159 | - <b translate>LABEL.SITUACAO</b> | ||
160 | - </h5> | ||
161 | - <ul> | ||
162 | - <li ng-repeat="hint in hints['situacao']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('situacao',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 138 | + |
139 | + <li class="list-group-item document" ng-show="hints['situacao'].length > 0"> | ||
140 | + <h5> | ||
141 | + <b translate>LABEL.SITUACAO</b> | ||
142 | + </h5> | ||
143 | + <ul class="filters_list"> | ||
144 | + <li ng-repeat="hint in hints['situacao']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('situacao',$index)" class="filters"> <span | ||
145 | + class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
146 | + </a></li> | ||
147 | + </ul> | ||
163 | </li> | 148 | </li> |
164 | - </ul> | ||
165 | - </li> | ||
166 | - <li class="list-group-item document" ng-show="hints['nivelAcesso']"> | ||
167 | - <h5> | ||
168 | - <b translate>ECM.LABEL.NIVELACESSO</b> | ||
169 | - </h5> | ||
170 | - <ul> | ||
171 | - <li ng-repeat="hint in hints['nivelAcesso']" ng-class="{'selected' : hint.selected}"><a ng-click="selectHint('nivelAcesso',$index);handleSubmit()">{{hint.title}}</a> {{hint.quantidade}} | 149 | + |
150 | + <li class="list-group-item document" ng-show="hints['nivelAcesso'].length > 0"> | ||
151 | + <h5> | ||
152 | + <b translate>ECM.LABEL.NIVELACESSO</b> | ||
153 | + </h5> | ||
154 | + <ul class="filters_list"> | ||
155 | + <li ng-repeat="hint in hints['nivelAcesso']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('nivelAcesso',$index)" class="filters"> | ||
156 | + <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | ||
157 | + </a></li> | ||
158 | + </ul> | ||
172 | </li> | 159 | </li> |
160 | + | ||
173 | </ul> | 161 | </ul> |
174 | - </li> | ||
175 | - </ul> | 162 | + </div> |
163 | + </div> | ||
176 | </div> | 164 | </div> |
177 | - </div> | ||
178 | - </div> | ||
179 | - <div id="search-results" class="col-sm-10" ng-cloak> | ||
180 | - <!--Show documents--> | ||
181 | - <div class="ecm-content-wrapper"> | ||
182 | - <ul class="list-group"> | ||
183 | - <li class="list-group-item document" ng-repeat="doc in documents" ng-cloak> | ||
184 | - <div class="row"> | ||
185 | - <div class="col-md-12"> | ||
186 | - <a href="">{{doc.objeto == 'Documento' ? doc.numero : doc.nup}} - {{doc.objeto == 'Documento' ? doc.tipoDocumento : doc.tipoProcesso}}</a> <span class="label label-success pull-right" | ||
187 | - ng-show="doc.nivelAcesso == 'Publico' || doc.nivelAcesso == 'Público'">{{doc.nivelAcesso}}</span> <span class="label label-warning pull-right" ng-show="doc.nivelAcesso =='Restrito'">{{doc.nivelAcesso}}</span> | ||
188 | - <span class="label label-danger pull-right" ng-show="doc.nivelAcesso == 'Secreto'">{{doc.nivelAcesso}}</span> <span class="label label-gray pull-right" ng-show="doc.nivelAcesso == 'Reservado'">{{doc.nivelAcesso}}</span> | ||
189 | - <span class="label label-black pull-right" ng-show="doc.nivelAcesso == 'Ultrassecreto'">{{doc.nivelAcesso}}</span> | ||
190 | - </div> | 165 | + |
166 | + <div class="col-sm-10"> | ||
167 | + | ||
168 | + <div class="row" ng-show="$showAdvancedFilters" style="padding-top: 10px;"> | ||
169 | + <div class="col-sm-2"> | ||
170 | + <label-select ng-id="parameterPesquisa" ng-model="parameterPesquisa" ng-label="ECM.LABEL.OBJETO" form="solrForm" ng-list="filtroPesquisaList" | ||
171 | + ng-custom-options="dominio.originalElement as dominio.descricao for dominio" show-selecione='false' ng-custom-change="addParameter()"> </label-select> | ||
172 | + </div> | ||
173 | + | ||
174 | + <div class="col-sm-2"> | ||
175 | + <label-select ng-id="parameterDatePesquisa" ng-label="ECM.LABEL.DATA_CRIACAO" ng-model="parameterDatePesquisa" form="solrForm" ng-list="filtroDateList" | ||
176 | + ng-custom-options="dominio.originalElement as dominio.descricao for dominio" show-selecione='false' ng-custom-change="addParameterDate()"> </label-select> | ||
191 | </div> | 177 | </div> |
192 | - <div class="row"> | ||
193 | - <div class="col-md-12"> | ||
194 | - <a href="">{{doc.assunto}}</a> | 178 | + |
179 | + <div class='col-sm-2' ng-show="parameterDatePesquisa.codigo == 6"> | ||
180 | + <div class="form-group"> | ||
181 | + <label for="date-birth" class="control-label">De</label> | ||
182 | + <div class="control"> | ||
183 | + <input id="date-birth" class="form-control" type="date" ng-model="dataInicioFiltro" ng-change="addParameterDatePersonalisada();"> | ||
184 | + </div> | ||
195 | </div> | 185 | </div> |
196 | </div> | 186 | </div> |
197 | - <div class="row"> | ||
198 | - <div class="col-md-12"> | ||
199 | - <pre>{{doc.objeto == 'Documento' ? doc.conteudo :doc.assuntoComplementar}}</pre> | 187 | + |
188 | + <div class='col-sm-2' ng-show="parameterDatePesquisa.codigo == 6"> | ||
189 | + <div class="form-group"> | ||
190 | + <label for="date-birth" class="control-label"><translate>ECM.LABEL.ATE</translate></label> | ||
191 | + <div class="control"> | ||
192 | + <input id="date-birth" class="form-control" type="date" ng-model="dataFimFiltro" ng-change="addParameterDatePersonalisada();"> | ||
193 | + </div> | ||
200 | </div> | 194 | </div> |
201 | </div> | 195 | </div> |
196 | + </div> | ||
202 | 197 | ||
198 | + <div class="row"> | ||
199 | + <div class="col-md-8" ng-show='userQuery != "" && apresentarMsgSemResultado'> | ||
200 | + </p> | ||
201 | + <translate>ECM.LABEL.SUA_PESQUISA</translate> | ||
202 | + : <label style="font-weight: bold;">{{userQuery}} </label> | ||
203 | + </p> | ||
204 | + <translate>ECM.LABEL.NENHUM_DOCUMENTO_CORRESPONDENTE</translate> | ||
205 | + </p> | ||
206 | + <translate>ECM.LABEL.SUGESTOES</translate> | ||
207 | + <ul> | ||
208 | + <li style="list-style-type: disc;"><translate>ECM.LABEL.CERTIFIQUE_PALAVRAS_ESCRITAS_CORRETAMENTE</translate></li> | ||
209 | + <li style="list-style-type: disc;"><translate>ECM.LABEL.TENTE_PALAVRAS_CHAVES_DIFERENTE</translate></li> | ||
210 | + <li style="list-style-type: disc;"><translate>ECM.LABEL.TENTE_PALAVRAS_CHAVES_MAIS_GENERICAS</translate></li> | ||
211 | + <li style="list-style-type: disc;"><translate>ECM.LABEL.TENTE_MENOS_PALAVRAS_CHAVES</translate></li> | ||
212 | + </ul> | ||
213 | + </div> | ||
214 | + </div> | ||
203 | 215 | ||
204 | - <div class="row"> | ||
205 | - <div class="col-md-6">Unidade Geradora</div> | ||
206 | - <div class="col-md-4">Autor</div> | ||
207 | - <div class='col-sm-2'>Data Criação</div> | ||
208 | - </div> <!-- .row --> | ||
209 | - <div class="row"> | ||
210 | - <div class="col-md-6">{{doc.unidadeGeradora}}</div> | ||
211 | - <div class="col-md-4">{{doc.autor}}</div> | ||
212 | - <div class='col-sm-2'>{{doc.dataCriacao | date:'dd/MM/yyyy HH:mm:ss'}}</div> | ||
213 | - </div> <!-- .row --> | ||
214 | - </li> | ||
215 | - </ul> | ||
216 | - </div> | 216 | + <div id="search-results" class="row" ng-cloak> |
217 | + <!--Show documents--> | ||
218 | + <div class="ecm-content-wrapper"> | ||
219 | + <ul class="list-group"> | ||
220 | + <li class="list-group-item document" ng-class-odd="'odd_result_metadado'" ng-class-even="'background-color'" ng-repeat="doc in documents" ng-cloak> | ||
221 | + <div class="row"> | ||
222 | + <div class="col-md-12"> | ||
223 | + <label class="result_metadado">{{doc.nup}} - {{doc.objeto == 'Documento' ? doc.tipoDocumento : doc.tipoProcesso}}</label> <span class="label label-success pull-right" | ||
224 | + style="font-size: 13px;" ng-show="doc.nivelAcesso == 'Publico' || doc.nivelAcesso == 'Público'">{{doc.nivelAcesso}}</span> <span class="label label-warning pull-right" | ||
225 | + style="font-size: 13px;" ng-show="doc.nivelAcesso =='Restrito'">{{doc.nivelAcesso}}</span> <span class="label label-danger pull-right" style="font-size: 13px;" | ||
226 | + ng-show="doc.nivelAcesso == 'Secreto'">{{doc.nivelAcesso}}</span> <span class="label label-gray pull-right" style="font-size: 13px;" ng-show="doc.nivelAcesso == 'Reservado'">{{doc.nivelAcesso}}</span> | ||
227 | + <span class="label label-black pull-right" style="font-size: 13px;" ng-show="doc.nivelAcesso == 'Ultrassecreto'">{{doc.nivelAcesso}}</span> | ||
228 | + </div> | ||
229 | + </div> | ||
230 | + <div class="row"> | ||
231 | + <div class="col-md-12"> | ||
232 | + <label class="result_metadado">{{doc.assunto}}</label> | ||
233 | + </div> | ||
234 | + </div> | ||
235 | + <div class="row"> | ||
236 | + <div class="col-md-12"> | ||
237 | + <div ng-show="doc.objeto == 'Processo'">{{doc.assuntoComplementar}}</div> | ||
217 | 238 | ||
218 | - <!--Show Pagination--> | ||
219 | - <div class="col-sm-6 text-right" ng-show="totalPages > 1"> | ||
220 | - <pagination rotate="true" max-size="10" total-items="totalResults" num-pages="totalPages" ng-model="start" items-per-page="10" class="pagination-sm" boundary-links="true" | ||
221 | - ng-change="handleSetPage()" previous-text="‹" next-text="›" first-text="«" last-text="»"></pagination> | 239 | + <div class="result_pesquisa" id="{{doc.id}}"></div> |
240 | + </div> | ||
241 | + </div> | ||
242 | + | ||
243 | + <div class="row"> | ||
244 | + <div class="col-md-6"> | ||
245 | + <label class="profile-info-label"><translate>ECM.LABEL.UNIDADE_GESTORA</translate></label> | ||
246 | + </div> | ||
247 | + <div class="col-md-4"> | ||
248 | + <label class="profile-info-label"><translate>ECM.LABEL.AUTOR</translate></label> | ||
249 | + </div> | ||
250 | + <div class='col-sm-2'> | ||
251 | + <label class="profile-info-label"><translate>ECM.LABEL.DATA_CRIACAO</translate></label> | ||
252 | + </div> | ||
253 | + </div> <!-- .row --> | ||
254 | + <div class="row"> | ||
255 | + <div class="col-md-6">{{doc.unidadeGeradora}}</div> | ||
256 | + <div class="col-md-4">{{doc.autor}}</div> | ||
257 | + <div class='col-sm-2'>{{doc.dataCriacao | date: 'dd/MM/yyyy HH:mm:ss': 'UTC'}}</div> | ||
258 | + </div> <!-- .row --> | ||
259 | + </li> | ||
260 | + </ul> | ||
261 | + </div> | ||
262 | + | ||
263 | + <!--Show Pagination--> | ||
264 | + <div class="col-sm-6 text-right" ng-show="documents.length > 0 && totalPages > 1"> | ||
265 | + <pagination rotate="true" max-size="10" total-items="totalResults" num-pages="totalPages" ng-model="start" items-per-page="10" class="pagination-sm" boundary-links="true" | ||
266 | + ng-change="handleSetPage()" previous-text="‹" next-text="›" first-text="«" last-text="»"></pagination> | ||
267 | + </div> | ||
268 | + | ||
269 | + </div> | ||
270 | + </div> | ||
222 | </div> | 271 | </div> |
223 | - <!-- .col --> | ||
224 | - </div> | 272 | + </form> |
225 | </div> | 273 | </div> |
226 | </div> | 274 | </div> |
227 | <!-- .page-content --> | 275 | <!-- .page-content --> |
228 | \ No newline at end of file | 276 | \ No newline at end of file |