<div class="media topic-item">
  <div class="media-left media-middle">
    {{ web_macro.user_avatar(author, 'pull-left', 'avatar-sm', true)}}
  </div>
  <div class="media-body">
    <div class="title">
      {% if thread.type == 'question'%}
        <i class="es-icon es-icon-help color-danger" data-toggle="tooltip" data-placement="top" title="{{'问答'|trans}}"></i>
      {% endif %}
      {% if thread.type == 'event'%}
        <i class="es-icon es-icon-locationcircle color-primary" data-toggle="tooltip" data-placement="top" title="{{'活动'|trans}}"></i>
      {% endif %}
      
      {% if thread.type == 'discussion' %}   
        <i class="es-icon es-icon-chatcircle color-info" data-toggle="tooltip" data-placement="top" title="{{'话题'|trans}}"></i>
      {% endif %}
      <a  href="{{ path(target.type ~ '_thread_show', {(target.type ~ 'Id'): target.id, threadId:thread.id}) }}">{{ thread.title }}
      </a>
      
      {% if thread.sticky %}
        <span class="label label-primary" title="{{'置顶帖'|trans}}">{{'置顶'|trans}}</span>
      {% endif %}
      {% if thread.nice %}
        <span class="label label-danger" title="{{'精华帖'|trans}}">{{'精华'|trans}}</span>
      {% endif %}
    </div>
    
    <div class="metas text-sm">
      <a href="{{ path('user_show', {id:author.id}) }}" class="color-gray">{{ author.nickname }}</a>
      <span>{{'发起了%dict_text%'|trans({'%dict_text%':dict_text('threadType', thread.type)})}}</span>
      {% if thread.postNum > 0 and users[thread.lastPostUserId] is defined %}
        {% set poster = users[thread.lastPostUserId] %}
        •
        <span>{{'最后回复'|trans}} {{ web_macro.user_link(poster, 'link-primary') }}</span>
      {% endif %}
      
      • <span>{{ thread.lastPostTime|smart_time }}</span>
    </div>
  </div>
  <div class="media-data hidden-xs">
    <span>{{ thread.postNum }}<br>{{'回复'|trans}}</span>
    <span>{{ thread.hitNum }}<br>{{'浏览'|trans}}</span>
  </div>
</div>