{% extends 'base.html' %}

    {% block mycontent %}
    <div id="page-wrapper">
        <div class="main-page">
            <div class="tables">
                <div class="bs-example widget-shadow" data-example-id="bordered-table"> 
                    <h4>Orders:</h4>
                    <table class="table table-bordered"> 
                        <thead> 
                            <tr>  
                                <th>Order Id</th>
                                <th>User Id</th>
                                <th>Order Date</th>
                                <th>Delivery Date</th>
                                <th>Delivery Status</th>
                                <th>Action</th>  
                            </tr> 
                        </thead> 
                        <tbody> 
                            {% for i in mydata %}
                            <tr>   
                                <td>{{i.0}}</td>
                                <td>{{i.1}}</td>
                                <td>{{i.2}}</td>
                                <td>{{i.3}}</td>
                                <td>{{i.4}}</td>
                                <td><a href='OrderEdit/edit/{{i.0}}'>Edit</a> | <a href='ViewOrderdetails.html/{{i.0}}'>More Details</a></td> 
                            </tr>  
                            {% endfor %}
                        </tbody> 
                        {% if messages %}
                                   <ul class="messages">
                                   {% for message in messages %}
                                       <li {% if message.tags %} class=" {{ message.tags }} " {% endif %} >
                                          <script>alert('{{ message }}')</script>
                                       </li>
                                   {% endfor %}
                                   </ul>
                        {% endif %} 
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}