5 This is the AJAX table sub-template that can be used to list virtual
8 When rendering this template, you may optionally provide a `tableID`
9 argument and the table will encapsulate itself within the provided term,
12 return render_to_response(
"virtual_machine/table.html",
13 {'tableID': 'table_foo'},
14 context_instance=RequestContext(request))
16 This is handy if you're trying to render this sub-template more than once
21 td.actions div.delete {
24 #content td.actions a, #content td.actions {
32 <script type=
"text/javascript" src=
"{{MEDIA_URL}}/js/VM_ajaxTable.js"></script>
33 <script type=
"text/javascript">
39 var url
= "{% url cluster-virtualmachine-table cluster.slug %}";
42 var url
= "{% url vm-table-primary node %}"
43 {% else %}{% if secondary_node
%}
44 var url
= "{% url vm-table-secondary node %}"
46 var url
= "{% url virtualmachine-table %}";
47 {% endif
%}{% endif
%}
51 var tableID
= '{{tableID}}';
53 var tableID
= 'ajaxTable';
56 $('#'+tableID
).data('ajaxTable', new ajaxTable(url
, tableID
));
57 $('#'+tableID
).data('ajaxTable').init();
64 <a class=
"button add" href=
"{% url instance-create cluster.slug %}">
65 {% trans
"Add Virtual Machine" %}
69 <a class=
"button add" href=
"{% url instance-create %}">
70 {% trans
"Add Virtual Machine" %}
76 <div id='{{tableID}}'
>
81 {% include
"virtual_machine/inner_table.html" %}
86 {% trans
"Loading" %}...
89 <img src='{{ MEDIA_URL }}/images/ajax-loader.gif'
>