From 3af26c339106275f5f2369beb5aa0088795a5197 Mon Sep 17 00:00:00 2001 From: Mariana Mendes Date: Wed, 4 Oct 2017 16:29:00 -0300 Subject: [PATCH] =?UTF-8?q?Insere=20as=20urls=20na=20p=C3=A1gina=20de=20aj?= =?UTF-8?q?uda?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/views.py | 9 ++- sapl/templates/ajuda.html | 114 +++++++++++++++++++------------------- 2 files changed, 65 insertions(+), 58 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index f87db51a6..7c80dcbc3 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -13,6 +13,7 @@ from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import TemplateView from django_filters.views import FilterView +from django.template.loader import get_template from haystack.views import SearchView from sapl.base.forms import AutorForm, AutorFormForAdmin, TipoAutorForm @@ -473,7 +474,6 @@ class CasaLegislativaCrud(CrudAux): form_class = CasaLegislativaForm class ListView(CrudAux.ListView): - def get(self, request, *args, **kwargs): casa = get_casalegislativa() if casa: @@ -499,6 +499,13 @@ class HelpTopicView(TemplateView): else: return HttpResponseRedirect(reverse('sapl.base:help')) + def get_template(self): + if 'topic' in self.request.GET and self.request.GET['topic']: + try: + get_template('ajuda/%s.html' % self.request.GET['topic']) + except TemplateDoesNotExist: + raise Http404() + class AppConfigCrud(CrudAux): model = AppConfig diff --git a/sapl/templates/ajuda.html b/sapl/templates/ajuda.html index 482240b70..16c8cf88f 100644 --- a/sapl/templates/ajuda.html +++ b/sapl/templates/ajuda.html @@ -46,28 +46,28 @@
  • Cadastro de Parlamentares
  • -
  • Mesa Diretora +
  • Mesa Diretora
  • -
  • Comissões +
  • Comissões @@ -75,69 +75,69 @@
  • Matérias Legislativas - +
  • -
  • Norma Jurídica +
  • Norma Jurídica
  • -
  • Ordem do Dia
  • -
  • Troca de Senha
  • -
  • Gerenciar Usuários
  • -
  • Pesquisar no LexML
  • +
  • Ordem do Dia
  • +
  • Troca de Senha
  • +
  • Gerenciar Usuários
  • +
  • Pesquisar no LexML
  • -
  • Proposições Legislativas +
  • Proposições Legislativas
  • -
  • Sessão Plenária +
  • Sessão Plenária
  • -
  • Glossário
  • -
  • Anexos
  • +
  • Glossário
  • +
  • Anexos