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:
@@ -26,7 +26,7 @@ class SearchTable(tables.Table):
|
||||
"""
|
||||
class Meta:
|
||||
attrs = {
|
||||
'class': 'table table-hover',
|
||||
'class': 'table table-hover table-headings',
|
||||
}
|
||||
orderable = False
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user