app/Resources/views/my/learning/group/groups-threads-ul.html.twig line 31

Open in your IDE?
  1. <ul class="media-list thread-list">
  2.   {% for thread in threads %}
  3.     {% set group = groups[thread.groupId]|default(null) %}
  4.     {% if users|default(null) %}
  5.     {% set user = users[thread.userId]|default(null) %}
  6.     {% endif %}
  7.     <li class="media">
  8.       <div class="media-left">
  9.         <span class="reply-num">
  10.          <strong>{% if thread.postNum %} {{thread.postNum}} {% else %} 0 {% endif %}</strong> {{'thread.reply'|trans}}
  11.         </span>
  12.       </div>
  13.       <div class="media-body pts">
  14.         <div class="media-heading">
  15.          <a class="title gray-darker" href="{{ path('group_thread_show', {id:thread.groupId, threadId:thread.id}) }}">{{thread.title|sub_text(90)}}</a>
  16.           {% if thread.isStick %}
  17.             <span class="label label-primary">{{'thread.status.stick'|trans}}</span>
  18.           {% endif %}
  19.           {% if thread.isElite %}
  20.             <span class="label label-danger">{{'thread.status.essence'|trans}}</span>
  21.           {% endif %}
  22.           {% if is_feature_enabled('group_reward') %}
  23.             {% if thread.type == 'reward' and thread.rewardCoin > 0 %}
  24.               <span class="label label-danger">{{'thread.status.reward'|trans}}</span>
  25.             {% endif %}
  26.           {% endif %}
  27.         </div>
  28.         <div class="metas">
  29.           {{ web_macro.user_avatar(user, 'userImg', 'avatar-xxs') }}
  30.           {{ web_macro.user_link(user ,'pls') }}{{'thread.create'|trans}}
  31.           <span class="divider">•</span>
  32.           {{thread.createdTime|smart_time}}
  33.           {% if group %}
  34.           <span class="divider">•</span>
  35.           <a class="gray-darker" href="{{path('group_show',{id:thread.groupId})}}" title="{{ group.title }}" >{{ group.title }}</a>
  36.           {% endif %}
  37.           {% if thread.lastPostTime %}
  38.             <span class="divider">•</span>
  39.             {{'thread.last_reply'|trans}} {{ web_macro.user_link(lastPostMembers[thread.lastPostMemberId] , 'color-gray') }}
  40.             <span class="divider">•</span>
  41.             {{ thread.lastPostTime|smart_time}}
  42.           {% endif %}
  43.           {% if app.user.isLogin()|default(false) and app.user.id != thread.userId and is_reported('group_thread', thread.id)  %}
  44.             <span style="color: red;">({{ '已举报'|trans }})</span>
  45.           {% endif %}
  46.           {% if thread.auditStatus == 'illegal' %}
  47.             &nbsp;&nbsp;<span class="color-danger">({{ 'site.content.illegal_status'|trans }})</span>
  48.           {% endif %}
  49.         </div>
  50.       </div>
  51.     </li>
  52.   {% else %}
  53.     <li class="empty">{{'thread.empty'|trans}}</li>
  54.   {% endfor %}
  55. </ul>