topic.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <div class="panel panel-default">
  2. <div class="panel-heading clearfix">
  3. <span style="float:right">
  4. {{_('Sort:')}}
  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">{{_('time')}}</a>
  8. <a href="{{ url_for('user.topic',orderby='vote')}}" class="btn btn-default active">{{_('vote')}}</a>
  9. {% else %}
  10. <a href="" class="btn btn-default active">{{_('time')}}</a>
  11. <a href="{{ url_for('user.topic',orderby='vote')}}" class="btn btn-default">{{_('vote')}}</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. {{_('create time:')}}{{ topic.publish | timesince }}
  24. · {{ _('the last reply published by %(author)s',author=link_base.user(topic.author.username))}}
  25. </div>
  26. </div>
  27. {% endfor %}
  28. {{ p_footer(topics,'user.topic')}}
  29. {% else %}
  30. <div class="panel-body" style="border:1px dashed #337ab7;margin:5px;">
  31. <span class="text-center" style="display:block;width:100%;color:#999">
  32. <span class="glyphicon glyphicon-lock" aria-hidden="true" style="font-size:16px;"></span>
  33. {{_("Due to user's setting,the list have been hidden.")}}
  34. </span>
  35. </div>
  36. {% endif %}
  37. {% else %}
  38. <div class="panel-body text-center">
  39. {{_('No Topic')}}
  40. </div>
  41. {% endif %}
  42. </div>