1 # -*- coding: utf-8 -*-
3 # This file is part of MIL/PEER, licensed under GNU Affero GPLv3 or later.
4 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from __future__ import absolute_import
8 from django import template
10 register = template.Library()
18 def __init__(self, slug, caption, url):
20 self.caption = caption
24 @register.inclusion_tag("catalogue/main_tabs.html", takes_context=True)
25 def main_tabs(context):
26 active = getattr(context['request'], 'catalogue_active_tab', None)
29 # tabs.append(Tab('my', _('My page'), reverse("catalogue_user")))
31 # tabs.append(Tab('all', _('All'), reverse("catalogue_document_list")))
33 return {"tabs": tabs, "active_tab": active}
38 return user.get_full_name() or user.username