header.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {% load i18n %}
  2. <h1 class="user-name">
  3. {{ profile }}
  4. {% if profile.title or profile.rank.is_tab %}
  5. <small class="user-title">
  6. {% if profile.rank.is_tab %}
  7. <a href="{% url 'misago:users_rank' rank_slug=profile.rank.slug %}">{{ profile.full_title }}</a>
  8. {% else %}
  9. <span>{{ profile.full_title }}</span>
  10. {% endif %}
  11. </small>
  12. {% endif %}
  13. </h1>
  14. {% if user.is_authenticated %}
  15. <div class="page-actions">
  16. {% if can_message %}
  17. <button class="btn btn-default btn-message pull-left">
  18. <span class="fa fa-envelope-o"></span>
  19. {% trans "Message" %}
  20. </button>
  21. {% elif not is_authenticated_user %}
  22. <button class="btn btn-default btn-message tooltip-bottom pull-left" disabled="disabled" title="{{ cant_message_reason }}">
  23. <span class="fa fa-envelope-o"></span>
  24. {% trans "Message" %}
  25. </button>
  26. {% endif %}
  27. {% if profile.acl_.can_follow %}
  28. <form action="{% url 'misago:follow_user' user_slug=profile.slug user_id=profile.id %}" method="POST" class="pull-left dynamic-button">
  29. {% csrf_token %}
  30. <button class="btn btn-default btn-follow {% if profile.is_followed %}active{% endif %}">
  31. <span class="fa fa-heart"></span>
  32. {% trans "Follow" %}
  33. </button>
  34. </form>
  35. {% endif %}
  36. {% if profile.acl_.can_block %}
  37. <form action="{% url 'misago:block_user' user_slug=profile.slug user_id=profile.id %}" method="POST" class="pull-left dynamic-button">
  38. {% csrf_token %}
  39. <button class="btn btn-default btn-ban {% if profile.is_blocked %}active{% endif %}">
  40. <span class="fa fa-ban"></span>
  41. {% trans "Block" %}
  42. </button>
  43. </form>
  44. {% endif %}
  45. {% include "misago/modusers/mod_options.html" %}
  46. </div>
  47. {% endif %}
  48. <div class="user-details">
  49. <ul class="list-unstyled">
  50. <li class="user-active pull-left">
  51. {% include "misago/profile/state.html" %}
  52. </li>
  53. <li class="user-joined-on pull-left">
  54. <span class="tooltip-top" title="{% trans "Joined on" %}">
  55. <span class="fa fa-clock-o fa-fw"></span>
  56. {{ profile.joined_on|date }}
  57. </span>
  58. </li>
  59. {% if show_email %}
  60. <li class="user-email pull-left">
  61. <a href="mailto:{{ profile.email }}" class="tooltip-top"title="{% trans "E-mail address" %}">
  62. <span class="fa fa-envelope-o fa-fw"></span>
  63. {{ profile.email }}
  64. </a>
  65. </li>
  66. {% endif %}
  67. </ul>
  68. </div>