Browse Source

HOT-FIX: rem trans incor de link p texto_integral

pull/2995/head
Leandro Roberto 5 years ago
parent
commit
c045fb0c62
  1. 12
      sapl/protocoloadm/views.py
  2. 2
      sapl/templates/protocoloadm/layouts.yaml

12
sapl/protocoloadm/views.py

@ -373,13 +373,13 @@ class DocumentoAdministrativoCrud(Crud):
return redirect('/')
return super(Crud.DetailView, self).get(args, kwargs)
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
self.layout_display[0]['rows'][-1][0]['text'] = (
'<a href="%s"></a>' % reverse(
def urlize(self, obj, fieldname):
a = '<a href="%s">%s</a>' % (
reverse(
'sapl.protocoloadm:doc_texto_integral',
kwargs={'pk': self.object.pk}))
return context
kwargs={'pk': obj.pk}),
obj.texto_integral.name.split('/')[-1])
return obj.texto_integral.field.verbose_name, a
class DeleteView(Crud.DeleteView):

2
sapl/templates/protocoloadm/layouts.yaml

@ -9,7 +9,7 @@ DocumentoAdministrativo:
- data protocolo
- assunto
- interessado tramitacao
- texto_integral
- texto_integral|urlize
- documento_anexado_set__documento_principal|m2m_urlize_for_detail
- documento_principal_set__documento_anexado|m2m_urlize_for_detail
{% trans 'Outras Informações' %}:

Loading…
Cancel
Save