{% extends 'group/layout.html.twig' %}
{% block title %}{{'小组'|trans}} {{ parent() }}{% endblock %}
{% block content %}
  <ol class="breadcrumb breadcrumb-o" style="margin-top:-18px">
    <li><a href="{{path('homepage')}}">{{ homepage.name|default('首页'|trans) }}</a></li>
    <li class="active"><a href="{{path('group')}}">{{ group.name|default ('小组主页'|trans)}}</a></li>
  </ol>
  <div class="row">
    <div class="col-md-9">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title">{{'热门小组'|trans}}</h3>
          <a href="{{path('group_search_group')}}" class="more"><i class="es-icon es-icon-morehoriz"></i></a>
        </div>
        <div class="panel-body">
          <div class="row media-group-list">
            {% for group in activeGroup %}
              <div class="media media-group col-md-4 col-sm-4">
                <div class="media-left">
                  <a href="{{path('group_show',{id:group.id})}}" title="{{group.title}}">
                    <img src="{{filepath(group.logo, 'group.png')}}" alt="{{group.title}}" class="avatar-square-md">
                  </a>
                </div>
                <div class="media-body">
                  <div class="title">
                    <a class="gray-darker" href="{{ path('group_show',{id:group.id}) }}" title="{{group.title}}">
                      {{ group.title|sub_text(9) }}
                    </a>
                  </div>
                  <div class="metas">
                    <span><i class="es-icon es-icon-people"></i>{{ group.memberNum }}</span>
                    <span><i class="es-icon es-icon-textsms"></i>{{ group.threadNum }}</span>
                  </div>
                </div>
              </div>
            {% else %}
              <div class="empty">{{'暂无小组信息！'|trans}}</div>
            {% endfor %}
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"><h3 class="panel-title">{{'最近话题'|trans}}</h3></div>
        <div class="panel-body">
          {% include 'my/learning/group/groups-threads-ul.html.twig' with {
          threads:recentlyThread,
          groups:groupinfo,
          users:owners,
          }%}
        </div>
      </div>
    </div>
    {% include 'group/sidebar.html.twig' %}
  </div>
{% endblock %}