{% extends 'adminapp/master.html' %}
{% load static %}
{% block content %}



    <div class="pagetitle">
      <h1>LIST </h1>
      <nav>
      </nav>
    </div><!-- End Page Title -->

    <section class="section">
      <div class="row">
        <div class="col-lg-12">

          <div class="card">
            <div class="card-body">
              <h5 class="card-title"></h5>

              <!-- Default Table -->
              <table class="table">
                <thead>
                  <tr>
                    <th scope="col">#</th>
                    <th scope="col">code</th>
                    <th scope="col">category</th>
                    <th scope="col">station</th>
                    <th scope="col">model</th>
                    <th scope="col">price</th>
                    <th scope="col">image</th> 
                    <th scope="col">Action</th> 
                    
                  </tr>
                </thead>
                <tbody>
                    {% for i in element %}
                  <tr>
                    <td>{{forloop.counter}}</td>
                    <td>{{i.code}}</td>
                    <td>{{i.category.name}}</td>
                    <td>{{i.station.location}}</td>
                    <td>{{i.model}}</td> 
                    <td>{{i.price}}</td> 
                    <td><img src="{{i.image.url}}" height="80px" width="80px"></td> 
                    <td>
                      <a href="{% url 'bike_delete' i.id %}"><button class="btn btn-danger">Delete</button></a>
                      <a href="{% url 'bike_update' i.id %}"><button class="btn btn-primary">Update</button></a>
                    </td>
                  </tr>
                  {% endfor %}
                </tbody>
              </table>
              <!-- End Default Table Example -->
            </div>
          </div>

        </div>


      </div>
    </section>




{% endblock %}