From 313e6f7e651baa8abe9256fb78a528f71f70119e Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Thu, 23 Mar 2017 16:56:27 -0300 Subject: [PATCH] =?UTF-8?q?Ajusta=20alguns=20detalhes=20e=20cria=20bot?= =?UTF-8?q?=C3=A3o=20de=20acesso=20a=20pesquisa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/search_indexes.py | 5 +---- sapl/templates/materia/materialegislativa_filter.html | 4 ++++ sapl/templates/search/search.html | 6 +++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sapl/base/search_indexes.py b/sapl/base/search_indexes.py index eb86d4f00..ce1de49ab 100644 --- a/sapl/base/search_indexes.py +++ b/sapl/base/search_indexes.py @@ -16,7 +16,6 @@ class DocumentoAcessorioIndex(indexes.SearchIndex, indexes.Indexable): return self.model def index_queryset(self, using=None): - """Used when the entire index for model is updated.""" return self.get_model().objects.all() def prepare(self, obj): @@ -37,8 +36,6 @@ class DocumentoAcessorioIndex(indexes.SearchIndex, indexes.Indexable): arquivo.path).decode( 'utf-8').replace('\n', ' ') - # Now we'll finally perform the template processing to render the - # text field with *all* of our metadata visible for templating: t = loader.select_template(( 'search/indexes/' + self.template_name, )) data['text'] = t.render(Context({'object': obj, @@ -54,4 +51,4 @@ class MateriaLegislativaIndex(DocumentoAcessorioIndex): filename = 'texto_original' model = MateriaLegislativa - template_name = 'materia/materialegislativa_text.txt' \ No newline at end of file + template_name = 'materia/materialegislativa_text.txt' diff --git a/sapl/templates/materia/materialegislativa_filter.html b/sapl/templates/materia/materialegislativa_filter.html index 639031d16..cd459c61c 100644 --- a/sapl/templates/materia/materialegislativa_filter.html +++ b/sapl/templates/materia/materialegislativa_filter.html @@ -4,6 +4,10 @@ {% block actions %}
+ + Pesquisa Textual + + {% if perms.materia %} {% blocktrans with verbose_name=view.verbose_name %} Adicionar Matéria Legislativa {% endblocktrans %} diff --git a/sapl/templates/search/search.html b/sapl/templates/search/search.html index d05c7c72d..0040a0d18 100644 --- a/sapl/templates/search/search.html +++ b/sapl/templates/search/search.html @@ -64,7 +64,11 @@ {% empty %} -

Nenhum resultado encontrado!

+

Nenhum texto encontrado!

+ + + + {% endfor %}