user_nav.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {% load i18n misago_avatars misago_shorthands %}
  2. <ul class="nav navbar-nav navbar-nav-user navbar-right">
  3. <li class="dropdown">
  4. <a href="{% url USER_PROFILE_URL user_slug=user.slug user_id=user.id %}" class="dropdown-toggle user-toggle" data-toggle="dropdown">
  5. <span class="glyphicon glyphicon-chevron-down"></span>
  6. <img src="{{ user|avatar:30 }}" alt="{% trans "Your avatar" %}">
  7. {{ user }}
  8. </a>
  9. <ul class="dropdown-menu">
  10. <li>
  11. <a href="{% url USER_PROFILE_URL user_slug=user.slug user_id=user.id %}">
  12. <span class="fa fa-user"></span>
  13. {% trans "See your profile" %}
  14. </a>
  15. </li>
  16. <li>
  17. <a href="{% url USERCP_URL %}">
  18. <span class="fa fa-cog"></span>
  19. {% trans "Change options" %}
  20. </a>
  21. </li>
  22. <li>
  23. <a href="{% url 'misago:notifications' %}">
  24. <span class="badge fade {{ user.new_notifications|iftrue:"in" }} pull-right" data-misago-badge="notifications.count">{{ user.new_notifications }}</span>
  25. <span class="fa fa-bell-o"></span>
  26. {% trans "See all notifications" %}
  27. </a>
  28. </li>
  29. <li class="divider"></li>
  30. <li>
  31. <a href="{% url 'misago:new_threads' %}">
  32. <span class="badge fade {{ user.new_threads|iftrue:"in" }} pull-right" data-misago-badge="new_threads">{{ user.new_threads }}</span>
  33. <span class="fa fa-plus-circle"></span>
  34. {% trans "New threads" %}
  35. </a>
  36. </li>
  37. <li>
  38. <a href="{% url 'misago:unread_threads' %}">
  39. <span class="badge fade {{ user.unread_threads|iftrue:"in" }} pull-right" data-misago-badge="unread_threads">{{ user.unread_threads }}</span>
  40. <span class="fa fa-signal"></span>
  41. {% trans "Unread threads" %}
  42. </a>
  43. </li>
  44. <li class="divider"></li>
  45. <li>
  46. <form action="{% url LOGOUT_URL %}" method="POST">
  47. {% csrf_token %}
  48. <button>
  49. <span class="fa fa-power-off"></span>
  50. {% trans "Sign out" %}
  51. </button>
  52. </form>
  53. </li>
  54. </ul>
  55. </li>
  56. </ul>
  57. <ul class="nav navbar-nav navbar-nav-primary navbar-right">
  58. {% if user.acl.can_see_reports %}
  59. <li>
  60. <a href="#" class="tooltip-bottom" title="{% trans "Reported content" %}">
  61. <span class="fa fa-exclamation-triangle fa-fw"></span>
  62. <span class="badge">57</span>
  63. </a>
  64. </li>
  65. {% endif %}
  66. {% if user.acl.can_review_moderated_content %}
  67. <li>
  68. <a href="{% url 'misago:moderated_content' %}" class="tooltip-bottom" data-misago-tooltip="moderated_content.message" {% if user.moderated_content %}
  69. title="{% blocktrans with moderated=user.moderated_content count counter=user.moderated_content %}{{ moderated }} item in moderation{% plural %}{{ moderated }} items in moderation{% endblocktrans %}"
  70. {% else %}
  71. title="{% trans "Moderated content" %}"
  72. {% endif %}>
  73. <span class="fa fa-eye-slash fa-fw"></span>
  74. <span class="badge fade {{ user.moderated_content|iftrue:"in" }}" data-misago-badge="moderated_content.count">{{ user.moderated_content }}</span>
  75. </a>
  76. </li>
  77. {% endif %}
  78. <li>
  79. <a href="{% url 'misago:private_threads' %}" class="tooltip-bottom" data-misago-tooltip="private_threads.message" {% if user.unread_private_threads %}
  80. title="{% blocktrans with unread=user.unread_private_threads count counter=user.unread_private_threads %}{{ unread }} unread private thread{% plural %}{{ unread }} unread private threads{% endblocktrans %}"
  81. {% else %}
  82. title="{% trans "Private threads" %}"
  83. {% endif %}>
  84. <span class="fa fa-inbox fa-fw"></span>
  85. <span class="badge fade {{ user.unread_private_threads|iftrue:"in" }}" data-misago-badge="private_threads.count">{{ user.unread_private_threads }}</span>
  86. </a>
  87. </li>
  88. <li class="user-notifications-nav dropdown">
  89. <a href="{% url 'misago:notifications' %}" class="dropdown-toggle tooltip-bottom" data-misago-tooltip="notifications.message"
  90. {% if user.new_notifications %}
  91. title="{% blocktrans with notifications=user.new_notifications count counter=user.new_notifications %}{{ notifications }} new notification{% plural %}{{ notifications }} new notifications{% endblocktrans %}"
  92. {% else %}
  93. title="{% trans "Notifications" %}"
  94. {% endif %}
  95. data-toggle="dropdown">
  96. <span class="fa fa-bell-o fa-fw"></span>
  97. <span class="badge fade {{ user.new_notifications|iftrue:"in" }}" data-misago-badge="notifications.count">{{ user.new_notifications }}</span>
  98. </a>
  99. <div class="dropdown-menu">
  100. <div class="display"></div>
  101. <div class="loader">
  102. <div class="bounce1"></div>
  103. <div class="bounce2"></div>
  104. <div class="bounce3"></div>
  105. <p>{% trans "Loading..." %}</p>
  106. </div>
  107. </div>
  108. </li>
  109. </ul>