{% extends "codenerix/sublist.html" %}
{% load i18n %}
{% load codenerix_common %}
{% comment %}

django-codenerix

Copyright 2017 Centrologic Computational Logistic Center S.L.

Project URL : http://www.codenerix.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

{% endcomment %}

{% block form_title %}
        {% trans "List" %}
{% endblock %}
{% block form_head %}
    <div class="row clearfix">
    <div class="modal-body">
        <div class="col-md-12">
            {% if form.errors %}
                <div class="non-field-errors text-center">
                    <alert type="danger">
                        {% for err in form.errors.delay %}
                            <p>{{ err|safe }}</p>
                        {% endfor %}
                    </alert>
                </div>
            {% else %}
                {% if cannot_update %}
                    <div class="non-field-errors text-center">
                        <alert type="danger">
                           *{{ cannot_update }}
                        </alert>
                    </div>
                {% endif %}
            {% endif %}
        </div>
{% endblock %}




{% block table_content %}
<div class="col-md-12 column panel panel-default scrolling-container table-responsive">
    <table class="table table-condensed table-hover list">
        <thead>
            <tr>
            {% for column in columns %}
                <th>
                    {{column.name}}
                </th>
            {% endfor %}
            </tr>
        </thead>
        <tbody>
            {% for obj in object_list %}
            {#<tr ng-click="editrow({{obj.id}})">#}
            <tr ng-click="details({{obj.pk}})">
                {% for column in columns %}
                    <td>
                        {#{{obj|objectatrib:column.pk}}#}
                        {{obj|objectatrib:column.id}}
                    </td>
                {% endfor %}
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}

{% block subtable_content %}
{% endblock %}


{% block form_bottom %}
    </div>
    </div>
    <div class="modal-footer">
        <label  class="sr-only"  for="cancel">{% trans "Close" %}</label>
        <button type="button" class="btn btn-sm btn-info" ng-click="cancel()">{% trans "Close" %}</button>
    </div>
{% endblock %}
