<!-- 待确认删除 -->
<li id="post-{{ post.id }}" class="thread-post thread-post-{{ post.id }} media">
  <a href="{{ path('user_show', {id:author.id}) }}" class="pull-left user-avatar">
    <img class="img-circle" src="{{ filepath(author.smallAvatar, 'avatar.png') }}" >
  </a>
  <div class="media-body">
    <div class="metas">
      {% include 'thread/post-manage-menu.html.twig' %}
      <a href="{{ path('user_show', {id:author.id}) }}" class="nickname">{{ author.nickname }}</a>
      <span class="bullet">•</span>
      <span class="color-gray">{{post.createdTime|smart_time}} </span>
      {% if author.badgeTitle|default(null) %}<span class="mll color-danger">({{ dict_text('classroomRoles', author.badgeTitle) }}) </span>{% endif %}
    </div>
    <div class="editor-text">{{ post.content|at(post.ats)|raw }}</div>
    <div class="comment-sns">
      {% include 'thread/post-interaction.html.twig' %}
    </div>
    <div class="thread-subpost-container clearfix {% if not post.subposts %}hide{% endif %}">
      {{ render(controller('AppBundle:Thread:subposts', {threadId: post.threadId, postId:post.id, less:true})) }}
      <div class="thread-subpost-morebar clearfix {% if not post.subposts %}hide{% endif %}">
        {% if service.canAccess('post.create', post) %}
          <button class="btn btn-default btn-xs pull-right js-toggle-subpost-form">{{'我也说一句'|trans}}</button>
        {% endif %}
        <span class="thread-subpost-moretext {% if post.subposts <= 5 %}hide{% endif %}"><span class="color-gray">{{'还有%post.subposts%条回复，'|trans({'%post.subposts%': post.subposts - 5})}}</span><a href="javascript:;" class="js-post-more">{{'点击查看'|trans}}</a></span>
      </div>

      {% if service.canAccess('post.create', post) %}
        <form method="post" action="{{ path('thread_post_reply', {threadId:post.threadId, postId:post.id}) }}" class="thread-subpost-form {% if post.subposts %}hide{% endif %}">
          <div class="form-group">
            <div class="controls">
              <textarea class="form-control" name="content" data-display="{{'内容'|trans}}"></textarea>
            </div>
          </div>
          <div class="form-group">
            <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
            <button type="submit" data-loading-text="{{'正在发表'|trans}}" class="btn btn-primary btn-sm pull-right">{{'发表'|trans}}</button>
          </div>
        </form>
      {% endif %}

    </div>
  </div>
</li>