2015-01-24 16:26:32 +01:00
{% 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" >
2015-01-24 22:33:09 +01:00
< div class = "col-lg-4 col-md-6 col-xs-12" >
2015-01-24 16:26:32 +01:00
< div class = "panel panel-default" >
2015-01-24 22:33:09 +01:00
< 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 >
2015-01-24 16:26:32 +01:00
< 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 >
2015-01-24 22:33:09 +01:00
{% 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 >
2015-01-24 16:26:32 +01:00
{% endwith %}
< dt > {% trans "Mailboxes" %}< / dt >
2015-01-24 22:33:09 +01:00
< 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 >
2015-01-26 12:00:26 +01:00
< dt > {% if osuser.is_sftp_user %}{% trans "SFTP username" %}{% else %}{% trans "SSH/SFTP username" %}{% endif %}< / dt >
< dd > {{ osuser.username }}< / dd >
2015-01-24 16:26:32 +01:00
< dt > {% trans "Upload server" %}< / dt >
< dd > {{ uploadserver }}< / dd >
< / dl >
< / div >
< / div >
2015-01-24 22:33:09 +01:00
< 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 >
2015-01-26 12:00:26 +01:00
{% if hostingoptions %}
2015-01-24 22:33:09 +01:00
< ul class = "list-group" >
2015-01-26 12:00:26 +01:00
{% for opt in hostingoptions %}
2015-01-24 22:33:09 +01:00
< 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 %}
2015-01-25 14:04:32 +01:00
< p class = "panel-body" > < a class = "btn btn-primary" href = "{% url 'hosting_option_choices' pk=hostingpackage.id %}" title = "{% trans " Add another hosting option " % } " > {% trans "Add option" %}< / a > < / p >
2015-01-24 22:33:09 +01:00
{% endif %}
< / div >
< / div >
< div class = "col-lg-4 col-md-6 col-xs-12" >
2015-01-24 16:26:32 +01:00
< div class = "panel panel-default" >
< div class = "panel-heading" > {% trans "Hosting Package Actions" %}< / div >
< ul class = "list-group" >
2015-01-24 22:33:09 +01:00
< li class = "list-group-item" > < a href = "#" title = "{% trans " Edit Hosting Package Description " % } " > {% trans "Edit description" %}< / a > < / li >
2015-01-26 12:00:26 +01:00
< li class = "list-group-item" > < a href = "{% url " set_osuser_password " slug = osuser.username % } " > {% if osuser.is_sftp %}{% trans "Set SFTP password" %}{% else %}{% trans "Set SSH/SFTP password" %}{% endif %}< / a > < / li >
2015-01-24 16:26:32 +01:00
< / ul >
< / div >
< / div >
< / div >
2015-01-24 22:33:09 +01:00
< 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 >
2015-01-26 12:00:26 +01:00
{% if domains %}
2015-01-24 22:33:09 +01:00
< table class = "table table-condensed" >
< thead >
< tr >
2015-01-26 13:38:26 +01:00
< th class = "name-column" > {% trans "Domain name" %}< / th >
2015-01-24 22:33:09 +01:00
< th > {% trans "Mail addresses" %}< / th >
< th > {% trans "Websites" %}< / th >
2015-01-26 13:38:26 +01:00
< th title = "{% trans " Domain actions " % } " class = "actions-column" > < span class = "sr-only" > {% trans "Actions" %}< / span > < / th >
2015-01-24 22:33:09 +01:00
< / tr >
< / thead >
< tbody >
2015-01-26 12:00:26 +01:00
{% for domain in domains %}
2015-01-24 22:33:09 +01:00
< tr >
< td > {{ domain.domain }}< / td >
{% if domain.domain.maildomain %}
2015-01-25 22:13:11 +01:00
< td >
{% with maildomain=domain.domain.maildomain %}
{% for mailaddress in maildomain.mailaddresses %}{% spaceless %}
< a href = "{% url 'edit_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" title = "{% trans " Edit mail address targets " % } " > {{ mailaddress }}< / a >
< a href = "{% url 'delete_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" title = "{% trans " Delete mail address " % } " > < i class = "glyphicon glyphicon-trash" > < / i > < / a >
{% endspaceless %}{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endwith %}
< / td >
2015-01-24 22:33:09 +01:00
{% else %}
< td class = "text-info" > {% trans "None" %}< / td >
{% endif %}
< td > < / td >
2015-01-25 22:13:11 +01:00
< td >
{% with maildomain=domain.domain.maildomain %}
< a href = "{% url 'add_mailaddress' package=hostingpackage.id domain=maildomain.domain %}" title = "{% trans " Add mail address " % } " > < i class = "fa fa-envelope" > < / i > < / a >
{% endwith %}
< / td >
2015-01-24 22:33:09 +01:00
< / 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 %}
2015-01-25 00:40:43 +01:00
< p class = "panel-body" > < a href = "{% url 'create_hosting_domain' package=hostingpackage.id %}" class = "btn btn-primary" > {% trans "Add domain" %}< / a > < / p >
2015-01-24 22:33:09 +01:00
{% 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 >
2015-01-26 12:00:26 +01:00
{% if mailboxes %}
2015-01-24 22:33:09 +01:00
< table class = "table table-condensed" >
< thead >
< tr >
2015-01-26 13:38:26 +01:00
< th class = "name-column" > {% trans "Mailbox" %}< / th >
2015-01-24 22:33:09 +01:00
< th > {% trans "Mail addresses" %}< / th >
2015-01-26 13:38:26 +01:00
< th class = "status-column" > {% trans "Active" %}< / th >
< th title = "{% trans " Mailbox actions " % } " class = "actions-column" > < span class = "sr-only" > {% trans "Actions" %}< / span > < / th >
2015-01-24 22:33:09 +01:00
< / tr >
< / thead >
< tbody >
2015-01-26 12:00:26 +01:00
{% for mailbox in mailboxes %}
2015-01-24 22:33:09 +01:00
< 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 >
2015-01-25 12:49:31 +01:00
< 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 >
2015-01-24 22:33:09 +01:00
< / 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 %}
2015-01-25 12:16:18 +01:00
< p class = "panel-body" > < a href = "{% url 'create_mailbox' package=hostingpackage.id %}" class = "btn btn-primary" > {% trans "Add mailbox" %}< / a > < / p >
2015-01-24 22:33:09 +01:00
{% 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 >
2015-01-26 12:00:26 +01:00
{% if databases %}
2015-01-24 22:33:09 +01:00
< table class = "table table-condensed" >
< thead >
< tr >
2015-01-26 13:38:26 +01:00
< th class = "name-column" > {% trans "Database name" %}< / th >
< th class = "name-column" > {% trans "Database user" %}< / th >
2015-01-24 22:33:09 +01:00
< th title = "{% trans " Database type " % } " > < span class = "sr-only" > {% trans "Type" %}< / span > < / th >
2015-01-26 13:38:26 +01:00
< th title = "{% trans " Database actions " % } " class = "actions-column" > < span class = "sr-only" > {% trans "Actions" %}< / span > < / th >
2015-01-24 22:33:09 +01:00
< / tr >
< / thead >
< tbody >
2015-01-26 12:00:26 +01:00
{% for database in databases %}
2015-01-24 22:33:09 +01:00
< tr >
< td > {{ database.db_name }}< / td >
2015-01-26 12:00:26 +01:00
< td > {{ database.db_user.name }}< / td >
2015-01-26 13:38:26 +01:00
< td > {% include "userdbs/snippets/db_type.html" with db_type=database.db_user.db_type %}< / td >
< td >
< a href = "{% url 'change_dbuser_password' package=hostingpackage.id slug=database.db_user.name %}" title = "{% trans " Set database user password " % } " > < i class = "fa fa-user-secret" > < / i > < span class = "sr-only" > {% trans "Set database user password" %}< / span > < / a >
2015-01-26 13:39:35 +01:00
< a href = "{% url 'delete_userdatabase' package=hostingpackage.id slug=database.db_name %}" title = "{% trans " Delete database " % } " > < i class = "glyphicon glyphicon-trash" > < / i > < span class = "sr-only" > {% trans "Delete database" %}< / span > < / a >
2015-01-26 13:38:26 +01:00
< / td >
2015-01-24 22:33:09 +01:00
< / 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 %}
2015-01-26 12:07:56 +01:00
< p class = "panel-body" > < a href = "{% url 'add_userdatabase' package=hostingpackage.id %}" class = "btn btn-primary" > {% trans "Add database" %}< / a > < / p >
2015-01-24 22:33:09 +01:00
{% endif %}
< / div >
< / div >
< / div >
2015-01-24 16:26:32 +01:00
{% endblock content %}