render hosting package table on user dashboard

This commit is contained in:
Jan Dittberner 2015-01-18 16:20:47 +01:00
parent d34f3596ae
commit d7d41d2fd9

View file

@ -3,10 +3,46 @@
{% block title %}{{ block.super }} - {% blocktrans with full_name=dashboard_user.get_full_name %}Dashboard for {{ full_name }}{% endblocktrans %}{% endblock title %} {% block title %}{{ block.super }} - {% blocktrans with full_name=dashboard_user.get_full_name %}Dashboard for {{ full_name }}{% endblocktrans %}{% endblock title %}
{% block page_title %}{% blocktrans with full_name=dashboard_user.get_full_name %}Dashboard for {{ full_name }}{% endblocktrans %}{% endblock page_title %} {% block page_title %}{% blocktrans with full_name=dashboard_user.get_full_name %}Dashboard for {{ full_name }}{% endblocktrans %}{% endblock page_title %}
{% block content %} {% block content %}
<p>Contract details</p> <div class="row">
<ul> <div class="col-lg-12 col-md-12 col-xs-12">
<li>Domains</li> <div class="panel panel-default">
<li>Email mailboxes</li> <div class="panel-heading">{% trans "Hosting packages" %}</div>
<li>Email addresses</li> <div class="panel-body">
</ul> {% if hosting_packages %}
<table class="table">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Disk space" %}</th>
<th>{% trans "Mailboxes" %}</th>
<th>{% trans "Databases" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for package in hosting_packages %}
<tr>
<th>{{ package.name }}</th>
<th>
{% with diskspace=package.get_disk_space %}
<span title="{% blocktrans %}The reserved disk space for your hosting package is {{ diskspace }} bytes.{% endblocktrans %}">{{ diskspace|filesizeformat }}</span>
{% endwith %}
</th>
<th>{% blocktrans with num=package.get_used_mailboxes total=package.get_mailboxes %}used {{ num }} of {{ total }}{% endblocktrans %}</th>
<th>{% for dbtype in package.get_databases %}
{{ dbtype.number }} {% include "userdbs/snippets/db_type.html" with db_type=dbtype.db_type %}
{% if not forloop.last %} / {% endif %}
{% endfor %}</th>
<th></th>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-info">{% trans "You have no hosting packages yet." %}</p>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock content %} {% endblock content %}