Merge "Make "enabled" colume values display-friendly and consistent"
This commit is contained in:
commit
477faf4c0b
@ -16,6 +16,7 @@ import logging
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.template import defaultfilters as filters
|
||||
from django.utils.http import urlencode
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
@ -199,7 +200,8 @@ class DomainsTable(tables.DataTable):
|
||||
description = tables.Column(lambda obj: getattr(obj, 'description', None),
|
||||
verbose_name=_('Description'))
|
||||
id = tables.Column('id', verbose_name=_('Domain ID'))
|
||||
enabled = tables.Column('enabled', verbose_name=_('Enabled'), status=True)
|
||||
enabled = tables.Column('enabled', verbose_name=_('Enabled'), status=True,
|
||||
filters=(filters.yesno, filters.capfirst))
|
||||
|
||||
class Meta(object):
|
||||
name = "domains"
|
||||
|
@ -195,6 +195,8 @@ class UsersTable(tables.DataTable):
|
||||
enabled = tables.Column('enabled', verbose_name=_('Enabled'),
|
||||
status=True,
|
||||
status_choices=STATUS_CHOICES,
|
||||
filters=(defaultfilters.yesno,
|
||||
defaultfilters.capfirst),
|
||||
empty_value=_('False'))
|
||||
|
||||
|
||||
|
@ -236,6 +236,8 @@ class UsersTable(tables.DataTable):
|
||||
enabled = tables.Column('enabled', verbose_name=_('Enabled'),
|
||||
status=True,
|
||||
status_choices=STATUS_CHOICES,
|
||||
filters=(defaultfilters.yesno,
|
||||
defaultfilters.capfirst),
|
||||
empty_value="False")
|
||||
|
||||
class Meta(object):
|
||||
|
@ -213,7 +213,8 @@ class RulesTable(tables.DataTable):
|
||||
filters=(filters.upper,),
|
||||
verbose_name=_("Action"))
|
||||
enabled = tables.Column("enabled",
|
||||
verbose_name=_("Enabled"))
|
||||
verbose_name=_("Enabled"),
|
||||
filters=(filters.yesno, filters.capfirst))
|
||||
firewall_policy_id = tables.Column(get_policy_name,
|
||||
link=get_policy_link,
|
||||
verbose_name=_("In Policy"))
|
||||
@ -232,7 +233,8 @@ class PoliciesTable(tables.DataTable):
|
||||
firewall_rules = tables.Column(get_rules_name,
|
||||
verbose_name=_("Rules"))
|
||||
audited = tables.Column("audited",
|
||||
verbose_name=_("Audited"))
|
||||
verbose_name=_("Audited"),
|
||||
filters=(filters.yesno, filters.capfirst))
|
||||
|
||||
class Meta(object):
|
||||
name = "policiestable"
|
||||
|
Loading…
Reference in New Issue
Block a user