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

Make sure we display the no submissions message nicely

parent b728ad62
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ from django.contrib.auth import get_user_model
from django.db.models import F, Q
from django.utils.html import format_html
from django.utils.text import mark_safe, slugify
from django.utils.translation import ugettext_lazy as _
import django_filters as filters
import django_tables2 as tables
......@@ -49,6 +50,7 @@ class SubmissionsTable(tables.Table):
'data-record-id': lambda record: record.id,
}
attrs = {'class': 'all-submissions-table'}
empty_text = _('No submissions available')
def render_user(self, value):
return value.get_full_name()
......
......@@ -71,3 +71,7 @@
{% endif %}
{% endblock %}
{% block table.tbody.empty_text %}
<tr class="all-submissions-table__empty"><td colspan="{{ table.columns|length }}">{{ table.empty_text }}</td></tr>
{% endblock table.tbody.empty_text %}
......@@ -224,6 +224,17 @@
}
}
&__empty {
text-align: center;
vertical-align: middle;
font-weight: $weight--bold;
color: $color--default;
td {
padding: 20px;
}
}
&__toggle {
padding: 5px 0 5px 5px;
}
......
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