summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-04-12 15:49:51 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2024-04-12 15:49:51 +0200
commit1642eae4afc55b68a228bcc35031338f3e445926 (patch)
tree6054797888b8db22a02848a45647ae077b41972b
parentc08892e55d6ccf4b5759308835c0a4eda29c5213 (diff)
remove some labels in templates and update flask-paginate
-rw-r--r--requirements.txt2
-rw-r--r--src/jwebmail/templates/_bot_nav.html61
-rw-r--r--src/jwebmail/templates/_folders.html17
-rw-r--r--src/jwebmail/templates/_top_nav.html36
4 files changed, 56 insertions, 60 deletions
diff --git a/requirements.txt b/requirements.txt
index 27e1c43..072f105 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -41,7 +41,7 @@ flask-login==0.6.3 \
--hash=sha256:5e23d14a607ef12806c699590b89d0f0e0d67baeec599d75947bf9c147330333 \
--hash=sha256:849b25b82a436bf830a054e74214074af59097171562ab10bfa999e6b78aae5d
# via jwebmail (pyproject.toml)
-flask-paginate==2023.10.24 \
+flask-paginate==2024.4.12 \
--hash=sha256:48cc477fd64c95b6c7be980bc96198a8eadeca863484f78c1e1fe22608fc3b28 \
--hash=sha256:57790fd4c543c802511ade71b6a9d9654e7295fcde39eda00d3cd4aa3bd68859
# via jwebmail (pyproject.toml)
diff --git a/src/jwebmail/templates/_bot_nav.html b/src/jwebmail/templates/_bot_nav.html
index e54fd4c..e2be5f5 100644
--- a/src/jwebmail/templates/_bot_nav.html
+++ b/src/jwebmail/templates/_bot_nav.html
@@ -5,44 +5,49 @@
</div>
<div class="column">
- <form href="{{ url_for('move', folder=folder) }}" id='move-mail'>
- <div class="field is-horizontal">
- <div class="field-label is-normal">
- <label for="select-folder" class="label">{% trans %}Move to{% endtrans %}</label>
- </div>
- <div class=field-body>
- <div class="field is-grouped">
- <div class=control>
- <div class=select>
- <select name=select-folder>
- {% for f in mail_folders if f is ne folder %}
- <option type=select name="folder" value="{{ f }}">{{ f or gettext('Home') }}</option>
- {% endfor %}
- </select>
- </div>
- </div>
- {# csrf_field #}
- <div class=control>
- <input type=submit class=button value="{{ gettext('Move') }}">
+
+ {% if mail_folders|length > 1 %}
+ <form href="{{ url_for('move', folder=folder) }}" id='move-mail' class=is-pulled-left>
+ {{ form.csrf_token }}
+ <div class="field has-addons">
+ <div class=control>
+ <div class=select>
+ <select name=select-folder>
+ {% for f in mail_folders if f is ne folder %}
+ <option type=select name="folder" value="{{ f }}">
+ {{ f or gettext('Home') }}
+ </option>
+ {% endfor %}
+ </select>
</div>
</div>
+ <div class=control>
+ <input type=submit class=button value="{{ gettext('Move') }}">
+ </div>
</div>
- </div>
- </form>
- </div>
+ </form>
+ {% endif %}
+
+ <form href="{{ url_for('move', folder=folder) }}" id="remove-mail"
+ method=POST class="is-pulled-left ml-2">
- <div class=column>
- <form href="{{ url_for('move', folder=folder) }}" id="remove-mail" method=POST>
- {# csrf_field #}
+ {{ from.csrf_token }}
<div class=control>
<input id=remove type=submit class=button value="{{ gettext('Remove') }}">
</div>
</form>
+
</div>
- <div class="column has-text-right">
- <label for=allbox>{% trans %}check all{% endtrans %}</label>
- <input name=allbox type=checkbox id=check-all>
+ <div class="column is-2 mr-2 has-text-right">
+ <div class="field">
+ <div class="control">
+ <label class=checkbox for=allbox>
+ {% trans %}check all{% endtrans %}
+ <input name=allbox type=checkbox id=check-all>
+ </label>
+ </div>
+ </div>
</div>
</div>
diff --git a/src/jwebmail/templates/_folders.html b/src/jwebmail/templates/_folders.html
index fd62ab2..e9509e7 100644
--- a/src/jwebmail/templates/_folders.html
+++ b/src/jwebmail/templates/_folders.html
@@ -5,7 +5,7 @@
<div class="navbar-brand">
<span class=navbar-item>
- <b>{{ folder }}</b>
+ <b>{{ folder or gettext('Home') }}</b>
</span>
<a role="button" class="navbar-burger" data-target="navMenu" id=navbar-toggle>
<span aria-hidden="true"></span>
@@ -26,16 +26,21 @@
</nav>
</div>
- <div class="column">
+ <nav class="column">
+ <a href="{{ url_for('logout') }}" class="button">{% trans %}Logout{% endtrans %}</a>
+ <a href="{{ url_for('write') }}" class="button">{% trans %}Write{% endtrans %}</a>
+ </nav>
+
+ <div class="column is-size-7">
<div class="columns is-multiline is-mobile">
<span class="column is-half-mobile has-text-centered">
{{ pgn.info }}
</span>
- <span class="column is-half-mobile has-text-centered">
- {% if total_new_mails %}
+ {% if total_new_mails %}
+ <span class="column is-half-mobile has-text-centered">
{% trans %}{{ total_new_mails }} new{% endtrans %}
- {% endif %}
- </span>
+ </span>
+ {% endif %}
<span class="column has-text-centered">
{% if total_size %}
{% trans %}mailbox size: {% endtrans %}
diff --git a/src/jwebmail/templates/_top_nav.html b/src/jwebmail/templates/_top_nav.html
index bc4afa5..960ae86 100644
--- a/src/jwebmail/templates/_top_nav.html
+++ b/src/jwebmail/templates/_top_nav.html
@@ -1,42 +1,28 @@
<div class="columns">
- <nav class="column">
- <a href="{{ url_for('logout') }}" class="button">{% trans %}Logout{% endtrans %}</a>
- <a href="{{ url_for('write') }}" class="button">{% trans %}Write{% endtrans %}</a>
- </nav>
-
<form class=column>
- <div class="field is-horizontal">
- <div class="field-label is-normal">
- <label for=search class=label>{% trans %}Search{% endtrans %}</label>
- </div>
- <div class=field-body>
- <div class=field>
- <div class=control>
- <input type=search id=search size=8 class=input />
- </div>
- </div>
+ <div class=field>
+ <div class=control>
+ <input type=search id=search size=8 class=input placeholder="{{ gettext('Search') }}" />
</div>
</div>
</form>
<form class=column>
- <div class="field is-horizontal">
- <div class="field-label is-normal">
- <label for=sort class=label>{% trans %}Sort{% endtrans %}</label>
- </div>
- <div class=field-body>
- <div class=field>
- <div class="select" id=sort-select>
+ <div class="field">
+ <div class=control>
+ <label for=sort class="label">
+ {% trans %}Sort{% endtrans %}
+ <div class="select ml-2" id=sort-select>
<select name=sort id=sort>
- <option value="!date">{% trans %}Date{% endtrans %} - {% trans %}Descending{% endtrans %}</option>
- <option value="date">{% trans %}Date{% endtrans %} - {% trans %}Ascending{% endtrans %}</option>
+ <option value="!date">{{ gettext('Date') }} - {{ gettext('Descending') }}</option>
+ <option value="date">{{ gettext('Date') }} - {{ gettext('Ascending') }}</option>
<option value="!size">{{ gettext('Size') }} - {{ gettext('Descending') }}</option>
<option value="!sender">{{ gettext('Sender') }} - {{ gettext('Descending') }}</option>
<option value="sender">{{ gettext('Sender') }} - {{ gettext('Ascending') }}</option>
</select>
</div>
- </div>
+ </label>
</div>
</div>
</form>