{% extends 'main/layout.html' %} {% block title %} {{title}} {% endblock title %} {% block content %}{% include 'development/sidebar.html' %}

<section class="section-container">
  <!-- Page content-->
  <div class="content-wrapper">
    <div class="content-heading d-flex justify-content-between">
      <div>
        {{title}}<small>
          <ol class="breadcrumb mt-3">
            <li class="breadcrumb-item"><a href="{% url 'development:dashboard-development' %}">Varanda</a></li>
            <li class="breadcrumb-item active" aria-current="page">{{title}}</li>
          </ol>
        </small>
      </div>
      <div>
              {% ifequal user.groups.all.0.name 'admin' %}
              <div class="bg-danger p-2">
              <small class="text-white">Admin Nasional MAE</small>
              </div>
              {% endifequal %}
              {% ifequal user.groups.all.0.name 'xefe' %}
              <div class="bg-warning p-2">
              <small class="text-white"> Xefe Suku {{user.employeeuser.employee.village}}</small>
              </div>
              {% endifequal %}
              {% ifequal user.groups.all.0.name 'sec' %}
              <div class="bg-warning p-2">
              <small class="text-white"> Secretariado Suku {{user.employeeuser.employee.village}}</small>
              </div>
              {% endifequal %}
            </div>
    </div>
    <div class="container-fluid">
      {% if messages %} {% for message in messages %}
      <div id="divmessage" class="alert alert-{{ message.tags }} alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        {{message}}
      </div>
      {% endfor %} {% endif %}
      <div class="card card-default">
        <div class="card-header d-flex justify-content-between">
          <div class="card-title">{{title}}</div>
          {% if group == 'sec' or group == 'admin' or group == 'xefe' %}
          <div class="card-title">
            <a href="{% url 'development:custom-company-add' %}" class="btn btn-sm btn-labeled btn-info mb-2"
              ><span class="btn-label"><i class="fa fa-plus-square"></i></span>Adisiona</a
            >
          </div>
          {% endif %}
        </div>
        <div class="card-body">
          <section id="no-more-tables">
            <table class="table table-striped my-4 w-100" id="datatable2">
              <thead>
                <tr>
                  <th>N&uacute.</th>
                  <th>Naran</th>
                  {% if group == 'sec' %}

                  <th>Asaun</th>
                  {% endif %}
                </tr>
              </thead>
              <tbody>
                {% for obj in objects %}
                <tr>
                  <td data-title="Nu.">{{ forloop.counter }}</td>
                  <td data-title="Naran">{{ obj.name }}</td>
                  {% if group == 'sec' %}
                  <td data-title="Asaun">
                    <div class="d-flex">
                      <div class="flex-fill"><a href="{% url 'development:custom-company-update' obj.id %}" class="btn btn-sm btn-primary" title="altera"><i class="fas fa-pencil-alt"></i></a></div>
                    </div>
                  </td>
                  {% endif %}
                </tr>
                {% endfor %}
              </tbody>
            </table>
          </section>
        </div>
        <!--end card-body-->
      </div>
      <!--end card-->
    </div>
    <!--end col-->
  </div>
  <!--end row-->
  {% comment %} END PAGE {% endcomment %}
</section>
<!-- Page footer-->
{% include 'main/footer.html' %} {% endblock %} {% block scripts %} {% endblock %}
