From 924760273c7086930ec56b9bdad597a462ec763a Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sun, 29 Oct 2017 17:53:48 +0100 Subject: [PATCH] Update the ui macros and polish the overall UI --- admin/mailu/ui/templates/admin/create.html | 4 +- admin/mailu/ui/templates/admin/list.html | 32 ++++---- admin/mailu/ui/templates/alias/create.html | 4 +- admin/mailu/ui/templates/alias/list.html | 50 ++++++------ .../mailu/ui/templates/alternative/list.html | 36 ++++----- admin/mailu/ui/templates/announcement.html | 4 +- admin/mailu/ui/templates/base.html | 17 +--- admin/mailu/ui/templates/confirm.html | 4 +- admin/mailu/ui/templates/docker-error.html | 2 +- admin/mailu/ui/templates/domain/create.html | 4 +- admin/mailu/ui/templates/domain/details.html | 60 +++++++------- admin/mailu/ui/templates/domain/list.html | 78 +++++++++---------- admin/mailu/ui/templates/fetch/create.html | 20 ++++- admin/mailu/ui/templates/fetch/edit.html | 2 +- admin/mailu/ui/templates/fetch/list.html | 58 +++++++------- admin/mailu/ui/templates/form.html | 4 +- admin/mailu/ui/templates/helpers.html | 13 ---- admin/mailu/ui/templates/index.html | 5 -- admin/mailu/ui/templates/login.html | 4 +- admin/mailu/ui/templates/macros.html | 33 ++++++++ admin/mailu/ui/templates/manager/create.html | 4 +- admin/mailu/ui/templates/manager/list.html | 32 ++++---- admin/mailu/ui/templates/relay/list.html | 50 ++++++------ admin/mailu/ui/templates/services.html | 44 +++++------ admin/mailu/ui/templates/user/create.html | 11 ++- admin/mailu/ui/templates/user/forward.html | 4 +- admin/mailu/ui/templates/user/list.html | 74 +++++++++--------- admin/mailu/ui/templates/user/reply.html | 4 +- admin/mailu/ui/templates/user/settings.html | 7 +- 29 files changed, 347 insertions(+), 317 deletions(-) delete mode 100644 admin/mailu/ui/templates/helpers.html delete mode 100644 admin/mailu/ui/templates/index.html diff --git a/admin/mailu/ui/templates/admin/create.html b/admin/mailu/ui/templates/admin/create.html index 6fe7e67b..060e5570 100644 --- a/admin/mailu/ui/templates/admin/create.html +++ b/admin/mailu/ui/templates/admin/create.html @@ -4,7 +4,8 @@ {% trans %}Add a global administrator{% endtrans %} {% endblock %} -{% block box_content %} +{% block content %} +{% call macros.box() %}
{{ form.hidden_tag() }} {{ macros.form_field(form.admin, id='admin') }} @@ -13,4 +14,5 @@ $("#admin").select2();
+{% endcall %} {% endblock %} diff --git a/admin/mailu/ui/templates/admin/list.html b/admin/mailu/ui/templates/admin/list.html index d286fb3f..72b5a1fa 100644 --- a/admin/mailu/ui/templates/admin/list.html +++ b/admin/mailu/ui/templates/admin/list.html @@ -10,21 +10,19 @@ {% endblock %} -{% block box %} - - - - - - - {% for admin in admins %} - - - - - {% endfor %} - -
{% trans %}Actions{% endtrans %}{% trans %}Email{% endtrans %}
- - {{ admin }}
+{% block content %} +{% call macros.table() %} + + {% trans %}Actions{% endtrans %} + {% trans %}Email{% endtrans %} + +{% for admin in admins %} + + + + + {{ admin }} + +{% endfor %} +{% endcall %} {% endblock %} diff --git a/admin/mailu/ui/templates/alias/create.html b/admin/mailu/ui/templates/alias/create.html index c848464b..9b176d36 100644 --- a/admin/mailu/ui/templates/alias/create.html +++ b/admin/mailu/ui/templates/alias/create.html @@ -8,7 +8,8 @@ {{ domain }} {% endblock %} -{% block box_content %} +{% block content %} +{% call macros.box() %}
{{ form.hidden_tag() }} {{ macros.form_field(form.localpart, append='@'+domain.name+'') }} @@ -23,4 +24,5 @@ })
+{% endcall %} {% endblock %} diff --git a/admin/mailu/ui/templates/alias/list.html b/admin/mailu/ui/templates/alias/list.html index d7380ef5..29766b25 100644 --- a/admin/mailu/ui/templates/alias/list.html +++ b/admin/mailu/ui/templates/alias/list.html @@ -12,30 +12,28 @@ {% trans %}Add alias{% endtrans %} {% endblock %} -{% block box %} - - - - - - - - - - - {% for alias in domain.aliases %} - - - - - - - - - {% endfor %} - -
{% trans %}Actions{% endtrans %}{% trans %}Email{% endtrans %}{% trans %}Destination{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
-   - - {{ alias }}{{ alias.destination|join(', ') or '-' }}{{ alias.comment or '' }}{{ alias.created_at }}{{ alias.updated_at or '' }}
+{% block content %} +{% call macros.table() %} + + {% trans %}Actions{% endtrans %} + {% trans %}Email{% endtrans %} + {% trans %}Destination{% endtrans %} + {% trans %}Comment{% endtrans %} + {% trans %}Created{% endtrans %} + {% trans %}Last edit{% endtrans %} + +{% for alias in domain.aliases %} + + +   + + + {{ alias }} + {{ alias.destination|join(', ') or '-' }} + {{ alias.comment or '' }} + {{ alias.created_at }} + {{ alias.updated_at or '' }} + +{% endfor %} +{% endcall %} {% endblock %} diff --git a/admin/mailu/ui/templates/alternative/list.html b/admin/mailu/ui/templates/alternative/list.html index 547d2ecb..56e7565b 100644 --- a/admin/mailu/ui/templates/alternative/list.html +++ b/admin/mailu/ui/templates/alternative/list.html @@ -12,23 +12,21 @@ {% trans %}Add alternative{% endtrans %} {% endblock %} -{% block box %} - - - - - - - - {% for alternative in domain.alternatives %} - - - - - - {% endfor %} - -
{% trans %}Actions{% endtrans %}{% trans %}Name{% endtrans %}{% trans %}Created{% endtrans %}
- - {{ alternative }}{{ alternative.created_at }}
+{% block content %} +{% call macros.table() %} + + {% trans %}Actions{% endtrans %} + {% trans %}Name{% endtrans %} + {% trans %}Created{% endtrans %} + +{% for alternative in domain.alternatives %} + + + + + {{ alternative }} + {{ alternative.created_at }} + +{% endfor %} +{% endcall %} {% endblock %} diff --git a/admin/mailu/ui/templates/announcement.html b/admin/mailu/ui/templates/announcement.html index 6d080154..ced68297 100644 --- a/admin/mailu/ui/templates/announcement.html +++ b/admin/mailu/ui/templates/announcement.html @@ -8,11 +8,13 @@ {% trans %}from{% endtrans %} {{ from_address }} {% endblock %} -{% block box_content %} +{% block content %} +{% call macros.box() %}
{{ form.hidden_tag() }} {{ macros.form_field(form.announcement_subject) }} {{ macros.form_field(form.announcement_body, rows=10) }} {{ macros.form_field(form.submit) }}
+{% endcall %} {% endblock %} diff --git a/admin/mailu/ui/templates/base.html b/admin/mailu/ui/templates/base.html index 5fb0d8a9..0aa380c8 100644 --- a/admin/mailu/ui/templates/base.html +++ b/admin/mailu/ui/templates/base.html @@ -53,22 +53,7 @@ class="hold-transition skin-blue sidebar-mini"
{{ utils.flashed_messages(container=False) }} - {% block content %} -
-
-
- {% block box %} -
- {% block box_title %}{% endblock %} -
-
- {% block box_content %}{% endblock %} -
- {% endblock %} -
-
-
- {% endblock %} + {% block content %}{% endblock %}