From d60a62a68a5c3442a6b464cca1c1a218d57d8ecc Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Thu, 3 Mar 2011 23:28:11 +0100 Subject: new acl UI --- templates/apps/name/acls.html | 38 ++++++++++++++++++++++-------- templates/apps/name/addace.html | 51 +++++++++++++++++++++++++++++++++++++++++ templates/apps/name/name.html | 2 +- 3 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 templates/apps/name/addace.html (limited to 'templates/apps') diff --git a/templates/apps/name/acls.html b/templates/apps/name/acls.html index 5b91429..3d3d134 100644 --- a/templates/apps/name/acls.html +++ b/templates/apps/name/acls.html @@ -1,14 +1,32 @@ -{% extends "edit.html" %} +{% extends "tree.html" %} {% load permdisplay %} -{% block beforeform %} -

Permissions on {{name}}

- +{% block widgets %} + $("#acl").accordion({ + header: 'h3', + collapsible: true, + active: false + }); +{% endblock %} +{% block content %} +

Permissions on {{name.short}}

+
{% for ace in acl %} -
- - - - +
+

Permissions for {{ace.dst|acldstdisplay}}

+
+
{{ace.dst|acldstdisplay}} {{ace.data|permdisplay}}.
+
+ +
+
+
{% endfor %} -
{{ace.dst|acldstdisplay}}{{ace.data|permdisplay}}
+ +
+ +
{% endblock %} \ No newline at end of file diff --git a/templates/apps/name/addace.html b/templates/apps/name/addace.html new file mode 100644 index 0000000..17d8362 --- /dev/null +++ b/templates/apps/name/addace.html @@ -0,0 +1,51 @@ +{% extends "edit_fieldsets.html" %} +{% load permdisplay %} +{% block widgets %} + $('#wizard').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "Finish", + validationOptions: { + rules: { + subject_label: 'required' + } + } + }); + $('#id_subject').autocomplete({ + source: "/name/search.json", + focus: function(event, ui) { + $('#id_subject').val(ui.item.label); + return false; + }, + select: function(event, ui) { + $('#id_subject').val(ui.item.label); + $('#id_dst').val(ui.item.value); + return false; + }, + minLength: 2, + open: function() { + $( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" ); + }, + close: function() { + $( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" ); + } + }); +{% endblock %} +{% block beforeform %} +

Permissions on {{name.short}}

+
+{% for ace in acl %} +
+

Permissions for {{ace.dst|acldstdisplay}}

+
+
{{ace.dst|acldstdisplay}} {{ace.data|permdisplay}}.
+
+ +
+
+
+{% endfor %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/apps/name/name.html b/templates/apps/name/name.html index 2b773bf..32dad82 100644 --- a/templates/apps/name/name.html +++ b/templates/apps/name/name.html @@ -27,7 +27,7 @@
-- cgit v1.1