Skip to content
Snippets Groups Projects
Commit 84570b31 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add inactive state to table row

parent 485d64fe
No related branches found
No related tags found
No related merge requests found
......@@ -26,13 +26,15 @@ class SubmissionsTable(tables.Table):
fields = ('title', 'status_name', 'stage', 'page', 'round', 'submit_time')
sequence = ('title', 'status_name', 'stage', 'page', 'round', 'lead', 'submit_time')
template = 'funds/tables/table.html'
row_attrs = {
'class': lambda record: '' if record.active else 'is-inactive'
}
def render_user(self, value):
return value.get_full_name()
def render_status_name(self, value, record):
state = 'class="not-active"' if not record.active else ''
return mark_safe(f'<span { state }>{ value }</span>')
return mark_safe(f'<span>{ value }</span>')
def get_used_rounds(request):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment