-{% load i18n %}\r
-{% load smart_if %}\r
-\r
-<div id="user-menu-container">\r
- <span id="user-menu">{% trans "User tools" %} ▼</span>\r
- <ul id="user-menu-dropdown">\r
- <li class="item"><span class="user-edit"></span><a href="{% url edit_user id=user.id %}">{% trans "edit profile" %}</a></li>\r
- <li class="item"><span class="user-auth"></span><a href="{% url user_authsettings id=user.id %}">{% trans "authentication settings" %}</a></li>\r
- <li class="item"><span class="user-subscriptions"></span><a href="{% url user_subscriptions id=user.id %}">{% trans "email notification settings" %}</a></li>\r
- {% ifnotequal user viewer %}\r
- {% if viewer.is_superuser %}\r
- <li class="separator">{% trans "Moderation tools" %}</li>\r
- <li class="item"><span class="user-award_rep"></span><a href="{% url user_award_points id=user.id %}" id="award-rep-points">{% trans "reputation bonus" %}</a></li>\r
- {% if not user.is_superuser %}\r
- {% if not user.is_staff %}\r
- <li class="item"><span class="user-moderator"></span>\r
- <a class="confirm" href="{% url user_powers id=user.id,action="grant",status="staff" %}">{% trans "grant moderator status" %}</a>\r
- </li>\r
- {% else %}\r
- <li class="item"><span class="user-moderator"></span>\r
- <a class="confirm" href="{% url user_powers id=user.id,action="remove",status="staff" %}">{% trans "remove moderator status" %}</a>\r
- </li>\r
- {% endif %}\r
- <li class="item"><span class="user-superuser"></span>\r
- <a class="confirm" href="{% url user_powers id=user.id,action="grant",status="super" %}">{% trans "grant super user status" %}</a>\r
- </li>\r
- {% else %}\r
- {% ifequal viewer.id 1 %}\r
- <li class="item"><span class="user-superuser"></span>\r
- <a class="confirm" href="{% url user_powers id=user.id,action="remove",status="super" %}">{% trans "remove super user status" %}</a>\r
- </li>\r
- {% endifequal %}\r
- {% endif %}\r
- {% endif %}\r
- {% endifnotequal %}\r
- </ul>\r
-</div>\r
-\r
-{% comment %}\r
-<h3>{% trans "Moderation tools" %}</h3>\r
-<p><a href="#" id="point-award-action">{% trans "Reputation bonus" %}</a></p>\r
-<form action="" method="POST">\r
- <table style="display: none" id="award-points-table" class="moderation-table">\r
- {{ awardform.as_table }}\r
- <tr><td colspan="2" class="moderation-table-footer"><input type="submit" id="award-points-submit" value="{% trans "Send" %}" /></td></tr>\r
- </table> \r
-</form>\r
-<script>\r
- $(function() {\r
- $('#point-award-action').click(function() {\r
- $('#award-points-table').slideToggle('slow');\r
- });\r
-\r
- $('#award-points-submit').click(function() {\r
- $('#award-points-table').find('.error').remove();\r
- var $points_input = $('#award-points-table').find('input[type=text]');\r
- var points = parseInt($points_input.val());\r
-\r
- if (isNaN(points) || points < 1) {\r
- $points_input.before('<p class="error">{% trans "Sorry but that\'s not a valid input" %}</p>');\r
- return false;\r
- }\r
-\r
- $.post('{% url user_award_points id=user.id %}')\r
- });\r
- });\r
-</script>\r
-{% if not user.is_superuser %}\r
-<p><a href="{% url user_powers id=user.id,action="grant",status="super" %}">{% trans "Grant super user status" %}</a></p>\r
- {% if not user.is_staff %}\r
- <p><a href="{% url user_powers id=user.id,action="grant",status="staff" %}">{% trans "Grant moderator status" %}</a></p>\r
- {% else %}\r
- <p><a href="{% url user_powers id=user.id,action="remove",status="staff" %}" class="">{% trans "Remove moderator status" %}</a></p>\r
- {% endif %}\r
-{% else %}\r
- {% ifequal moderator.id 1 %}\r
- {% ifnotequal user.id 1 %}\r
- <p><a href="{% url user_powers id=user.id,action="remove",status="super" %}">{% trans "Remove super user status" %}</a></p>\r
- {% endifnotequal %}\r
- {% endifequal %}\r
-{% endif %}\r
-\r
-{% endcomment %}\r
+{% load i18n smart_if ui_registry %}
+
+<div id="user-menu-container" class="context-menu">
+ <span id="user-menu" class="context-menu-trigger">{% trans "User tools" %} ▼</span>
+ <ul id="user-menu-dropdown" class="context-menu-dropdown">
+ {% loadregistry user_menu %}{% endloadregistry %}
+ </ul>
+</div>