diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py index 7cd751d1d..8506669a4 100644 --- a/sapl/base/templatetags/common_tags.py +++ b/sapl/base/templatetags/common_tags.py @@ -408,4 +408,9 @@ def parse_datetime(value): @register.filter def is_report_visible(request, url_path=None): - return is_report_allowed(request, url_path) \ No newline at end of file + return is_report_allowed(request, url_path) + + +@register.filter +def sort_by_index(queryset, index): + return sorted(queryset, key=lambda x: x[index]) \ No newline at end of file diff --git a/sapl/templates/sessao/blocos_ata/materias_ordem_dia.html b/sapl/templates/sessao/blocos_ata/materias_ordem_dia.html index 704cc52c2..8f14181cc 100644 --- a/sapl/templates/sessao/blocos_ata/materias_ordem_dia.html +++ b/sapl/templates/sessao/blocos_ata/materias_ordem_dia.html @@ -1,3 +1,4 @@ +{% load common_tags %} {% if materias_ordem %}