Merge branch 'develop' into feature/search_autocomplete_haste
[ganeti_webmgr.git] / ganeti / templates / cluster / users.html
blob065dcc49a6bf29d041d3607fd7a8ed66a5032be0
1 {% extends "object_permissions/permissions/users.html" %}
2 {% load i18n %}
3 {% block head %}
4 <script type="text/javascript">
5 $(document).ready(function() {
6 // Update Quota Button
7 $(".quota").live("click", function() {
8 // destroy old qtip before showing new one
9 $('.qtip').qtip('destroy');
10 $(this).qtip({
11 content: {
12 url: this.href,
13 title: {text:'{% trans "Quota" %}: ', button:'close'},
15 position: {corner:{ target:"topMiddle", tooltip:"bottomMiddle"}},
16 style: {name:"dark",
17 border:{radius:5},
18 width:300,
19 tip: 'bottomMiddle',
20 background:"#eeeeee"
22 show: {when:false, ready:true},
23 hide: {fixed: true, when:false},
24 api:{onShow:function(){
25 $("#quota_form input[type!=hidden], .ajax_form select").first().focus();
27 });
28 return false;
29 });
31 // quota submit
32 $("#quota_form").live("submit", function(){
33 $("#errors").empty();
34 $(this).ajaxSubmit({success: update_user_permissions});
35 return false;
36 });
38 // Delete quota button
39 $('#quota_form .delete').live("click", function() {
40 id = $('#quota_form input[name=user]').val()
41 $.post('{% url cluster-quota object.slug %}'+id,
42 {user:id, 'delete':true}, update_user_permissions);
43 });
44 });
45 </script>
46 {%endblock%}
48 {%block table_headers%}<th>{% trans "Quota" %}</th>{%endblock%}
49 {%block user_row%}{% include "cluster/user_row.html" %}{%endblock%}
50 {%block group_row%}{% include "cluster/group_row.html" %}{%endblock%}