{% import "TopxiaWebBundle::macro.html.twig" as web_macro %}
<li id="post-{{ post.id }}" class="thread-post media clearfix">
  {{ web_macro.user_avatar(author, 'pull-left media-object') }}

  {% if isManager or app.user.id == author.id %}
  <div class="thread-post-dropdown">
    <a href="javascript:" class="dropdown-toggle text-muted" data-toggle="dropdown"><i class="glyphicon glyphicon-collapse-down"></i></a>
    <ul class="dropdown-menu pull-right">
      <li><a href="{{ path('course_thread_post_edit', {courseId:course.id,threadId:thread.id, id:post.id}) }}"><i class="glyphicon glyphicon-edit"></i> 编辑</a></li>
      {% if isManager %}
        <li><a href="javascript:" data-action="post-delete" data-url="{{ path('course_thread_post_delete', {courseId:course.id,threadId:thread.id, id:post.id}) }}" data-for="#post-{{ post.id }}"><i class="glyphicon glyphicon-remove"></i> 删除</a></li>
      {% endif %}
    </ul>
  </div>
  {% endif %}

  <div class="thread-post-body media-body" style="word-break:break-all;">
    <div class="media-heading">
      <a href="javascript:">{{ author.nickname }}</a>
      <span class="bullet">•</span>
      <span class="text-muted">{{ post.createdTime|smart_time }}</span>


    </div>
    <div class="thread-post-content">{{ post.content|raw }}</div>
    {% if app.user.id != author.id %}
    <div class="thread-post-action" data-user="{{ author.nickname }}"><a href="#thread-post-form" >回复</a></div>
    {% endif %}
  </div>
</li>