reply.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% from 'base/paginate.html' import paginate %}
  2. <div class="panel panel-default">
  3. <div class="panel-heading clearfix">
  4. <span style="float:right">
  5. 排序:
  6. <div class="btn-group btn-group-xs" role="group">
  7. <a href="" class="btn btn-default active">时间</a>
  8. <a href="" class="btn btn-default">投票</a>
  9. </div>
  10. </span>
  11. </div>
  12. {% if replies.items %}
  13. {% if setting.reply_list == 1 or (setting.reply_list == 2 and g.user.is_authenticated) or (g.user.is_authenticated and g.user.username == g.user_url) %}
  14. {% for reply in replies.items %}
  15. <div class="panel-body" style="border-bottom:1px solid #eee">
  16. <span style="font-size:12px;color:#999;">回复了 {{ reply.username }} 创建的主题:
  17. <a href="{{ url_for('topic.topic',uid=reply.topic.uid)}}">{{ reply.topic.title}}</a>
  18. </span>
  19. <p>{{ reply.content }}</p>
  20. <span style="font-size:12px;color:#999;">
  21. 回复日期:{{ reply.publish.strftime('%Y-%m-%d %H:%M') }}
  22. </span>
  23. </div>
  24. {% endfor %}
  25. {% if replies.pages > 1 %}
  26. <div class="panel-footer">
  27. {{ paginate(replies,'user.reply')}}
  28. </div>
  29. {% endif %}
  30. {% else %}
  31. <div class="panel-body" style="border:1px dashed #337ab7;margin:5px;">
  32. <span class="text-center" style="display:block;width:100%;color:#999">
  33. <span class="glyphicon glyphicon-lock" aria-hidden="true" style="font-size:16px;"></span>
  34. 根据用户设置,列表被隐藏
  35. </span>
  36. </div>
  37. {% endif %}
  38. {% else %}
  39. <div class="panel-body text-center">
  40. 没有回复
  41. </div>
  42. {% endif %}
  43. </div>