diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py index e6c402a77..878c21b06 100644 --- a/sapl/compilacao/views.py +++ b/sapl/compilacao/views.py @@ -830,7 +830,7 @@ class PublicacaoListView(PublicacaoMixin, ListView): @property def title(self): - return _('%s de %s' % ( + return _('%s (%s)' % ( self.model._meta.verbose_name_plural, self.ta)) @@ -846,6 +846,8 @@ class PublicacaoListView(PublicacaoMixin, ListView): def get_context_data(self, **kwargs): context = super(PublicacaoListView, self).get_context_data(**kwargs) + context['title'] = self.title + context['object'] = self.ta context['NO_ENTRIES_MSG'] = CrudListView.no_entries_msg return context @@ -879,6 +881,16 @@ class PublicacaoDetailView(PublicacaoMixin, DetailView): model = Publicacao permission_required = [] + @property + def list_url(self): + return reverse_lazy('sapl.compilacao:ta_pub_list', + kwargs={ + 'ta_id': self.kwargs['ta_id']}) + + @property + def verbose_name_plural(self): + return self.model._meta.verbose_name_plural + class PublicacaoUpdateView(PublicacaoMixin, UpdateView): model = Publicacao diff --git a/sapl/templates/compilacao/publicacao_detail.html b/sapl/templates/compilacao/publicacao_detail.html index 985ceed05..949eb668b 100644 --- a/sapl/templates/compilacao/publicacao_detail.html +++ b/sapl/templates/compilacao/publicacao_detail.html @@ -1,22 +1,23 @@ -{% extends "base.html" %} +{% extends "crud/detail.html" %} {% load i18n %} {% load compilacao_filters %} {% load common_tags %} -{% block base_content %} -