Merge tag '0.10.2'
[ganeti_webmgr.git] / muddle_users / templates / group / list.html
blob3356c26e56f57aa28005280776a4c3b2af3e711d
1 {% extends "menu_base.html" %}
2 {% load i18n %}
3 {% block title %}{% trans "Groups" %}{% endblock %}
4 {% block head %}
5 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.ajax.delete.js"></script>
6 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.form.js"></script>
7 <script type="text/javascript">
8 $(document).ready(function() {
9 // submit button
10 $(".ajax_form").live("submit", function(){
11 $("#errors").empty();
12 $(this).ajaxSubmit({success: update});
13 return false;
14 });
16 // Delete user button
17 $('#groups .delete').live("click", function(event) {
18 event.preventDefault();
19 var name = $(this).parent().parent().children('.name').children('a').html();
20 if (confirm("Delete group: " + name)) {
21 var id = this.parentNode.parentNode.id.substring(6);
22 $.delete_(this.href,
23 function(code){
24 if(code==1) {$('#group_'+id).remove();}
25 }, "json");
27 });
28 });
29 </script>
30 {% endblock %}
32 {% block content %}
33 <h1 class="breadcrumb">Groups</h1>
35 {% if user.is_superuser %}<a id="add_group" href="{% url group-add %}" class="button add">Add Group</a>{% endif %}
36 <table id="groups">
37 <tr>
38 <th>Name</th>
39 <th>Users</th>
40 {% block group_headers %}{% endblock %}
41 <th></th>
42 </tr>
43 {% for group in groups %}
44 {% block group_row %}{% include "group/group_row.html" %}{% endblock %}
45 {% endfor %}
46 </table>
47 {% endblock %}