{% if cell.inline_edit_mod and cell.update_allowed %}
   <td{{ cell.attr_string|safe }}>
        <div class="table_cell_wrapper">
            <div class="inline-edit-error"></div>
            <div class="inline-edit-form">
                {{ cell.value }}
                {% if cell.column.form_field.label %}
                    <label class="inline-edit-label" for="{{ cell.id }}">{{ cell.column.form_field.label }}</label>
                {% endif %}
            </div>
            <div class="inline-edit-actions">
                <button class="inline-edit-submit btn btn-primary btn-xs pull-right"
                     name="action" value="" type="submit">
                    <span class="fa fa-fw fa-check"></span>
                </button>
                <button class="inline-edit-cancel btn btn-default btn-xs pull-right cancel">
                    <span class="fa fa-fw fa-times"></span>
                </button>
            </div>
            <div class="inline-edit-status inline-edit-mod"></div>
        </div>
    </td>
{% else %}
    {% if cell.inline_edit_available and cell.update_allowed %}
        <td{{ cell.attr_string|safe }}>
            <div class="table_cell_wrapper">
                <div class="table_cell_data_wrapper">
                    {% if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{% if cell.wrap_list %}</ul>{% endif %}
                </div>
                <div class="table_cell_action">
                    <button class="ajax-inline-edit"><span class="fa fa-pencil"></span></button>
                </div>
                <div class="inline-edit-status"></div>
            </div>
        </td>
    {% else %}
        <td{{ cell.attr_string|safe }}>
            {% if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{% if cell.wrap_list %}</ul>{% endif %}
        </td>
    {% endif %}
{% endif %}
