profile_layout.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {% extends theme("layout.html") %}
  2. {% block content %}
  3. {% block breadcrumb %}
  4. {% endblock %}
  5. <div class="page-view">
  6. <div class="row">
  7. <div class="col-md-12 col-sm-12 col-xs-12">
  8. <div class="panel page-panel">
  9. <div class="panel-heading page-head">
  10. <a href="{{ user.url }}">{{ user.username }}</a>
  11. </div>
  12. <div class="panel-body page-body profile-body">
  13. {% block profile_sidebar %}
  14. <div class="col-md-3 col-sm-3 col-xs-12 profile-sidebar">
  15. <div class="profile-picture">
  16. {% if user.avatar %}
  17. <img src="{{ user.avatar }}" alt="{{ user.username }}'s Avatar">
  18. {% endif %}
  19. </div>
  20. <div class="profile-groupname">
  21. {{ user.primary_group.name }}
  22. </div>
  23. <div class="profile-online" data-toggle="tooltip" data-placement="top" title="{%- if user.lastseen -%} {{ user.lastseen|time_since }} {%- else -%} {% trans %}Never seen{% endtrans %} {%- endif -%}">
  24. {%- if user|is_online %}
  25. <span class="label label-success">online</span>
  26. {%- else %}
  27. <span class="label label-default">offline</span>
  28. {%- endif %}
  29. </div>
  30. <div class="profile-sidebar-stats">
  31. <div class="profile-posts">
  32. {{ user.post_count }} posts
  33. </div>
  34. <div class="profile-date">
  35. {{ user.date_joined|format_date('%b %d %Y') }}
  36. </div>
  37. <div class="profile-buttons">
  38. {% if current_user.is_authenticated() %}
  39. <a class="btn btn-primary" href="{{url_for('message.new_conversation') }}?to_user={{ user.username }}">
  40. {% trans %}Message{% endtrans %}
  41. </a>
  42. {% endif %}
  43. </div>
  44. </div>
  45. {% block profile_navigation %}
  46. <ul class="nav profile-sidenav" id="profile-tabs" role="tablist">
  47. <li class="active">
  48. <a href="{{ user.url }}#overview" role="tab" data-toggle="tab">
  49. <span class="fa fa-home"></span> {% trans %}Overview{% endtrans %}
  50. </a>
  51. </li>
  52. {#
  53. <li>
  54. <a href="{{ user.url }}#info" role="tab" data-toggle="tab">
  55. <span class="fa fa-line-chart"></span> {% trans %}Statistics{% endtrans %}
  56. </a>
  57. </li>
  58. #}
  59. <li>
  60. <a href="{{ url_for('user.view_all_topics', username=user.username) }}">
  61. <span class="fa fa-comments"></span> {% trans %}Topics{% endtrans %}
  62. </a>
  63. </li>
  64. <li>
  65. <a href="{{ url_for('user.view_all_posts', username=user.username) }}">
  66. <span class="fa fa-comment"></span> {% trans %}Posts{% endtrans %}
  67. </a>
  68. </li>
  69. </ul>
  70. {% endblock %}
  71. </div>
  72. {% endblock %}
  73. {% block profile_content %}
  74. {% endblock %}
  75. </div> <!-- end profile widget -->
  76. </div> <!-- end page-panel -->
  77. </div> <!-- end col -->
  78. </div> <!-- end row -->
  79. </div> <!-- end page-view -->
  80. {% endblock %} {# content #}
  81. {% block scripts %}
  82. <script>
  83. $(function () {
  84. $('[data-toggle="tooltip"]').tooltip()
  85. })
  86. $('#profile-tabs a[href="#overview"]').tab('show') // Select tab by name
  87. //$('#profile-tabs a[href="#info"]').tab('show') // Select tab by name
  88. </script>
  89. {% endblock %}