Move Doorboy page over from members site
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
77
inventory-app/templates/doorboy.html
Normal file
77
inventory-app/templates/doorboy.html
Normal file
@@ -0,0 +1,77 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
<p>Press to open:</p>
|
||||
<ul>
|
||||
<li><a class="waves-effect waves-light btn" href="/m/doorboy/ground/open">Ground door</a> the one on street level facing KBFI</li>
|
||||
<li><a class="waves-effect waves-light btn" href="/m/doorboy/front/open">Front door</a> the one from ground door 5 floors upward</li>
|
||||
<li><a class="waves-effect waves-light btn" href="/m/doorboy/back/open">Back door</a> on 5th floor on the Pancake cafeteria side. Note: ground door on cafeteria side is open whenever the cafeteria is open. Other times use the ground door listed above.</li>
|
||||
<!--
|
||||
<li>Coming soon: <a class="waves-effect waves-light btn" href="/m/doorboy/workshop/open">Workshop door</a> also known as the dirty room</li>
|
||||
<li>Coming later: <a class="waves-effect waves-light btn" href="/m/doorboy/server/open">Server room door</a></li>
|
||||
-->
|
||||
</ul>
|
||||
|
||||
<p>Recent door open requests via Slack or the buttons above</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>When</th>
|
||||
<th>Who</th>
|
||||
<th>Door</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for o in latest_events %}
|
||||
<tr>
|
||||
<td>{% if o.approved %}<i class="material-icons">check_circle</i>{% else %} {% endif %}</td>
|
||||
<td>{{ o.timestamp | timeago }}</td>
|
||||
<td><a href="/m/user/{{ o.member_id }}">{% if o.member %}{{ o.member }}{% else %}{{ o.member_id }}{% endif %}</a></td>
|
||||
<td>{{ o.door }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Please claim keycards or keyfobs associated with you here!</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Last seen</th>
|
||||
<th> </th>
|
||||
<th>Who</th>
|
||||
<th>UID hash tail</th>
|
||||
<th>Granted</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for o in latest_swipes %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if o.inventory and o.inventory.owner %}
|
||||
|
||||
{% else %}
|
||||
<i class="material-icons">error</i>{% endif %}
|
||||
</td>
|
||||
<td>{{ (o.last_seen or o.timestamp) | timeago }}</td>
|
||||
<td>{{ o.door }}</td>
|
||||
<td>{% if o.inventory and o.inventory.owner %}<a href="/m/user/{{ o.inventory.owner.username }}">{{ o.inventory.owner.username | display_name }}</a>{% else %}Unknown{% endif %}</td>
|
||||
<td><a href="/m/doorboy/{{ o._id }}/events">{{ o.token.uid_hash[-6:] }}</a></td>
|
||||
<td>{% if o.success %}<i class="material-icons">check_circle</i>{% else %} {% endif %}</td>
|
||||
<td>{% if o.inventory and o.inventory.owner %}{{ o.token.comment }}{% else %}<a class="waves-effect waves-light btn" href="/m/doorboy/{{ o._id }}/claim">This is mine!</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
12
inventory-app/templates/doorboy_token_edit.html
Normal file
12
inventory-app/templates/doorboy_token_edit.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h4>Edit door access token {{ token.token.uid_hash[-6:] }}</h4>
|
||||
<form method="POST" autocomplete="off">
|
||||
{{ form.csrf_token }}
|
||||
{{ form.comment.label }} {{ form.comment(size=20) }}
|
||||
<button class="btn waves-effect waves-light" type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
@@ -1 +1,2 @@
|
||||
<li><a href="/m/inventory?type=machine&type=locker&type=desk">Inventory</a></li>
|
||||
<li><a href="/m/doorboy">Doorboy™</a></li>
|
||||
|
Reference in New Issue
Block a user