Jan Dittberner
2e4efe7839
- implement managemails.forms.ChangeMailboxPasswordForm - extract code for determining hosting package and customer from URL into HostingPackageAndCustomerMixin - implement managemails.views.ChangeMailboxPassword - add new URL pattern 'change_mailbox_password' to managemails.urls - add template managemails/mailbox_setpassword.html - link from template hostingpackages/customerhostingpackage_detail.html to change_mailbox_password - add german translation for new strings - document new feature in changelog
182 lines
8.4 KiB
HTML
182 lines
8.4 KiB
HTML
{% extends "hostingpackages/base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{{ block.super }} - {% spaceless %}
|
|
{% if user == customer %}
|
|
{% blocktrans with package=hostingpackage.name %}Details for your Hosting Package {{ package }}{% endblocktrans %}
|
|
{% else %}
|
|
{% blocktrans with package=hostingpackage.name full_name=customer.get_full_name %}Details for Hosting Package {{ package }} of {{ full_name }}{% endblocktrans %}
|
|
{% endif %}
|
|
{% endspaceless %}{% endblock title %}
|
|
|
|
{% block page_title %}{% blocktrans with package=hostingpackage.name %}Details of Hosting Package {{ package }}{% endblocktrans %}{% endblock page_title %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-lg-4 col-md-6 col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% spaceless %}
|
|
{% trans "Hosting Package Information" %}
|
|
{% if user.is_staff %}
|
|
<div class="pull-right">
|
|
<a class="panel-title" href="#" title="{% trans "Edit Hosting Package Information" %}"><i class="glyphicon glyphicon-cog"></i></a>
|
|
</div>
|
|
{% endif %}
|
|
{% endspaceless %}</div>
|
|
<dl class="panel-body dl-horizontal">
|
|
<dt>{% trans "Name" %}</dt>
|
|
<dd>{{ hostingpackage.name }}</dd>
|
|
<dt>{% trans "Description" %}</dt>
|
|
<dd>{{ hostingpackage.description|default:"-" }}</dd>
|
|
<dt>{% trans "Disk space" %}</dt>
|
|
{% with diskspace=hostingpackage.get_disk_space packagespace=hostingpackage.get_package_space %}
|
|
<dd>
|
|
<span title="{% blocktrans %}The reserved disk space for your hosting package is {{ diskspace }} bytes{% endblocktrans %}">{{ diskspace|filesizeformat }}</span>
|
|
<span class="glyphicon glyphicon-info-sign" title="{% blocktrans with humanbytes=packagespace|filesizeformat %}The package contributes {{ humanbytes }} ({{ packagespace }} bytes) the difference comes from disk space options{% endblocktrans %}"></span>
|
|
</dd>
|
|
{% endwith %}
|
|
<dt>{% trans "Mailboxes" %}</dt>
|
|
<dd>{% blocktrans with num=hostingpackage.used_mailbox_count total=hostingpackage.mailbox_count %}{{ num }} of {{ total }} in use{% endblocktrans %} <span class="glyphicon
|
|
glyphicon-info-sign" title="{% blocktrans with mailboxes=hostingpackage.mailboxcount %}The package provides {{ mailboxcount }} mailboxes the difference comes from mailbox options.{% endblocktrans %}"></span></dd>
|
|
<dt>{% if hostingpackage.osuser.is_sftp_user %}{% trans "SFTP username" %}{% else %}{% trans "SSH/SFTP username" %}{% endif %}</dt>
|
|
<dd>{{ hostingpackage.osuser.username }}</dd>
|
|
<dt>{% trans "Upload server" %}</dt>
|
|
<dd>{{ uploadserver }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4 col-md-6 col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% trans "Hosting Package Options" %}</div>
|
|
{% if hostingpackage.customerhostingpackageoption_set.exists %}
|
|
<ul class="list-group">
|
|
{% for opt in hostingpackage.get_hostingoptions %}
|
|
<li class="list-group-item">{{ opt }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p class="panel-body text-info">{% trans "No options booked" %}</p>
|
|
{% endif %}
|
|
{% if user.is_staff %}
|
|
<p class="panel-body"><a class="btn btn-primary" href="#" title="{% trans "Add another hosting option" %}">{% trans "Add option" %}</a></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4 col-md-6 col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% trans "Hosting Package Actions" %}</div>
|
|
<ul class="list-group">
|
|
<li class="list-group-item"><a href="#" title="{% trans "Edit Hosting Package Description" %}">{% trans "Edit description" %}</a></li>
|
|
<li class="list-group-item"><a href="{% url "set_osuser_password" slug=hostingpackage.osuser.username %}">{% if hostingpackage.osuser.is_sftp %}{% trans "Set SFTP password" %}{% else %}{% trans "Set SSH/SFTP password" %}{% endif %}</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% trans "Domains" %}</div>
|
|
{% if hostingpackage.domains %}
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Domain name" %}</th>
|
|
<th>{% trans "Mail addresses" %}</th>
|
|
<th>{% trans "Websites" %}</th>
|
|
<th title="{% trans "Domain actions" %}"><span class="sr-only">{% trans "Actions" %}</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for domain in hostingpackage.domains.all %}
|
|
<tr>
|
|
<td>{{ domain.domain }}</td>
|
|
{% if domain.domain.maildomain %}
|
|
<td>{{ domain.domain.maildomain.mailaddresses|join:", " }}</td>
|
|
{% else %}
|
|
<td class="text-info">{% trans "None" %}</td>
|
|
{% endif %}
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p class="panel-body text-info">{% trans "There are no domains assigned to this hosting package yet." %}</p>
|
|
{% endif %}
|
|
{% if user.is_staff %}
|
|
<p class="panel-body"><a href="{% url 'create_hosting_domain' package=hostingpackage.id %}" class="btn btn-primary">{% trans "Add domain" %}</a></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% trans "E-Mail-Accounts" %}</div>
|
|
{% if hostingpackage.mailboxes %}
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Mailbox" %}</th>
|
|
<th>{% trans "Mail addresses" %}</th>
|
|
<th>{% trans "Active" %}</th>
|
|
<th title="{% trans "Mailbox actions" %}"><span class="sr-only">{% trans "Actions" %}</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for mailbox in hostingpackage.mailboxes %}
|
|
<tr>
|
|
<td>{{ mailbox.username }}</td>
|
|
<td>{{ mailbox.mailaddresses|join:", " }}</td>
|
|
<td><i class="glyphicon glyphicon-{% if mailbox.active %}ok-circle{% else %}minus-sign{% endif %}"></i><span class="sr-only"> {% if mailbox.active %}{% trans "Active" %}{% else %}{% trans "inactive" %}{% endif %}</span></td>
|
|
<td>
|
|
<a href="{% url 'change_mailbox_password' package=hostingpackage.id slug=mailbox.username %}"><i class="fa fa-user-secret" title="{% trans "Set mailbox password" %}"></i><span class="sr-only"> {% trans "Set mailbox password" %}</span></a>
|
|
</td>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p class="panel-body text-info">{% trans "There are no mailboxes assigned to this hosting package yet." %}</p>
|
|
{% endif %}
|
|
{% if hostingpackage.may_add_mailbox %}
|
|
<p class="panel-body"><a href="{% url 'create_mailbox' package=hostingpackage.id %}" class="btn btn-primary">{% trans "Add mailbox" %}</a></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% trans "Databases" %}</div>
|
|
{% if hostingpackage.databases %}
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th title="{% trans "Database type" %}"><span class="sr-only">{% trans "Type" %}</span></th>
|
|
<th>{% trans "Database name" %}</th>
|
|
<th>{% trans "Database user" %}</th>
|
|
<th title="{% trans "Database actions" %}"><span class="sr-only">{% trans "Actions" %}</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for database in hostingpackage.databases %}
|
|
<tr>
|
|
<td>{% include "userdbs/snippets/db_type.html" with db_type=database.db_user.db_type %}</td>
|
|
<td>{{ database.db_name }}</td>
|
|
<td>{{ database.db_user.username }}</td>
|
|
<td></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p class="panel-body text-info">{% trans "There are no databases assigned to this hosting package yet." %}</p>
|
|
{% endif %}
|
|
{% if hostingpackage.may_add_database %}
|
|
<p class="panel-body"><a href="#" class="btn btn-primary">{% trans "Add database" %}</a></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|