{% extends 'my/layout.html.twig' %}

{% block title %}{{'我的小组'|trans}} - {{ parent() }}{% endblock %}

{% set side_nav = 'my-group' %}
{% set tab_nav = 'index' %}
{% block main %}
    {% embed "bootstrap/panel.html.twig" with {class:'panel-col'} %}
      {% block heading %}
        {{'我的小组'|trans}}
      {% endblock %}

      {% block body %}
          <div class="row">

            <div class="col-md-12">

              {% include 'my/learning/group/group-member-nav-pill.html.twig' %}

              <div class="page-header">
                <h4> {{'我加入的小组'|trans}}<a class="badge pull-right" href="{{path('my_group_member_join',{type:'myGroup'})}}" style="background-color:#3cb373;">{{groupsCount}}</a></h4>
              </div>

              {% include 'my/learning/group/groups-ul.html.twig' with {
              'groups':groups,  }
              %}

            </div>

            <div class="col-md-12">

              <div class="page-header">
                <h4>{{'我发起的话题'|trans}}<a class="badge pull-right" href="{{path('my_group_member_threads')}}" style="background-color:#3cb373;">{{threadsCount}}</a></h4>
              </div>

              {% include 'my/learning/group/groups-threads-ul.html.twig' with {
              'threads':ownThreads,
              'groups':groupsAsOwnThreads, }
              %}

            </div>

            <div class="col-md-12">

              <div class="page-header">
                <h4>{{'回复的话题'|trans}}<a class="badge pull-right" href="{{path('my_group_member_posts')}}" style="background-color:#3cb373;">{{postsCount}}</a></h4>
              </div>

              {% include 'my/learning/group/groups-threads-ul.html.twig' with {
              'lastPostMembers':postLastPostMembers,
              'groups':groupsAsPostThreads,
              'threads':threads,
              'user':user,}
              %}

            </div>

            <div class="col-md-12">

              <div class="page-header">
                <h4>{{'收藏的话题'|trans}}<a class="badge pull-right" href="{{path('my_group_thread_collecting')}}" style="background-color:#3cb373;">{{collectCount}}</a></h4>
              </div>

              {% include 'my/learning/group/groups-threads-ul.html.twig' with {
              'lastPostMembers':collectLastPostMembers,
              'groups':groupsAsCollectThreads,
              'threads':collectThreads,
              'user':user,}
              %}

            </div>

          </div>
      {% endblock %}
    {% endembed %}
{% endblock %}