_reply_macro.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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') == 'like' %}
  7. <a href="{{ url_for('mine.replylist',orderby='publish')}}" class="btn btn-default">{{_('time')}}</a>
  8. <a href="{{ url_for('mine.replylist',orderby='like')}}" class="btn btn-default active">{{_('likers')}}</a>
  9. {% else %}
  10. <a href="" class="btn btn-default active">{{_('time')}}</a>
  11. <a href="{{ url_for('mine.replylist',orderby='like')}}" class="btn btn-default">{{_('likers')}}</a>
  12. {% endif %}
  13. </div>
  14. </span>
  15. </div>
  16. {% if replies.items %}
  17. {% if setting.rep_list == 1 or (g.user.is_authenticated and setting.rep_list == 2) or (g.user.is_authenticated and g.user.username == g.user_url) %}
  18. {% for reply in replies.items %}
  19. <div class="panel-body" style="border-bottom:1px solid #eee">
  20. <span style="font-size:12px;color:#999;">
  21. {{_('replied %(title)s created by %(author)s',title=link_base.topic(reply.topic),author = link_base.user(reply.author))}}
  22. </span>
  23. <p>{{ reply.content | safe_clean }}</p>
  24. <span style="font-size:12px;color:#999;">
  25. {{_('replied time:')}}{{ reply.publish | timesince }}
  26. </span>
  27. </div>
  28. {% endfor %}
  29. {{ p_footer(replies,'user.reply')}}
  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. {{_("Due to user's setting,the list have been hidden.")}}
  35. </span>
  36. </div>
  37. {% endif %}
  38. {% else %}
  39. <div class="panel-body text-center">
  40. {{_('No Reply')}}
  41. </div>
  42. {% endif %}
  43. </div>