1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 03:54:15 +00:00
webvirtcloud/accounts/templates/account.html

94 lines
3.7 KiB
HTML
Raw Normal View History

2015-03-02 08:52:07 +00:00
{% extends "base.html" %}
2020-10-08 11:57:51 +00:00
2015-03-02 08:52:07 +00:00
{% load i18n %}
2020-06-16 12:35:08 +00:00
{% load icons %}
2020-10-08 11:57:51 +00:00
{% load qr_code %}
2020-06-16 12:35:08 +00:00
{% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %}
2020-10-14 08:37:46 +00:00
{% block page_header %}{% trans "User Profile" %}: {{ user }}{% endblock page_header %}
2015-03-02 08:52:07 +00:00
2020-10-14 08:37:46 +00:00
{% block page_header_extra %}
<a href="{% url 'accounts:user_instance_create' user.id %}" class="btn btn-success">
{% icon 'plus' %}
</a>
{% endblock page_header_extra %}
2019-07-31 08:03:48 +00:00
2020-10-14 08:37:46 +00:00
{% block content %}
2020-06-16 12:35:08 +00:00
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#instances">{% trans "Instances" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#public-keys">{% trans "Public Keys" %}</a>
</li>
2020-10-08 11:57:51 +00:00
{% if totp_url %}
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#otp">{% trans "OTP QR Code" %}</a>
</li>
{% endif %}
2020-06-16 12:35:08 +00:00
</ul>
<div class="tab-content">
<div class="tab-pane active" id="instances">
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans "Instance" %}</th>
<th scope="col">{% trans "VNC" %}</th>
<th scope="col">{% trans "Resize" %}</th>
<th scope="col">{% trans "Delete" %}</th>
<th scope="colgroup" colspan="2">{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for inst in user_insts %}
2019-07-31 08:03:48 +00:00
<tr>
2020-06-16 12:35:08 +00:00
<td>{{ forloop.counter }}</td>
2020-07-13 09:33:09 +00:00
<td><a href="{% url 'instances:instance' inst.instance.id %}">{{ inst.instance.name }}</a></td>
2020-06-16 12:35:08 +00:00
<td>{{ inst.is_vnc }}</td>
<td>{{ inst.is_change }}</td>
<td>{{ inst.is_delete }}</td>
<td style="width:5px;">
2020-10-14 08:37:46 +00:00
<a href="{% url 'accounts:user_instance_update' inst.id %}" class="btn btn-sm btn-secondary" title="{% trans "edit" %}">
2020-06-16 12:35:08 +00:00
{% icon 'pencil' %}
</a>
</td>
<td style="width:5px;">
2020-10-14 08:37:46 +00:00
<a class="btn btn-sm btn-secondary" href="{% url 'accounts:user_instance_delete' inst.id %}" title="{% trans "Delete" %}">
2020-06-16 12:35:08 +00:00
{% icon 'trash' %}
</a>
</td>
2019-07-31 08:03:48 +00:00
</tr>
{% endfor %}
2020-06-16 12:35:08 +00:00
</tbody>
</table>
2019-07-31 08:03:48 +00:00
</div>
2020-06-16 12:35:08 +00:00
<div class="tab-pane fade" id="public-keys">
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">{% trans "Key name" %}</th>
<th scope="col">{% trans "Public key" %}</th>
</tr>
</thead>
<tbody>
{% for publickey in publickeys %}
<tr>
<td>{{ publickey.keyname }}</td>
<td title="{{ publickey.keypublic }}">{{ publickey.keypublic|truncatechars:64 }}</td>
</tr>
{% endfor %}
</tbody>
</table>
2019-07-31 08:03:48 +00:00
</div>
2020-10-08 11:57:51 +00:00
{% if totp_url %}
<div class="tab-pane fade" id="otp">
<div class="text-center">
{% qr_from_text totp_url image_format="png" %}
</div>
</div>
{% endif %}
2019-07-31 08:03:48 +00:00
</div>
2020-06-16 12:35:08 +00:00
{% endblock content %}