diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py
index c4b092f52..1603631f6 100755
--- a/sapl/sessao/views.py
+++ b/sapl/sessao/views.py
@@ -46,7 +46,7 @@
from sapl.sessao.models import Correspondencia
from sapl.settings import TIME_ZONE
from sapl.utils import show_results_filter_set, remover_acentos, get_client_ip,\
- MultiFormatOutputMixin
+ MultiFormatOutputMixin, PautaMultiFormatOutputMixin
from .forms import (AdicionarVariasMateriasFilterSet, BancadaForm,
ExpedienteForm, JustificativaAusenciaForm, OcorrenciaSessaoForm, ListMateriaForm,
@@ -3809,10 +3809,27 @@ def get(self, request, *args, **kwargs):
reverse('sapl.sessao:pauta_sessao_detail', kwargs={'pk': sessao.pk}))
-class PautaSessaoDetailView(DetailView):
+class PautaSessaoDetailView(PautaMultiFormatOutputMixin, DetailView):
template_name = "sessao/pauta_sessao_detail.html"
model = SessaoPlenaria
+ queryset_values_for_formats = False
+
+ fields_base_report = [
+ [('id', 'ID'), ('titulo', 'Matéria'), ('autor', 'Autor'), ('ementa', 'Ementa'), ('situacao', 'Situação')],
+ [('id', 'ID'), ('titulo', 'Matéria'), ('autor', 'Autor'), ('ementa', 'Ementa'), ('situacao', 'Situação')]
+ ]
+ fields_report = {
+ 'csv': fields_base_report,
+ 'xlsx': fields_base_report,
+ 'json': fields_base_report,
+ }
+
+ item_context = [
+ ('materia_expediente', 'Matérias do Expediente'),
+ ('materias_ordem', 'Matérias da Ordem do Dia')
+ ]
+
def get(self, request, *args, **kwargs):
from sapl.relatorios.views import relatorio_pauta_sessao_weasy # Evitar import ciclico
diff --git a/sapl/templates/crud/format_options.html b/sapl/templates/crud/format_options.html
index eb3bdd18d..1bd43c155 100644
--- a/sapl/templates/crud/format_options.html
+++ b/sapl/templates/crud/format_options.html
@@ -3,8 +3,14 @@
+ {% if sessao %}
+
+
+
+ {% else %}
+ {% endif %}
diff --git a/sapl/templates/sessao/pauta_sessao_detail.html b/sapl/templates/sessao/pauta_sessao_detail.html
index 92ad35a6b..a4eb7bec7 100644
--- a/sapl/templates/sessao/pauta_sessao_detail.html
+++ b/sapl/templates/sessao/pauta_sessao_detail.html
@@ -1,8 +1,16 @@
{% extends "crud/detail.html" %}
{% load i18n %}
{% load crispy_forms_tags common_tags%}
+{% load waffle_tags %}
{% block base_content %}
+
+ {% with url_reverse='sapl.sessao:pauta_sessao_detail' sessao=object.pk %}
+ {% include "crud/format_options.html" %}
+ {% endwith %}
+
+
+