profile.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {% extends "layout.html" %}
  2. {% block content %}
  3. <ul class="breadcrumb">
  4. <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
  5. <li class="active">{{ user.username }}</li>
  6. </ul>
  7. <table class="table table-bordered">
  8. <thead>
  9. <th><a href="{{ url_for('user.profile', username=user.username) }}">{{ user.username }}</a></th>
  10. <th>Info</th>
  11. <th>User Stats</th>
  12. </thead>
  13. <tbody>
  14. <tr>
  15. <td width="200px">
  16. <table class="table table-borderless">
  17. <tbody>
  18. {% if user.avatar %}
  19. <tr><td><img src="{{ user.avatar }}" alt="Avatar" height="100" width="100"> </td></tr>
  20. {% endif %}
  21. <!-- TODO: Implement online status -->
  22. <tr><td><b></b> <span class="label label-success">Online</span></td></tr>
  23. <tr><td><a href="{{ url_for('user.view_all_topics', username=user.username) }}">All Topics</a></td></tr>
  24. <tr><td><a href="{{ url_for('user.view_all_posts', username=user.username) }}">All Posts</a></td></tr>
  25. </tbody>
  26. </table>
  27. </td>
  28. <td>
  29. {% if user.notes %}
  30. {% autoescape false %}
  31. {{ user.notes }}
  32. {% endautoescape %}
  33. {% else %}
  34. User has not added any notes about him.
  35. {% endif %}
  36. </td>
  37. <td width="250px">
  38. <table class="table table-borderless">
  39. <tbody>
  40. <tr>
  41. <td align="right">Group:</td>
  42. <td>{{ user.primary_group.name }}</td>
  43. </tr>
  44. <tr>
  45. <td align="right">Joined:</td>
  46. <td>{{ user.date_joined|format_date('%b %d %Y') }}</td>
  47. </tr>
  48. <tr>
  49. <td align="right">Posts:</td>
  50. <td>{{ user.post_count }} ({{ posts_per_day }} per day)</td>
  51. </tr>
  52. <tr>
  53. <td align="right">Last seen:</td>
  54. <td>{%- if user.lastseen -%} {{ user.lastseen|time_since }} {%- else -%} Never seen {%- endif -%}</td>
  55. </tr>
  56. <tr>
  57. <td align="right">Last post:</td>
  58. <td>{%- if user.last_post -%}
  59. <a href="{{ url_for('forum.view_post', post_id=user.last_post.id) }}">{{ user.last_post.date_created|time_since }}</a>
  60. {%- else -%}
  61. Never
  62. {%- endif -%}
  63. </td>
  64. </tr>
  65. <tr>
  66. <td align="right">Online time:</td>
  67. <td><b>TODO: </b>1024 hours</td>
  68. </tr>
  69. <tr>
  70. <td align="right">Location:</td>
  71. <td>{%- if user.location -%} {{ user.location }} {%- else -%} No Info {%- endif -%}</td>
  72. </tr>
  73. <tr>
  74. <td align="right">Birthday:</td>
  75. <td>{% if user.birthday %} {{ user.birthday|format_date('%b %d %Y') }} {% else %} No Info {% endif %} {% if user.gender %} ({{ user.gender }}) {% endif %}</td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. </td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. {% endblock %}