access.html 2.17 KB
Newer Older
1 2 3 4 5 6 7
{% load i18n %}
<h3>{% trans "Owner" %}</h3>
<p>
  {% blocktrans %}You are the current owner of this instance.{% endblocktrans %}
  <a href="#" class="btn btn-link">{% trans "Transfer ownership..." %}</a>
</p>
<h3>{% trans "Permissions"|capfirst %}</h3>
8
  <form action="{{acl.url}}" method="post">{% csrf_token %}
9 10 11
  <table class="table table-striped table-with-form-fields">
    <thead><tr><th></th><th>{% trans "Who" %}</th><th>{% trans "What" %}</th><th></th></tr></thead>
    <tbody>
12 13
        {% for i in acl.users %}
        <tr><td><i class="icon-user"></i></td><td>{{i.user}}</td>
14
            <td><select class="form-control" name="perm-u-{{i.user.id}}">
15
                    {% for id, name in acl.levels %}
16
                    <option{%if id = i.level%} selected="selected"{%endif%} value="{{id}}">{{name}}</option>
17 18 19 20 21 22
                    {% endfor %}
            </select></td>
            <td><a href="#" class="btn btn-link btn-xs"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
        {% endfor %}
        {% for i in acl.groups %}
        <tr><td><i class="icon-group"></i></td><td>{{i.group}}</td>
23
            <td><select class="form-control" name="perm-g-{{i.group.id}}">
24
                    {% for id, name in acl.levels %}
25
                    <option{%if id = i.level%} selected="selected"{%endif%} value="{{id}}">{{name}}</option>
26 27 28 29
                    {% endfor %}
            </select></td>
            <td><a href="#" class="btn btn-link btn-xs"><i class="icon-remove"><span class="sr-only">{% trans "remove" %}</span></i></a></td></tr>
        {% endfor %}
30 31 32 33 34 35 36 37 38
        <tr><td><i class="icon-plus"></i></td>
            <td><input type="text" class="form-control" name="perm-new-name"
                placeholder="{% trans "Name of group or user" %}"></td>
            <td><select class="form-control" name="perm-new">
                    {% for id, name in acl.levels %}
                    <option value="{{id}}">{{name}}</option>
                    {% endfor %}
            </select></td><td></td>
        </tr>
39 40 41 42 43
  </tbody>
  </table>
  <div class="form-actions">
    <button type="submit" class="btn btn-success">{% trans "Save" %}</button>
  </div>
44
  </form>