Skip to content
Snippets Groups Projects
Commit f318335b authored by Dan Braghis's avatar Dan Braghis
Browse files

Move data-record-id to row_attrs

parent 2b8f5e47
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,8 @@ class SubmissionsTable(tables.Table):
sequence = fields + ('comments',)
template_name = 'funds/tables/table.html'
row_attrs = {
'class': make_row_class
'class': make_row_class,
'data-record-id': lambda record: record.id,
}
def render_user(self, value):
......
......@@ -3,11 +3,7 @@
{# example of how to extend the table template #}
{% block table.tbody.row %}
<tr {{ row.attrs.as_html }} data-record-id="{{ row.record.id }}">
{% for column, cell in row.items %}
<td {{ column.attrs.td.as_html }}>{% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}</td>
{% endfor %}
</tr>
{{ block.super }}
{% with submission=row.record %}
{# placeholder for example data row #}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment