{% extends 'checkIn/layout.html' %}
{% block body %}
<div class="container">
    {% if result == None %}
    <div class="alert alert-warning" style="text-align:center">
        <h3 style="text-align:center">还没有任何签到记录。</h3>
        <a href="/checkIn/main/">返回</a>
    </div>
    {% else %}
        <table class="table table-striped">
            <caption>
                <h4>目前人数<u>{{ result|length }}</u> </h4><br>
                <a href="/checkIn/main/">返回</a><br>
                <a href="/checkIn/getCSV/?c_ID={{c_ID}}">下载签到表格</a> 
                {% if result|length > 0 %}
                &nbsp;<a href="/addon/luckydraw/?c_ID={{c_ID}}">幸运抽奖</a> 
                {% endif %}
            </caption>
            <tr>
                {% for k in keys %}
                    <th>{{k}}</th>
                {% endfor %}
            </tr>
            {% for r in result %}
                <tr>
                    {% for k in r %}
                        {% if k.type in isFile %}
                        <th><a href="{{url_prefix}}{{k.value}}">下载</a></th>
                        {% endif %}
                        {% if k.type in isNotFile %}
                        <th>{{k.value}}</th>
                        {% endif %}
                        
                    {% endfor %}
                </tr>
            {% endfor %}
        </table>
    {% endif %}
 </div>
{% endblock %}