1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Prettied things up a bit

This commit is contained in:
Jeremy Stretch
2017-03-29 16:45:25 -04:00
parent a5dc91c175
commit 66615f1a96
6 changed files with 21 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ class SearchTable(tables.Table):
"""
class Meta:
attrs = {
'class': 'table table-hover',
'class': 'table table-hover table-headings',
}
orderable = False

View File

@@ -51,6 +51,13 @@ def startswith(value, arg):
"""
return str(value).startswith(arg)
@register.filter()
def bettertitle(value):
"""
Alternative to the builtin title(); uppercases words without replacing letters that are already uppercase.
"""
return ' '.join([w[0].upper() + w[1:] for w in value.split()])
#
# Tags