| author | gibus |
| Tue, 11 Feb 2014 12:33:25 +0100 | |
| changeset 572 | 93383e54e042 |
| parent 565 | 95a5c06c4008 |
| permissions | -rw-r--r-- |
| 0 | 1 |
{% extends "site/layout/base_text.html" %} |
2 |
{% load com %} |
|
3 |
{% load i18n %} |
|
4 |
||
5 |
{% block head %} |
|
6 |
{% endblock %} |
|
7 |
||
8 |
{% block main %} |
|
9 |
||
10 |
<script type="text/javascript"> |
|
11 |
<!-- |
|
12 |
tb_conf['current_tab'] = 'share'; |
|
13 |
--> |
|
14 |
</script> |
|
15 |
||
16 |
<script type="text/javascript"> |
|
17 |
<!-- |
|
18 |
$(function() { |
|
19 |
$(".hidden-user-actions").css('visibility','hidden'); |
|
20 |
}) ; |
|
21 |
--> |
|
22 |
</script> |
|
23 |
||
24 |
<div id="text_share" class="tab-meta"> |
|
25 |
||
26 |
<ul class="sub_list"> |
|
27 |
<li class="active_sub">{% blocktrans %}Users' list{% endblocktrans %}</li> |
|
28 |
<li> / </li> |
|
29 |
<li><a href="{% url user-add-text text.key %}">{% blocktrans %}Add a new user{% endblocktrans %}</a></li> |
|
30 |
<li> / </li> |
|
31 |
<li><a href="{% url user-mass-add-text text.key %}">{% blocktrans %}Add users in bulk{% endblocktrans %}</a></li> |
|
32 |
</ul> |
|
33 |
||
| 42 | 34 |
<form id="filter_form" action="." method="get"> |
35 |
<table summary="{% blocktrans %}People' list{% endblocktrans %}" class="large_table"> |
|
36 |
<tr> |
|
37 |
<td> |
|
38 |
{% if display_suspended_users %}<a href="?{% newparams 'display' '0' %}" title="{% blocktrans %}Hide suspended users{% endblocktrans %}">{% blocktrans %}Hide suspended users{% endblocktrans %}</a>{% else %}<a href="?{% newparams 'display' '1' %}" title="{% blocktrans %}Display suspended users{% endblocktrans %}">{% blocktrans %}Display suspended users{% endblocktrans %}</a>{% endif %} |
|
39 |
· |
|
40 |
{% blocktrans %}Filter by tag:{% endblocktrans %} |
|
41 |
<select id="tag_selected" name="tag_selected"> |
|
42 |
<option {% if not tag_selected %}selected="selected"{% endif %} value="0">- {% blocktrans %}All{% endblocktrans %} -</option> |
|
43 |
||
44 |
{% for tag in tag_list %} |
|
45 |
<option {% ifequal tag_selected tag.name %}selected="selected"{% endifequal %} value="{{ tag.name }}">{{ tag.name }}</option> |
|
46 |
{% endfor %} |
|
47 |
</select> |
|
48 |
</td> |
|
49 |
||
50 |
</tr> |
|
51 |
</table> |
|
52 |
</form> |
|
53 |
||
|
439
8994d24e4b2f
Reverts to changeset 435, and just add {% csrf_token %} to template forgot_pw.html, since CSRF protection seems to be only here (surely because of django.contrib.auth.views).
gibus
parents:
438
diff
changeset
|
54 |
<form id="text_share_form" action="." method="post"> |
| 42 | 55 |
|
56 |
<script type="text/javascript"> |
|
57 |
<!-- |
|
58 |
$(function() { |
|
59 |
$("#tag_selected").change(function () { |
|
60 |
$("#filter_form").submit(); |
|
61 |
}); |
|
62 |
}) ; |
|
63 |
--> |
|
64 |
</script> |
|
65 |
||
| 0 | 66 |
{% include "site/macros/paginator.html" %} |
67 |
||
68 |
<div style="clear:both;"></div> |
|
69 |
||
70 |
<table summary="user list" class="large_table"> |
|
71 |
<thead> |
|
72 |
<tr> |
|
73 |
<th class="check-column"><input type="checkbox" id="all_check" name="checkall"/> |
|
74 |
<script type="text/javascript"> |
|
75 |
<!-- |
|
76 |
$(function() { |
|
77 |
$("#all_check").click(function () { |
|
|
565
95a5c06c4008
With JQuery > 1.6 replace .attr() by .prop() or .val(), see http://api.jquery.com/prop/
gibus
parents:
439
diff
changeset
|
78 |
checked = $("#all_check").prop('checked'); |
|
95a5c06c4008
With JQuery > 1.6 replace .attr() by .prop() or .val(), see http://api.jquery.com/prop/
gibus
parents:
439
diff
changeset
|
79 |
$(".user_check").prop('checked', checked); |
| 0 | 80 |
check_activate_apply(); |
81 |
}); |
|
82 |
}) ; |
|
83 |
--> |
|
84 |
</script> |
|
85 |
</th> |
|
| 43 | 86 |
<th>{% up_down user__username %}{% blocktrans %}User{% endblocktrans %}{% endup_down %}</th> |
| 106 | 87 |
<th><a class="tip" href="#" title="{% blocktrans %}The 'Workspace role' is the global role that applies to every text, you can give a user a particular role on this text using the 'text role' column on the right{% endblocktrans %}">{% blocktrans %}Workspace role{% endblocktrans %}</a></th> |
88 |
<th>{% up_down role__name %}{% blocktrans %}Text role{% endblocktrans %}{% endup_down %}</th> |
|
| 0 | 89 |
</tr> |
90 |
</thead> |
|
91 |
<tbody> |
|
92 |
{% for userrole in object_list %} |
|
93 |
{% with userrole.user as user %} |
|
94 |
||
95 |
<tr class="user-{{ user.get_profile.key }} {% cycle 'odd' 'even' %}"> |
|
96 |
<td><input type="checkbox" class="user_check" name="check-{{ user.get_profile.key }}"/></td> |
|
97 |
<td> |
|
98 |
{% include "site/macros/user_actions.html" %} |
|
99 |
</td> |
|
100 |
<td> |
|
| 106 | 101 |
{% if userrole.role and user.get_profile.global_userrole.role %}<a class="tip" href="#" title="{% blocktrans with userrole.role.name_i18n as rolename %}This role has been overriden on this text by a text role: {{rolename}}{% endblocktrans %}">{% endif %} |
| 0 | 102 |
|
103 |
<span {% if userrole.role %}class="non_active"{% endif %}> |
|
| 23 | 104 |
{% if user.get_profile.global_userrole.role %}{{ user.get_profile.global_userrole.role.name_i18n}}{% else %}-{% endif %} |
| 0 | 105 |
</span> |
106 |
||
| 23 | 107 |
{% if userrole.role and user.get_profile.global_userrole.role %}</a>{% endif %} |
| 0 | 108 |
</td> |
109 |
<td> |
|
110 |
<select name="user-role-{{ user.get_profile.key }}" {% ifequal user request.user %}disabled="disabled"{% endifequal %}> |
|
111 |
<option {% if userrole.role %}{% else %}selected="selected"{% endif %} value="">---------</option> |
|
112 |
{% for role in all_roles %} |
|
113 |
<option {% ifequal userrole.role role %}selected="selected"{% endifequal %} value="{{ role.id }}">{{ role.name_i18n }}</option> |
|
114 |
{% endfor %} |
|
115 |
</select> |
|
116 |
</td> |
|
117 |
||
118 |
</tr> |
|
119 |
||
120 |
{% endwith %} |
|
121 |
{% endfor %} |
|
122 |
<tr class="no-border"> |
|
123 |
<td></td><td></td><td></td><td></td> |
|
124 |
</tr> |
|
125 |
||
126 |
<tr class="full-border even"> |
|
127 |
<td></td> |
|
128 |
<td><a class="main_object_title" title="{% blocktrans %}Edit anonymous users{% endblocktrans %}" href="{% url user-anon-edit %}">{% blocktrans %}Anonymous users{% endblocktrans %}</a></td> |
|
129 |
<td>{% if global_anon_role %}{{ global_anon_role.name_i18n }}{% else %}-{% endif %}</td> |
|
130 |
<td> |
|
131 |
<select name="user-role-_"> |
|
132 |
<option selected="selected" value="">---------</option> |
|
133 |
{% for role in anon_roles %} |
|
134 |
<option {% ifequal anon_role role %}selected="selected"{% endifequal %} value="{{ role.id }}">{{ role.name_i18n }}</option> |
|
135 |
{% endfor %} |
|
136 |
</select> |
|
137 |
</td> |
|
138 |
</tr> |
|
139 |
||
140 |
</tbody> |
|
141 |
||
142 |
</table> |
|
143 |
||
144 |
<script type="text/javascript"> |
|
145 |
<!-- |
|
146 |
$(function() { |
|
147 |
$('select[name^=user-role-]').change(function(){ |
|
|
565
95a5c06c4008
With JQuery > 1.6 replace .attr() by .prop() or .val(), see http://api.jquery.com/prop/
gibus
parents:
439
diff
changeset
|
148 |
$('#save').prop('disabled',false); |
| 0 | 149 |
}); |
150 |
}) ; |
|
151 |
--> |
|
152 |
</script> |
|
153 |
<input style="margin-left:20px;" name="save" id="save" type="submit" value="{% blocktrans %}Save{% endblocktrans %}" disabled="disabled"/> |
|
154 |
||
155 |
</form> |
|
156 |
||
157 |
</div> |
|
|
438
fcc5e2f0befd
Fix side effects with csrf token, add csrf_token to every post form + add ajax (see http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request), remove django.middleware.csrf.CsrfViewMiddleware ?!
Production Moz <dev@sopinspace.com>
parents:
106
diff
changeset
|
158 |
{% endblock %} |