{% extends "fruit/mystore.html" %}
{% load static %}
{% load crispy_forms_tags %}

{% block header %}            
{% endblock %}

{% load django_bootstrap_breadcrumbs %}
{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb "Vendors" "fruit:vendor_index" %}
{% endblock %}

{% block store_main %}

<a  class='btn btn-primary' href="{% url "fruit:vendor_create" %}">Create Vendor</a>
<hr>
<h2>
    Vendor Index</h2>
{% include "fruit/_searchcenter.html" %}
<hr>
<table class='table table-borded table-striped'>
    <thead>
        <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Products</th>
            <th>Price</th>
            <th>Detail</th>
            <th>Tel</th>
            <th>Email</th>
            <th>LineId</th>
            <th>Created At</th></tr>
    </thead>
    <tbody>
{% for p in page_obj %}
        <tr>
            <td><a href="{% url "fruit:vendor_edit" pk=p.pk %}">{{ p.id }}</a></td><td>{{ p.product }}</td>
            <td>{{ p.name }}</td>
            <td>{{ p.products }}</td>
            <td>{{ p.price }}</td>
            <td>{{ p.detail }}</td>
            <td>{{ p.tel }}</td>
            <td>{{ p.email }}</td>
            <td>{{ p.line_id }}</td>
            <td>{{ p.created_at }}</td>
        </tr>
{% endfor %}
    </tbody>
</table>
{% include "fruit/_paging.html" %}
{% endblock %}
