Commit 6a019144 authored by Serge S. Koval's avatar Serge S. Koval

Merge branch 'master' of github.com:flask-admin/flask-admin

parents 1e95669b d86035e6
......@@ -432,6 +432,20 @@ class BaseModelView(BaseView, ActionsMixin):
Controls if the primary key should be displayed in the list view.
"""
column_display_actions = True
"""
Controls the display of the row actions (edit, delete, details, etc.)
column in the list view.
Useful for preventing a blank column from displaying if your view does
not use any build-in or custom row actions.
This column is not hidden automatically due to backwards compatibility.
Note: This only affects display and does not control whether the row
actions endpoints are accessible.
"""
simple_list_pager = False
"""
Enable or disable simple list pager.
......
......@@ -70,7 +70,9 @@
</th>
{% endif %}
{% block list_row_actions_header %}
{% if admin_view.column_display_actions %}
<th class="span1">&nbsp;</th>
{% endif %}
{% endblock %}
{% set column = 0 %}
{% for c, name in list_columns %}
......@@ -112,6 +114,7 @@
</td>
{% endif %}
{% block list_row_actions_column scoped %}
{% if admin_view.column_display_actions %}
<td class="list-buttons-column">
{% block list_row_actions scoped %}
{%- if admin_view.can_view_details -%}
......@@ -148,6 +151,7 @@
{%- endif -%}
{% endblock %}
</td>
{%- endif -%}
{% endblock %}
{% for c, name in list_columns %}
......
......@@ -70,7 +70,9 @@
</th>
{% endif %}
{% block list_row_actions_header %}
{% if admin_view.column_display_actions %}
<th class="col-md-1">&nbsp;</th>
{% endif %}
{% endblock %}
{% set column = 0 %}
{% for c, name in list_columns %}
......@@ -112,6 +114,7 @@
</td>
{% endif %}
{% block list_row_actions_column scoped %}
{% if admin_view.column_display_actions %}
<td class="list-buttons-column">
{% block list_row_actions scoped %}
{%- if admin_view.can_view_details -%}
......@@ -148,6 +151,7 @@
{%- endif -%}
{% endblock %}
</td>
{%- endif -%}
{% endblock %}
{% for c, name in list_columns %}
<td class="col-{{c}}">
......
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