{% extends "base.html" %}
{#% load endless %#}
{% block head %}
    <script>
    $(document).ready(function() {
        $('#ApplyDoctor').editable();
    });    
    </script> 
{% endblock %}
{% block content %}
    <h2>事前審查案件</h2>

    <table class="table">
    {% for case in page_obj %}
    <tr>
    <td>{{ case.ChartNo }}</td>
    <td>{{ case.PatientName }}</td>
    <td>{{ case.ApplyTypeDesc }}</td>
    <td>{{ case.StatusDesc }}</td>
    <td>{{ case.NhiDeptName }}</td>

    <td>{{ case.PackageTime|date:"Y-m-d" }}</td>
    <td>{{ case.OrderCode }}</td>
    <td>{{ case.OrderName }}</td>
    <td>{{ case.ResultDesc }}</td>
    <td>{{ case.Quantity }}</td>

    <td>{{ case.ExamineQuantity }}</td>
    <td>{{ case.ExamineDate|date:"Y-m-d" }}</td>
    <!-- <td>{{ case.ApplyDoctor }}</td> -->

    <td><a href="#" id="ApplyDoctor" data-type="text" data-pk="1" data-url="/post" data-title="Enter username">{{ case.ApplyDoctor }}</a></td>

    <!-- <td>{{ case.ResultDesc }}</td> -->
    <!-- <td>{{ case.Quantity }}</td> -->


    </tr>
    {% endfor %}
    </table>

    <div class="pagination">
        <span class="step-links">
            {% if page_obj.has_previous %}
                <a href="?page=1">&laquo; first</a>
                <a href="?page={{ page_obj.previous_page_number }}">previous</a>
            {% endif %}

            <span class="current">
                Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
            </span>

            {% if page_obj.has_next %}
                <a href="?page={{ page_obj.next_page_number }}">next</a>
                <a href="?page={{ page_obj.paginator.num_pages }}">last &raquo;</a>
            {% endif %}
        </span>
    </div>
{% endblock %}

