bornhack-website/src/phonebook/templates/dectregistration_list.html
Thomas Steen Rasmussen c52bf300ff
Phonebook (#465)
* first version of dect registration and phonebook functionality, missing export functionality for dect phone system, the rest should more or less work

* add a missing button and message

* fix typo

* add django-oauth-toolkit to implement oauth2 auth for the DECT csv export

* remove unused HMAC code

* add logger

* only show buttons when user is logged in

* remove unneeded enctype
2020-03-05 12:31:11 +01:00

59 lines
2.4 KiB
HTML

{% extends 'base.html' %}
{% load static %}
{% block title %}
Your DECT Registrations | {{ block.super }}
{% endblock %}
{% block content %}
<div class="panel panel-default">
<div class="panel-heading">
<span class="h3">Your {{ camp.title }} DECT Registrations</span>
</div>
<div class="panel-body">
<p class="lead">This is a list of all the registered DECT numbers you have for {{ camp.title }}. To activate a handset just dial the <i>activation code</i> from the handset and follow instructions.</p>
{% if dectregistration_list %}
<p>
<a href="{% url 'phonebook:list' camp_slug=camp.slug %}" class="btn btn-primary"><i class="fas fa-list"></i> Phonebook</a>
<a href="{% url 'phonebook:dectregistration_create' camp_slug=camp.slug %}" class="btn btn-success"><i class="fas fa-plus"></i> Create DECT Registration</a>
</p>
<table class="table table-hover table-striped">
<tr>
<th>Number</th>
<th>Letters</th>
<th>Description</th>
<th>Publish in Phonebook</th>
<th>Activation Code</th>
<th>Created</th>
<th>Modified</th>
<th>Actions</th>
</tr>
{% for entry in dectregistration_list %}
<tr>
<td>{{ entry.number }}</td>
<td>{{ entry.letters|default:"N/A" }}</td>
<td>{{ entry.description|default:"N/A" }}</td>
<td>{{ entry.publish_in_phonebook|yesno }}</td>
<td>{{ entry.activation_code }}</td>
<td>{{ entry.created }}</td>
<td>{{ entry.updated }}</td>
<td>
<a href="{% url 'phonebook:dectregistration_update' camp_slug=camp.slug dect_number=entry.number %}" class="btn btn-primary"><i class="fas fa-edit"></i> Update</a>
<a href="{% url 'phonebook:dectregistration_delete' camp_slug=camp.slug dect_number=entry.number %}" class="btn btn-danger"><i class="fas fa-times"></i> Delete</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p class="lead"><i>No DECT registrations found. Go create one!</i></p>
<p>
<a href="{% url 'phonebook:list' camp_slug=camp.slug %}" class="btn btn-primary"><i class="fas fa-list"></i> Phonebook</a>
<a href="{% url 'phonebook:dectregistration_create' camp_slug=camp.slug %}" class="btn btn-success"><i class="fas fa-plus"></i> Create DECT Registration</a>
</p>
{% endif %}
</div>
</div>
{% endblock %}