Commit dd60bb58 authored by Petrus J.v.Rensburg's avatar Petrus J.v.Rensburg

Merge branch 'upstream-column-classes' of...

Merge branch 'upstream-column-classes' of https://github.com/Code4SA/flask-admin into Code4SA-upstream-column-classes
parents 43ebeb80 9e3244de
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
{% endblock %} {% endblock %}
{% set column = 0 %} {% set column = 0 %}
{% for c, name in list_columns %} {% for c, name in list_columns %}
<th class="column-header"> <th class="column-{{c}}">
{% if admin_view.is_sortable(c) %} {% if admin_view.is_sortable(c) %}
{% if sort_column == column %} {% if sort_column == column %}
<a href="{{ sort_url(column, True) }}" title="{{ _gettext('Sort by %(name)s', name=name) }}"> <a href="{{ sort_url(column, True) }}" title="{{ _gettext('Sort by %(name)s', name=name) }}">
...@@ -120,15 +120,17 @@ ...@@ -120,15 +120,17 @@
</td> </td>
{% endblock %} {% endblock %}
{% for c, name in list_columns %} {% for c, name in list_columns %}
<td class="column-{{c}}">
{% if admin_view.is_editable(c) %} {% if admin_view.is_editable(c) %}
{% if form.csrf_token %} {% if form.csrf_token %}
<td>{{ form[c](pk=get_pk_value(row), value=get_value(row, c), csrf=form.csrf_token._value()) }}</td> {{ form[c](pk=get_pk_value(row), value=get_value(row, c), csrf=form.csrf_token._value()) }}
{% else %} {% else %}
<td>{{ form[c](pk=get_pk_value(row), value=get_value(row, c)) }}</td> {{ form[c](pk=get_pk_value(row), value=get_value(row, c)) }}
{% endif %} {% endif %}
{% else %} {% else %}
<td>{{ get_value(row, c) }}</td> {{ get_value(row, c) }}
{% endif %} {% endif %}
</td>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
</tr> </tr>
......
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