Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
5d442bc2
Commit
5d442bc2
authored
Aug 14, 2013
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #281. Show message if there are no items in the table.
parent
8ced1725
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
base.py
flask_admin/model/base.py
+3
-0
list.html
flask_admin/templates/admin/model/list.html
+10
-0
No files found.
flask_admin/model/base.py
View file @
5d442bc2
...
@@ -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
):
"""
"""
...
...
flask_admin/templates/admin/model/list.html
View file @
5d442bc2
...
@@ -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) }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment