{% 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>Payments:</h4>
                    <table class="table table-bordered"> 
                        <thead> 
                            <tr> 
                                <th>Payment Id</th> 
                                <th>Membership Id</th>
                                <th>Amount</th>
                                <th>Method</th>
                                <th>Transaction No.</th>
                                <th>Receipt</th>
                                <th>Payment 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>{{i.5}}</a></td>
                                <td>{{i.6}}</td>
                                <td><a href='Payment/edit/{{i.0}}'>Edit</a> | <a href='Payment/delete/{{i.0}}' onclick="return delMsg();">Delete</a> </td>
                            </tr>
                            {% endfor %}  
                        </tbody> 
                        <script type="text/javascript">
                            function delMsg() {
                                if (confirm("Are you sure about deleting record?")) {
                                    alert('1 row deleted.');
                                    return true;
                                }
                                else
                                    return false;
                            }
                        </script>
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}