{{extend 'layout.html'}}
        {{for task in m_db(m_db.task.active == True).select():}}
        {{if auth.user.name in task.people:}}
            <div class="row">
                <div id="web2py_user_form" class="col-lg-6" style="background-color:white; margin: 0 auto 5px auto; box-shadow: 0 0 5px #a1a1a1; border-radius:5px;padding: 20px">
                    <h2>{{=task.name}}</h2>
                    <HR style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" color=#987cb9 SIZE=3>
                    <div class="component_contents">
                        <ul>
                            <li>是否完成：{{if auth.user.name in task.dopeople:}}{{if_done=True}}已完成{{pass}}
                                {{else:}}{{if_done = False}}未完成{{pass}}</li>

                            <li>截止时间：{{=task.end_date}}</li>
                            <li>参与人数：{{=len(task.people)}}</li>
                            <li>已完成人数：{{=len(task.dopeople)}}</li>
                            <li>任务信息：{{=task.info}}</li>
                        </ul>
                    </div>
                    {{if auth.has_membership(group_id=1) or task.admindo is False:}}
                    <div class="jumbotron jumbotron-fluid" style="padding:15px;word-wrap:break-word;">
                        <div class="container center">
                            {{if task.admindo is False and if_done == False:}}
                                <a class="btn btn-secondary" href={{=URL('default','finish_task',args=[task.id,auth.user.id])}}>完成任务</a>
                            {{pass}}
                            {{if auth.has_membership(group_id=1):}}
                                <a class="btn btn-secondary" href={{=URL('default','monitorctl',args=[task.id])}}>班委管理</a>
                            {{pass}}
                        </div>
                    </div>
                    {{pass}}
                </div>
            </div>
        {{pass}}
        {{pass}}