Commit 5d442bc2 authored by Serge S. Koval's avatar Serge S. Koval

Fixed #281. Show message if there are no items in the table.

parent 8ced1725
...@@ -844,6 +844,9 @@ class BaseModelView(BaseView, ActionsMixin): ...@@ -844,6 +844,9 @@ class BaseModelView(BaseView, ActionsMixin):
""" """
return prettify_name(name) return prettify_name(name)
def get_empty_list_message(self):
return gettext('There are no items in the table.')
# URL generation helper # URL generation helper
def _get_extra_args(self): def _get_extra_args(self):
""" """
......
...@@ -119,6 +119,16 @@ ...@@ -119,6 +119,16 @@
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
</tr> </tr>
{% else %}
<tr>
<td colspan="999">
{% block empty_list_message %}
<div class="text-center">
{{ admin_view.get_empty_list_message() }}
</div>
{% endblock %}
</td>
</tr>
{% endfor %} {% endfor %}
</table> </table>
{{ lib.pager(page, num_pages, pager_url) }} {{ lib.pager(page, num_pages, pager_url) }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment