{% extends 'staff/base.html' %}
<title>Admin | Dashboard</title>
{% block body_block %}
<!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Daftar Pengajuan Lahan
      </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 ditolak</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 reject in pengajuan_reject %}
                <tr>                  
                  <td>{{ reject.luas_lahan }} </td>
                  <td>{{ reject.alamat_lahan }} </td>
                  <td><span class="label label-danger">Tolak</span></td>
                  <td>{{ reject.keterangan }} </td>
                  <td>{{ reject.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">Hapus</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_reject.has_previous %}
                <li><a href="?page={{ pengajuan_reject.previous_page_number }}">&laquo;</a></li>
              {% else %}
                <li><a disabled>&laquo;</a></li>
              {% endif %}                
              {% for pg in pengajuan_reject.paginator.page_range %}
                {% if pengajuan_reject.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_reject.has_next %}
                <li><a href="?page={{ pengajuan_reject.next_page_number }}">&raquo;</a></li>
                {% else %}
                <li><a disabled>&raquo;</a></li>
              {% endif %}                              
              </ul>
            </div>
          </div>
          <!-- /.box -->
        </div>
      </div>      
    </section>
{% endblock %}