{% extends "forum/_base.html" %}

{% from "macros/box.html" import m_box_menu, m_box_content %}
{% from "forum/_macros.html" import m_postattachments %}
{% from "forum/_macros.html" import forum_menu %}

{% block forumcontent %}
  <div class="col-md-12">
    {%- block forumsidebar %}

      <div class="forum-menu-container">
        <div class="forum-menu" role="group" style="width:100%;">
          <span style="color:gray;">{{ _("Showing :") }}</span>
          {%- set global_actions = actions.for_category('forum:global') %}
          {{ forum_menu(global_actions) }}
        </div>
      </div>

    {%- endblock %}

    {% for month, posts in grouped_posts %}
      <br>
      <h2>{{ month }}</h2>
      <table border="0" class="attachment-table">
        <tr>
          <th style="width:33%;">
            {{ _("Topic") }}
          </th>
          <th style="width: 8.9%;text-align:center;">
            {{ _("Owner") }}
          </th>
          <th style="float:left;position: relative;left: 5px;">
            {{ _("Document") }}
          </th>
          <th>
            {{ _("Size") }}
          </th>
        </tr>
        {% for post in posts %}
          {{ m_postattachments(post) }}
        {% endfor %}
      </table>
    {% else %}
      <p>{{ _("No attachment has been posted to this community yet") }}</p>
    {% endfor %}
  </div>
{% endblock %}

