|
0
|
1 |
{% load com %} |
|
|
2 |
{% load i18n %} |
|
38
|
3 |
{% load tagging_tags %} |
|
0
|
4 |
<b> |
|
|
5 |
{% ifequal user request.user %} |
|
|
6 |
<a title="{% blocktrans %}Your profile{% endblocktrans %}" class="main_object_title" href="{% url profile %}">{{ user.get_profile.admin_print }}</a> |
|
|
7 |
{% else %} |
|
|
8 |
<a title="{% blocktrans with user.get_profile.admin_print as userprint %}Edit user {{ userprint }}{% endblocktrans %}" class="main_object_title" href="{% url user-edit user.get_profile.key %}">{{ user.get_profile.admin_print }}</a> |
|
|
9 |
{% endifequal %} |
|
|
10 |
</b> |
|
38
|
11 |
|
|
|
12 |
{% tags_for_object user.get_profile as tag_list %} |
|
|
13 |
{% if tag_list %}<div class="tag_list>">{% blocktrans %}tags:{% endblocktrans %} {% for tag in tag_list %}<a class="tag" title="{% blocktrans with tag.name as tag_name %}Filter by tag: {{ tag_name }}{% endblocktrans %}" href="?{% newparams 'tag_selected' tag.name %}"">{{ tag.name }}</a> {% endfor %}</div>{% endif %} |
|
|
14 |
|
|
0
|
15 |
<div class="hidden-user-actions user-actions-{{ user.get_profile.key }}" style="visibility:hidden;"> |
|
|
16 |
{% ifequal user request.user %} |
|
|
17 |
<a title="Your profile" href="{% url profile %}">{% blocktrans %}Your profile{% endblocktrans %}</a> |
|
|
18 |
{% else %} |
|
|
19 |
<a title="Edit user" href="{% url user-edit user.get_profile.key %}">{% blocktrans %}Edit{% endblocktrans %}</a> |
|
|
20 |
| <a href="{% url user-contact user.get_profile.key %}">{% blocktrans %}Contact{% endblocktrans %}</a> |
|
|
21 |
{% if user.get_profile.is_suspended %} |
|
|
22 |
{% if user.is_active %} |
|
|
23 |
| <a id="user-enable-{{ user.get_profile.key }}" href="#">{% blocktrans %}Enable access{% endblocktrans %}</a> |
|
|
24 |
{% else %} |
|
|
25 |
{% include "site/macros/user_moderation.html" %} |
|
|
26 |
{% endif %} |
|
|
27 |
{% else %} |
|
|
28 |
| <a id="user-suspend-{{ user.get_profile.key }}" href="#">{% blocktrans %}Suspend access{% endblocktrans %}</a> |
|
|
29 |
| <a id="user-resend-{{ user.get_profile.key }}" href="#">{% blocktrans %}(Re-)send invitation{% endblocktrans %}</a> |
|
|
30 |
{% endif %} |
|
|
31 |
{% endifequal %} |
|
|
32 |
</div> |
|
|
33 |
<script type="text/javascript"> |
|
|
34 |
<!-- |
|
|
35 |
$(function() { |
|
|
36 |
$("#user-suspend-{{ user.get_profile.key }}").click(function(){ |
|
|
37 |
url = '{% url user-suspend user.get_profile.key %}'; |
|
|
38 |
question = "{% blocktrans %}Are you sure you want to suspend this user's access to the workspace?{% endblocktrans %}"; |
|
|
39 |
if (confirm(question)) { |
|
|
40 |
$.post(url, function(data){ |
|
|
41 |
window.location = '{% url user %}'; |
|
|
42 |
}); |
|
|
43 |
} |
|
|
44 |
}); |
|
|
45 |
$("#user-enable-{{ user.get_profile.key }}").click(function(){ |
|
|
46 |
url = '{% url user-enable user.get_profile.key %}'; |
|
|
47 |
question = "{% blocktrans %}Are you sure you want to enable this user's access to the workspace?{% endblocktrans %}"; |
|
|
48 |
if (confirm(question)) { |
|
|
49 |
$.post(url, function(data){ |
|
|
50 |
window.location = '{% url user %}'; |
|
|
51 |
}); |
|
|
52 |
} |
|
|
53 |
}); |
|
|
54 |
$("#user-resend-{{ user.get_profile.key }}").click(function(){ |
|
|
55 |
url = '{% url user-send-invitation user.get_profile.key %}'; |
|
|
56 |
question = "{% blocktrans %}Are you sure you want to send this user an invitation to the workspace?{% endblocktrans %}"; |
|
|
57 |
if (confirm(question)) { |
|
|
58 |
$.post(url, function(data){ |
|
|
59 |
window.location = '{% url user %}'; |
|
|
60 |
}); |
|
|
61 |
} |
|
|
62 |
}); |
|
|
63 |
|
|
|
64 |
$(".user-{{ user.get_profile.key }}").mouseover(function(){ |
|
|
65 |
$(".user-actions-{{ user.get_profile.key }}").css('visibility','visible'); |
|
|
66 |
$(".user-{{ user.get_profile.key }}").addClass('hover'); |
|
|
67 |
}); |
|
|
68 |
$(".user-{{ user.get_profile.key }}").mouseout(function(){ |
|
|
69 |
$(".user-actions-{{ user.get_profile.key }}").css('visibility','hidden'); |
|
|
70 |
$(".user-{{ user.get_profile.key }}").removeClass('hover'); |
|
|
71 |
}); |
|
|
72 |
}) ; |
|
|
73 |
--> |
|
|
74 |
</script> |