summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/apps/name/acls.html38
-rw-r--r--templates/apps/name/addace.html51
-rw-r--r--templates/apps/name/name.html2
-rw-r--r--templates/edit.html52
-rw-r--r--templates/edit_fieldsets.html8
5 files changed, 111 insertions, 40 deletions
diff --git a/templates/apps/name/acls.html b/templates/apps/name/acls.html
index 5b91429..7fe8250 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 %}
-<h1>Permissions on {{name}}</h1>
-<table style="margin-bottom: 20px;">
+{% block widgets %}
+ $("#acl").accordion({
+ header: 'h3',
+ collapsible: true,
+ active: false
+ });
+{% endblock %}
+{% block content %}
+<h1>Permissions on {{name.short}}</h1>
+<div id="acl" style="margin-bottom: 20px;">
{% for ace in acl %}
-<tr>
- <td>{{ace.dst|acldstdisplay}}</td>
- <td>{{ace.data|permdisplay}}</td>
- <td><a href="/namelink/{{ace.id}}/remove"><span class="ui-icon ui-icon-trash"></span></td>
-</tr>
+ <div id="{{ace.id}}">
+ <h3 class="listheader">Permissions for {{ace.dst|acldstdisplay}}</h3>
+ <div>
+ <div>{{ace.dst|acldstdisplay}} {{ace.data|permdisplay}}.</div>
+ <div class="rlist button">
+ <ul>
+ <li><a href="/name/{{ace.src.id}}/acl/{{ace.id}}/remove">Remove</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
{% endfor %}
-</table>
+</div>
+<div class="ilist button">
+ <ul>
+ <li><a href="/name/{{name.id}}/acl/0/add">Add Permission</a></li>
+ </ul>
+</div>
{% 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 %}
+<h1>Permissions on {{name.short}}</h1>
+<div id="acl" style="margin-bottom: 20px;">
+{% for ace in acl %}
+<div id="{{acc.id}}">
+ <h3 class="listheader">Permissions for {{ace.dst|acldstdisplay}}</h3>
+ <div>
+ <div>{{ace.dst|acldstdisplay}} {{ace.data|permdisplay}}.</div>
+ <div class="rlist button">
+ <ul>
+ <li><a href="/namelink/{{ace.id}}/remove">Remove</a></li>
+ </ul>
+ </div>
+ </div>
+</div>
+{% endfor %}
+</div>
+{% endblock %} \ No newline at end of file
diff --git a/templates/apps/name/name.html b/templates/apps/name/name.html
index 2489004..e00a887 100644
--- a/templates/apps/name/name.html
+++ b/templates/apps/name/name.html
@@ -28,7 +28,7 @@
<div class="rlist">
<ul>
{% if render.acl %}
- <li class="button"><a href="/name/{{name.id}}/link/0">Modify Access</a></li>
+ <li class="button"><a href="/name/{{name.id}}/acl/0">Modify Access</a></li>
{% endif %}
{% if render.edit %}
<li class="button"><a href="/name/{{name.id}}/edit">Modify</a></li>
diff --git a/templates/edit.html b/templates/edit.html
index 337264d..0a17922 100644
--- a/templates/edit.html
+++ b/templates/edit.html
@@ -4,31 +4,33 @@
$('#id_description').wysiwyg();
{% endblock %}
{% block content %}
- {% block beforeform %}
- {% endblock %}
- <form method="POST" class="ui-helper-reset ui-widget-contents ui-corner-all">
- <div class="infopanel">
- <h1>{{formtitle}}</h1>
- <table class="formtable">
- {% for field in form %}
- <tr>
- <td>
- {% if not field.is_hidden %}
- <div class="ui-widget fieldlabel">{{ field.label_tag }}</div>
- {% endif %}
- {% if field.errors %}
- <div class="ui-widget ui-state-error">{{ field.errors }}</div>
- {% endif %}
- <div class="ui-widget">{{ field }}</div>
- </td>
- </tr>
- {% endfor %}
- </table>
- </div>
- <br/>
- <div class="button">
- <input type="submit" value="{{submitname}}" />
- <input type="button" onClick="document.location='{{name.url}}'" value="Cancel"/>
+{% block beforeform %}{% endblock %}
+<div>
+ <form method="POST" class="bbq ui-helper-reset ui-widget ui-widget-content ui-corner-all formpadding">
+ <h1>{{formtitle}}</h1>
+ <table class="formtable">
+ {% for field in form %}
+ <tr>
+ <td>
+ {% if not field.is_hidden %}
+ <div class="ui-widget fieldlabel">{{ field.label_tag }}</div>
+ {% endif %}
+ {% if field.errors %}
+ <div class="ui-widget ui-state-error">{{ field.errors }}</div>
+ {% endif %}
+ <div class="ui-widget">{{ field }}</div>
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ <div class="ilist button" style="padding-bottom: 10px;">
+ <ul>
+ <li><input type="submit" value="{{submitname}}" /></li>
+ {% if name %}
+ <li style="float: right;"><input type="button" onClick="document.location='{{name.url}}'" value="Done"/></li>
+ {% endif %}
+ </ul>
</div>
</form>
+</div>
{% endblock %} \ No newline at end of file
diff --git a/templates/edit_fieldsets.html b/templates/edit_fieldsets.html
index d528a4c..0a8186f 100644
--- a/templates/edit_fieldsets.html
+++ b/templates/edit_fieldsets.html
@@ -3,8 +3,8 @@
{% block content %}
{% block beforeform %}
{% endblock %}
- <div class="infopanel">
- <form method="POST" id="wizard" class="bbq" style="padding: 5px;">
+ <div>
+ <form method="POST" id="wizard" class="bbq formpadding">
<h1>{{formtitle}}</h1>
{% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %}
{% for fieldset in form.fieldsets %}
@@ -22,9 +22,9 @@
{% else %}
<li class="links {% if field.field.required %}required{% endif %}" {{ field.row_attrs }}>
{{ field.errors }}
- <label for="id_{{ field.html_name }}">{{ field.label }}
+ <label for="id_{{ field.html_name }}" class="fieldlabel">{{ field.label }}
{% if field.field.required %}<b>*</b>{% endif %}</label>
- {{ field }}
+ <div class="fieldinput">{{ field }}</div>
</li>
{% endif %}
{% endfor %}