{% extends 'base.html' %}
{% block content %}
<section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1>Manage Art Type</h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="{% url 'dashboard' %}">Home</a></li>
            <li class="breadcrumb-item active">Manage Art Type</li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>    <section class="content">
    <div class="container-fluid">
      <div class="row">
        <div class="col-12">
          <div class="card">
            <div class="card-header">
              
            </div>
            <!-- /.card-header -->
            <div class="card-body">
                {% if messages %}
                {% for message in messages %}
                 {% if message.tags == 'error' %}
                <div class="alert alert-warning alert-dismissible fade show" role="alert">
                {{message}}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
                 </button>
                  </div>
                {% endif %}
                {% endfor %}
                {% endif %}
                   {% if messages %}
                {% for message in messages %}
                 {% if message.tags == 'success' %}
                <div class="alert alert-warning alert-dismissible fade show" role="alert">
                {{message}}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
                 </button>
                  </div>
                {% endif %}
                {% endfor %}
                {% endif %}
              <table id="example2" class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>S.NO</th>
                          <th>Art Type</th>
                          <th>Registration Date</th>
                         
                                <th>Action</th>
                      </tr>
                </thead>
                <tbody>
                    {% for i in arttype %}
                <tr>
                  <td>{{ forloop.counter }}</td>
                  <td>{{i.arttype}}
                  </td>
                  <td>{{i.creationdate}}</td>
                  <td><a href="{% url 'delete_arttype' i.id %}" class="btn btn-danger">
                        DELETE</a></td>
                </tr>{% endfor %}
                </tbody>
                <tfoot>
                    <tr>
                        <th>S.NO</th>
                          <th>Art Type</th>
                          <th>Registration Date</th>
                                <th>Action</th>
                      </tr>
                </tfoot>
              </table>
              <div class="pagination" style="padding-top: 10px;text-align: center;">
                <span class="step-links">
                    {% if arttype.has_previous %}
                        <a href="?page=1">&laquo; first</a>
                        <a href="?page={{ arttype.previous_page_number }}">previous</a>
                    {% endif %}
            
                    <span class="current">
                        Page {{ arttype.number }} of {{ arttype.paginator.num_pages }}.
                    </span>
            
                    {% if arttype.has_next %}
                        <a href="?page={{ arttype.next_page_number }}">next</a>
                        <a href="?page={{ arttype.paginator.num_pages }}">last &raquo;</a>
                    {% endif %}
                </span>
            </div>
            </div>
          
            <!-- /.card-body -->
          </div>
          
          <!-- /.card -->

          <!-- /.card -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </div>
    <!-- /.container-fluid -->
  </section>{% endblock %}
  