Start switch to Bootstrap 5
- drop jQuery and fontawesome dependencies - add bootstrap5 and bootstrap-icons - update fonts mfizz - update base templates and the first set of other templates - replace blocktrans and trans with blocktranslate and translate to prepare for Django 4 - move hostingpakcage templates to hostingpackages/templates - update translations
This commit is contained in:
parent
5cf7ef7a23
commit
8e42cb9c18
124 changed files with 10873 additions and 4490 deletions
|
@ -1,14 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{{ block.super }} - {% trans "Welcome" %}{% endblock title %}
|
||||
{% block page_title %}{% trans "Welcome to our customer self service" %}{% endblock page_title %}
|
||||
{% block title %}{{ block.super }} - {% translate "Welcome" %}{% endblock title %}
|
||||
{% block page_title %}{% translate "Welcome to our customer self service" %}{% endblock page_title %}
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<p>{% url 'customer_dashboard' slug=user.username as dashboard_url %}{% blocktrans with full_name=user.get_full_name %}Hello {{ full_name }},<br />
|
||||
You can visit your <a href="{{ dashboard_url }}">Dashboard</a> to view and modify your hosting options.
|
||||
{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p>{% trans "This is your entry to our customer self service sytem." %}</p>
|
||||
<p>{% url 'account_login' as login_url %}{% url 'dashboard' as dashboard_url %}{% blocktrans %}If you are already a customer you can <a href="{{ login_url }}?next={{ dashboard_url }}">Sign in</a> to view and modify your hosting options.{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
<p>{% url 'customer_dashboard' slug=user.username as dashboard_url %}
|
||||
{% blocktranslate with full_name=user.get_full_name trimmed %}
|
||||
Hello {{ full_name }},<br/>
|
||||
You can visit your <a href="{{ dashboard_url }}">Dashboard</a> to view and modify your hosting options.
|
||||
{% endblocktranslate %}</p>
|
||||
{% endblock content %}
|
|
@ -1,51 +1,64 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% 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 title %}{{ block.super }} - {% blocktranslate with full_name=dashboard_user.get_full_name trimmed %}
|
||||
Dashboard for {{ full_name }}
|
||||
{% endblocktranslate %}{% endblock title %}
|
||||
{% block page_title %}{% blocktranslate with full_name=dashboard_user.get_full_name trimmed %}
|
||||
Dashboard for {{ full_name }}
|
||||
{% endblocktranslate %}{% endblock page_title %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{% trans "Hosting packages" %}</div>
|
||||
<div class="panel-body">
|
||||
{% 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><a href="{{ package.get_absolute_url }}" title="{% blocktrans with packagename=package.name %}Show details for {{ packagename }}{% endblocktrans %}">{{ package.name }}</a></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.used_mailbox_count total=package.mailbox_count %}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">{% if user == object %}{% trans "You have no hosting packages yet." %}{% else %}{% trans "This user has no hosting packages assigned yet." %}{% endif %}</p>
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url "create_customer_hosting_package" user=object.username %}" class="btn btn-primary">{% trans "Add hosting package" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h2>{% translate "Hosting packages" %}</h2>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{% if hosting_packages %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Disk space" %}</th>
|
||||
<th>{% translate "Mailboxes" %}</th>
|
||||
<th>{% translate "Databases" %}</th>
|
||||
<th>{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for package in hosting_packages %}
|
||||
<tr>
|
||||
<th><a href="{{ package.get_absolute_url }}"
|
||||
title="{% blocktranslate with packagename=package.name trimmed %}
|
||||
Show details for {{ packagename }}
|
||||
{% endblocktranslate %}">{{ package.name }}</a>
|
||||
</th>
|
||||
<th>
|
||||
{% with diskspace=package.get_disk_space %}
|
||||
<span title="{% blocktranslate trimmed %}
|
||||
The reserved disk space for your hosting package is {{ diskspace }} bytes.
|
||||
{% endblocktranslate %}">{{ diskspace|filesizeformat }}</span>
|
||||
{% endwith %}
|
||||
</th>
|
||||
<th>
|
||||
{% blocktranslate with num=package.used_mailbox_count total=package.mailbox_count trimmed %}
|
||||
used {{ num }} of {{ total }}
|
||||
{% endblocktranslate %}</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">
|
||||
{% if user == object %}{% translate "You have no hosting packages yet." %}{% else %}
|
||||
{% translate "This user has no hosting packages assigned yet." %}{% endif %}</p>
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url "create_customer_hosting_package" user=object.username %}"
|
||||
class="btn btn-primary">{% translate "Add hosting package" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
Loading…
Add table
Add a link
Reference in a new issue