{% extends 'bootstrap-modal-layout.html.twig' %}

{% block title %}{{'查看本课程的所有公告'|trans}}{% endblock %}

{% block body %}

<table class="table table-bordered">
        <thead>
          <tr>
            <th>{{'创建者'|trans}}</th>
            <th>{{'公告内容'|trans}}</th>
            <th>{{'创建时间'|trans}}</th>
            <th>{{'更新时间'|trans}}</th>
          </tr>
        </thead>
        <tbody>
        	{% for announcement in announcements %}
		          <tr>
		            <td > {{ users[announcement.userId].nickname}} </td>
		            <td>{{ announcement.content | raw }}</td>
		            <td>{{ announcement.createdTime|date('Y-n-d H:i:s')}}</td>
		            {% if announcement.updatedTime == 0 %}
		               <td> {{'尚未更新'|trans}}</td>
		            {% else %}
		            <td>{{ announcement.createdTime|date('Y-n-d H:i:s')}}</td>
		            {% endif %}
		          </tr>
			{% endfor %}
        </tbody>
</table>

{% endblock %}

{% block footer %}
    <button type="button" class="btn btn-default" data-dismiss="modal">{{'退出'|trans}}</button>
{% endblock %}

{% set hideFooter = true %}
