4 <div id="user-menu-container">
\r
5 <span id="user-menu">{% trans "User tools" %} ▼</span>
\r
6 <ul id="user-menu-dropdown">
\r
7 <li class="item"><span class="user-edit"></span><a href="{% url edit_user id=user.id %}">{% trans "edit profile" %}</a></li>
\r
8 <li class="item"><span class="user-auth"></span><a href="{% url user_authsettings id=user.id %}">{% trans "authentication settings" %}</a></li>
\r
9 <li class="item"><span class="user-subscriptions"></span><a href="{% url user_subscriptions id=user.id %}">{% trans "email notification settings" %}</a></li>
\r
10 {% ifnotequal user viewer %}
\r
11 {% if viewer.is_superuser %}
\r
12 <li class="separator">{% trans "Moderation tools" %}</li>
\r
13 <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
14 {% if not user.is_superuser %}
\r
15 {% if not user.is_staff %}
\r
16 <li class="item"><span class="user-moderator"></span>
\r
17 <a class="confirm" href="{% url user_powers id=user.id,action="grant",status="staff" %}">{% trans "grant moderator status" %}</a>
\r
20 <li class="item"><span class="user-moderator"></span>
\r
21 <a class="confirm" href="{% url user_powers id=user.id,action="remove",status="staff" %}">{% trans "remove moderator status" %}</a>
\r
24 <li class="item"><span class="user-superuser"></span>
\r
25 <a class="confirm" href="{% url user_powers id=user.id,action="grant",status="super" %}">{% trans "grant super user status" %}</a>
\r
28 {% ifequal viewer.id 1 %}
\r
29 <li class="item"><span class="user-superuser"></span>
\r
30 <a class="confirm" href="{% url user_powers id=user.id,action="remove",status="super" %}">{% trans "remove super user status" %}</a>
\r
40 <h3>{% trans "Moderation tools" %}</h3>
\r
41 <p><a href="#" id="point-award-action">{% trans "Reputation bonus" %}</a></p>
\r
42 <form action="" method="POST">
\r
43 <table style="display: none" id="award-points-table" class="moderation-table">
\r
44 {{ awardform.as_table }}
\r
45 <tr><td colspan="2" class="moderation-table-footer"><input type="submit" id="award-points-submit" value="{% trans "Send" %}" /></td></tr>
\r
50 $('#point-award-action').click(function() {
\r
51 $('#award-points-table').slideToggle('slow');
\r
54 $('#award-points-submit').click(function() {
\r
55 $('#award-points-table').find('.error').remove();
\r
56 var $points_input = $('#award-points-table').find('input[type=text]');
\r
57 var points = parseInt($points_input.val());
\r
59 if (isNaN(points) || points < 1) {
\r
60 $points_input.before('<p class="error">{% trans "Sorry but that\'s not a valid input" %}</p>');
\r
64 $.post('{% url user_award_points id=user.id %}')
\r
68 {% if not user.is_superuser %}
\r
69 <p><a href="{% url user_powers id=user.id,action="grant",status="super" %}">{% trans "Grant super user status" %}</a></p>
\r
70 {% if not user.is_staff %}
\r
71 <p><a href="{% url user_powers id=user.id,action="grant",status="staff" %}">{% trans "Grant moderator status" %}</a></p>
\r
73 <p><a href="{% url user_powers id=user.id,action="remove",status="staff" %}" class="">{% trans "Remove moderator status" %}</a></p>
\r
76 {% ifequal moderator.id 1 %}
\r
77 {% ifnotequal user.id 1 %}
\r
78 <p><a href="{% url user_powers id=user.id,action="remove",status="super" %}">{% trans "Remove super user status" %}</a></p>
\r