category_layout.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <table class="table table-bordered">
  2. <thead class="categoryhead">
  3. <tr>
  4. <td colspan="5">
  5. <div><strong><a href="{{ url_for('forum.view_category', category_id=category.id) }}">{{ category.title }}</a></strong></div>
  6. </td>
  7. </tr>
  8. </thead>
  9. <tbody class="forumbody">
  10. <tr class="forum_stats">
  11. <td colspan="2"><strong>Forum</strong></td>
  12. <td width="85" align="center" style="white-space: nowrap"><strong>Topics</strong></td>
  13. <td width="85" align="center" style="white-space: nowrap"><strong>Posts</strong></td>
  14. <td width="200" align="center" style="white-space: nowrap"><strong>Last Post</strong></td>
  15. </tr>
  16. {% for forum in category.children %}
  17. <tr>
  18. <td align="center" valign="center" width="1">
  19. New </br> Posts
  20. </td>
  21. <td valign="top">
  22. <strong><a href="{{ url_for('forum.view_forum', forum_id=forum.id) }}">{{ forum.title }}</a></strong>
  23. <div class="forum-description">
  24. {% autoescape false %}
  25. {{ forum.description|markup }}
  26. {% endautoescape %}
  27. <br />
  28. <!--
  29. <strong>Sub Forums:</strong> <a href="#" title="">Subforum 1</a>, <a href="#" title="">Subforum 2</a>
  30. -->
  31. </div>
  32. </td>
  33. <td valign="top" align="center" style="white-space: nowrap">{{ forum.topic_count }}</td>
  34. <td valign="top" align="center" style="white-space: nowrap">{{ forum.post_count }}</td>
  35. <td valign="top" align="right" style="white-space: nowrap">
  36. {% if forum.last_post_id %}
  37. <a href="{{ url_for('forum.view_post', post_id=forum.last_post_id) }}" title="{{ forum.last_post.topic.title }}">
  38. <strong>{{ forum.last_post.topic.title|crop_title }}</strong>
  39. </a>
  40. <br />
  41. {{ forum.last_post.date_created|time_since }}<br />
  42. by <a href="{{ url_for('user.profile', username=forum.last_post.user.username) }}">{{ forum.last_post.user.username }}</a>
  43. {% else %}
  44. No posts
  45. {% endif %}
  46. </td>
  47. </tr>
  48. {% endfor %}
  49. </tbody>
  50. </table>