summaryrefslogtreecommitdiffstats
path: root/uauth/organization/tables.py
blob: 611e41cd4cc1be7a94e98a627d511ee91f92f35f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from django.utils.translation import ugettext as _

import django_tables2 as tables

from .models import LocalAccount

class AccountTable(tables.Table):
    username = tables.TemplateColumn(
        '<a href="{% url "edit-user" organization.slug record.pk %}" rel="popup"><i class="icon-edit"></i></a><a href="{% url "view-user" organization.slug record.pk %}">{{ record.username }}</a>',
        verbose_name=_('Username'))

    class Meta:
        model = LocalAccount
        attrs = {'class': 'main', 'id': 'user-table'}
        fields = ('username', 'active', 'first_name', 'last_name')
        empty_text = _('None')