source: asadb/template/space/manage-access.html

space-accessstablestage
Last change on this file was 1927d79, checked in by Alex Dehnert <adehnert@…>, 13 years ago

Use "Space Access" more consistently

The tools menu refered to a "Space access" page, but that page's headers used
"Office Access". This changes that to "Space Access" for improved consistency
(and accuracy, since the page also lists lockers).

  • Property mode set to 100644
File size: 4.1 KB
Line 
1{% extends "base.html" %}
2
3{% block title %}{{group.name}}: Space Access{% endblock %}
4{% block content %}
5
6<h1>{{group.name}}: Space Access</h1>
7
8{% include "groups/group_tools.part.html" %}
9
10{% if changes %}
11<h2>Changes</h2>
12<table class='pretty-table'>
13<tr>
14    <th>Action</th>
15    <th>Space</th>
16    <th>Person</th>
17</tr>
18{% for action,space,entry in changes %}
19<tr>
20    <td>{{action}}</td>
21    <td>{{space}}</td>
22    <td>{{entry.name}}</td>
23</tr>
24{%endfor%}
25</table>
26{%endif%}
27
28<form enctype="multipart/form-data" method="post" action="">
29{% csrf_token %}
30<h2>Offices</h2>
31{% if office_pairs %}
32<table class='pretty-table'>
33<tr>
34    <th>Room</th>
35    <th>Access</th>
36</tr>
37<tr>
38    <th>All</th>
39    <td>
40        <ul>{% for person in office %}
41            <li>{{person.format_person}}</li>
42        {% endfor %}</ul>
43        <p>Manage on the <a href='{% url groups:group-manage-officers group.id %}'>update people</a> page.</p>
44    </td>
45</tr>
46{% for assignment, entries in office_pairs %}
47<tr>
48    <th>{{assignment.space}}</th>
49    <td>
50        {% with assignment.space.lock_type as lock_type %}
51        {% if lock_type.db_update == "none" %}
52        <p><strong>Warning: Access to this office is not managed through the ASA DB.</strong></p>
53        <p><em><a href='{% url space-lock-type %}'>{{lock_type.name}}</a></em>: {{lock_type.description}}{% if lock_type.info_url %} <a href='{{lock_type.info_url}}'>Details.</a>{%endif%}</p>
54        <p>Contact <a href='mailto:{{lock_type.info_addr}}'>{{lock_type.info_addr}}</a> for more information.</p>
55
56        {% else %}
57
58        <p>We recommend managing access on the <a href='{% url groups:group-manage-officers group.id %}'>update people</a> page if possible. You should only need to use this page if:</p>
59        <ul>
60            <li>You need to grant access to somebody who does not have an Athena account, or</li>
61            <li>Your group has several offices, and somebody needs access to one or more of the offices, but should not have access to all of them</li>
62        </ul>
63
64        <table class='pretty-table'>
65            <tr>
66                {%if allow_edit%}<th>Grant</th>{%endif%}
67                <th>Name</th>
68                <th>MIT ID</th>
69            </tr>
70        {% for entry in entries %}
71            <tr>
72                {%if allow_edit%}<td><input type='checkbox' name='grant[{{assignment.pk}}][{{entry.pk}}]' checked='checked'></td>{% endif %}
73                <td>{{entry.name}}</td>
74                <td>{{entry.card_number}}</td>
75            </tr>{% endfor %}
76        {% for index in extras_indices %}
77            <tr>
78                <td></td>
79                <td><input type='text' name='new[{{assignment.pk}}][{{index}}][name]'></td>
80                <td><input type='text' name='new[{{assignment.pk}}][{{index}}][card]'></td>
81            </tr>{% endfor %}
82        </table>
83
84        {% endif %}
85        {% endwith %}
86
87    </td>
88</tr>
89{% endfor %}
90</table>
91{% else %}
92<p>No office assigned.</p>
93{% endif %}
94
95
96<h2>Lockers</h2>
97{% if locker_pairs %}
98<table class='pretty-table'>
99<tr>
100    <th>Room</th>
101    <th>Locker</th>
102    <th>Access</th>
103</tr>
104<tr>
105    <th colspan='2'>All</th>
106    <td>
107        <ul>{% for person in locker %}
108            <li>{{person.format_person}}</li>
109        {% endfor %}</ul>
110        <p>Manage on the <a href='{% url groups:group-manage-officers group.id %}'>update people</a> page.</p>
111        <p><a href='mailto:asa-exec@mit.edu'>Contact us</a> if you need to do something that page does not support &mdash; give access to somebody without an Athena account or give access to just one locker room your group has access to, for example. We will happily do either of those upon request.</p>
112    </td>
113</tr>
114{% for assignment, entries in locker_pairs %}
115<tr>
116    <th>{{assignment.space.number}}</th>
117    <th>{{assignment.locker_num}}</th>
118    <td><ul>{% for entry in entries %}
119        <li>{{entry.format_name}}</li>
120    {% empty %}
121        <li>No specific access</li>
122    {% endfor %}</ul></td>
123</tr>
124{% endfor %}
125</table>
126{% else %}
127<p>No storage lockers assigned.</p>
128{% endif %}
129
130{% if allow_edit %}
131<input type='submit' name='submit' value='Update' />
132{% endif %}
133</form>
134
135{% endblock %}
Note: See TracBrowser for help on using the repository browser.