From 11fcec12137425b1e12a06a88f5493c49f141942 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Thu, 30 Jun 2016 14:29:22 -0300 Subject: [PATCH] =?UTF-8?q?#47=20mostra=20conv=C3=AAnios=20da=20casa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/home/templatetags/menu_conf.yaml | 4 ++-- sigi/apps/usuarios/forms.py | 4 ++-- sigi/apps/usuarios/urls.py | 8 ++++---- sigi/apps/usuarios/views.py | 2 ++ templates/usuarios/convenio.html | 6 ++++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/sigi/apps/home/templatetags/menu_conf.yaml b/sigi/apps/home/templatetags/menu_conf.yaml index 23ed5e2..f048b90 100644 --- a/sigi/apps/home/templatetags/menu_conf.yaml +++ b/sigi/apps/home/templatetags/menu_conf.yaml @@ -127,6 +127,6 @@ main_menu: url: '/' children: - title: Convênio - url: convenio + url: atesto/convenio - title: Responsável - url: responsavel + url: atesto/responsavel diff --git a/sigi/apps/usuarios/forms.py b/sigi/apps/usuarios/forms.py index b3a67ed..69046f6 100644 --- a/sigi/apps/usuarios/forms.py +++ b/sigi/apps/usuarios/forms.py @@ -43,7 +43,7 @@ class ResponsavelForm(ModelForm): self.helper.layout = Layout( Fieldset(_(u'Atestar Responsável'), HTML(u'''

- Ao atestar a responsabilidade deste convênio você + Ao atestar o vínculo deste usuário com esta casa você estará assumindo responsabilidade por qualquer problema que poderá ocorrer pela existência de dados incorretos.

'''), @@ -70,7 +70,7 @@ class ConveniadoForm(ModelForm): self.helper.layout = Layout( Fieldset(_(u'Atestar Conveniado'), HTML(u'''

- Ao atestar o convênio deste usuário você estará + Ao atestar o convênio desta casa você estará assumindo resonsabilidade por qualquer problema que poderá ocorrer pela existência de dados incorretos.

'''), diff --git a/sigi/apps/usuarios/urls.py b/sigi/apps/usuarios/urls.py index 93dfdc2..ca235f4 100644 --- a/sigi/apps/usuarios/urls.py +++ b/sigi/apps/usuarios/urls.py @@ -66,13 +66,13 @@ urlpatterns = recuperar_email + [ '(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$', ConfirmarEmailView.as_view(), name=u'confirmar_email'), - url(ur'^responsavel$', ResponsavelListView.as_view(), + url(ur'^atesto/responsavel$', ResponsavelListView.as_view(), name=u'responsavel_list'), - url(ur'^responsavel/(?P\d+)/$', ResponsavelView.as_view(), + url(ur'^atesto/responsavel/(?P\d+)/$', ResponsavelView.as_view(), name=u'responsavel_update'), - url(ur'^convenio$', ConveniadoListView.as_view(), + url(ur'^atesto/convenio$', ConveniadoListView.as_view(), name=u'convenio_list'), - url(ur'^convenio/(?P\d+)/$', ConveniadoView.as_view(), + url(ur'^atesto/convenio/(?P\d+)/$', ConveniadoView.as_view(), name=u'convenio_update'), ] diff --git a/sigi/apps/usuarios/views.py b/sigi/apps/usuarios/views.py index e795e6a..e80391c 100644 --- a/sigi/apps/usuarios/views.py +++ b/sigi/apps/usuarios/views.py @@ -71,6 +71,8 @@ class ConveniadoView(CreateView): context = super(ConveniadoView, self).get_context_data(**kwargs) context[u'usuario'] = self.get_object() context[u'casa'] = self.get_object().casa_legislativa + context[u'convenios'] = self.get_object( + ).casa_legislativa.convenio_set.all() return context def get_object(self, queryset=None): diff --git a/templates/usuarios/convenio.html b/templates/usuarios/convenio.html index 4c2aded..afa9336 100644 --- a/templates/usuarios/convenio.html +++ b/templates/usuarios/convenio.html @@ -6,6 +6,7 @@ Dados da Casa Legislativa + Convênio(s) da Casa Legislativa @@ -18,6 +19,11 @@ Página: {{casa.pagina_web}}
Telefone: {{casa.telefone}}
+ + {% for c in convenios %} + {{c}}
+ {% endfor %} + {% crispy form %}