{% extends 'staff/base.html' %}
<title>Admin | Dashboard</title>
{% block body_block %}
{% load staticfiles %}
<!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Daftar Pengajuan Lahan Pending
      </h1>
    </section>
    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">Pengajuan Lahan dipending</h3>              
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
              <table id="example2" class="table table-hover">
              <thead>
                <tr>                  
                  <th>Luas Lahan</th>
                  <th>Alamat Lahan</th>
                  <th>Status</th>
                  <th>Keterangan</th>
                  <th>Tanggal Pengajuan</th>                  
                  <th>Aksi</th>
                </tr>         
              </thead>  
                {% for pending in pengajuan_pending %}
                <tr>                  
                  <td>{{ pending.luas_lahan }} </td>
                  <td>{{ pending.alamat_lahan }} </td>
                  <td><span class="label label-warning">Pending</span></td>
                  <td>{{ pending.keterangan }} </td>
                  <td>{{ pending.tanggal_pengajuan }} </td>                  
                  <td><a href="{% url 'farmer:daftarPengajuanLahan' %}" class="btn btn-info">Detail</a>&nbsp; &nbsp; &nbsp;<a href="{% url 'farmer:daftarPengajuanLahanTolak' %}" class="btn btn-danger">Tolak</a></td>
                </tr>
                {% endfor %}
              </table>

            </div>
            <!-- /.box-body -->
            <!-- /.box-body -->
            <div class="box-footer clearfix">
              <ul class="pagination pagination-sm no-margin pull-right">
              {% if pengajuan_pending.has_previous %}
                <li><a href="?page={{ pengajuan_pending.previous_page_number }}">&laquo;</a></li>
              {% else %}
                <li><a disabled>&laquo;</a></li>
              {% endif %}                
              {% for pg in pengajuan_pending.paginator.page_range %}
                {% if pengajuan_pending.number == pg %}
                    <li class="active"><a href="?page={{ pg }}">{{ pg }}</a></li>
                {% else %}
                    <li><a href="?page={{ pg }}">{{ pg }}</a></li>
                {% endif %}
              {% endfor %}
              {% if pengajuan_pending.has_next %}
                <li><a href="?page={{ pengajuan_pending.next_page_number }}">&raquo;</a></li>
                {% else %}
                <li><a disabled>&raquo;</a></li>
              {% endif %}                              
              </ul>
            </div>
          </div>
          <!-- /.box -->
        </div>
      </div>      
    </section>
{% endblock %}