topic.html 1.7 KB

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