all_topics.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {% extends theme('layout.html') %}
  2. {% from theme('macros.html') import render_pagination %}
  3. {% block content %}
  4. <ul class="breadcrumb">
  5. <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
  6. <li ><a href="{{ url_for('user.profile', username=user.username) }}">{{ user.username }}</a></li>
  7. <li class="active">All Topics</li>
  8. </ul>
  9. <div class="pull-left">
  10. {{ render_pagination(topics, url_for('user.view_all_topics', username=user.username)) }}
  11. </div> <!-- end span pagination -->
  12. <table class="table table-bordered">
  13. <thead>
  14. <tr>
  15. <th colspan="5">
  16. All Topics created by {{ user.username }}
  17. </th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. <tr>
  22. <td colspan="2">Thread</td>
  23. <td>Posts</td>
  24. <td>Views</td>
  25. <td>Last Post</td>
  26. </tr>
  27. {% for topic in topics.items %}
  28. <tr>
  29. <td width="4%"></td>
  30. <td>
  31. <div>
  32. <a href="{{ url_for('forum.view_topic', topic_id=topic.id) }}">{{ topic.title }}</a> <br />
  33. <small>by <a href="{{ url_for('user.profile', username=topic.user.username) }}">{{ topic.user.username }}</a></small>
  34. </div>
  35. </td>
  36. <td>
  37. {{ topic.post_count }}
  38. </td>
  39. <td>
  40. {{ topic.views }}
  41. </td>
  42. <td>
  43. <a href="{{ url_for('forum.view_topic', topic_id=topic.id) }}#pid{{topic.last_post.id}}">{{ topic.last_post.date_created|time_since }}</a><br />
  44. <small>by <a href="{{ url_for('user.profile', username=topic.last_post.user.username) }}">{{ topic.last_post.user.username }}</a></small>
  45. </td>
  46. </tr>
  47. {% else %}
  48. <tr>
  49. <td colspan="5">
  50. No Topics so far.
  51. </td>
  52. </tr>
  53. {% endfor %}
  54. </tbody>
  55. </table>
  56. {% endblock %}