topic.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <div class="panel panel-default">
  2. <div class="panel-heading clearfix">
  3. <span style="float:right">
  4. 排序:
  5. <div class="btn-group btn-group-xs" role="group">
  6. {% if request.args.get('orderby') == 'vote' %}
  7. <a href="{{ url_for('user.topic',orderby='publish')}}" class="btn btn-default">时间</a>
  8. <a href="{{ url_for('user.topic',orderby='vote')}}" class="btn btn-default active">投票</a>
  9. {% else %}
  10. <a href="" class="btn btn-default active">时间</a>
  11. <a href="{{ url_for('user.topic',orderby='vote')}}" class="btn btn-default">投票</a>
  12. {% endif %}
  13. </div>
  14. </span>
  15. </div>
  16. {% if topics.items %}
  17. {% 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) %}
  18. {% for topic in topics.items %}
  19. <div class="panel-body" style="border-bottom:1px solid #eee;font-size:16px;">
  20. <span style="color:#666">{{ topic.board.board }}</span>
  21. {{ link_base.topic(topic) }}
  22. <div style="font-size:12px;color:#999;">
  23. 创建日期:{{ topic.publish | timesince }}
  24. 最后回复来自
  25. {{ link_base.user(topic.author.username) }}
  26. </div>
  27. </div>
  28. {% endfor %}
  29. {{ p_footer(topics,'user.topic')}}
  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>