aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-04-20 21:24:33 +0200
committerDaniel Schadt <kingdread@gmx.de>2023-04-20 21:43:46 +0200
commit61695dde71973a178e92f2a25cab9082f7e2fc7b (patch)
tree3ade9beb2152671152a71d90e8e1a15cce468bcb
parent6402fd860c5eeb460575a913d869a6484fad1320 (diff)
downloadfietsboek-61695dde71973a178e92f2a25cab9082f7e2fc7b.tar.gz
fietsboek-61695dde71973a178e92f2a25cab9082f7e2fc7b.tar.bz2
fietsboek-61695dde71973a178e92f2a25cab9082f7e2fc7b.zip
add unfinished uploads to home page
-rw-r--r--fietsboek/locale/de/LC_MESSAGES/messages.mobin13053 -> 13194 bytes
-rw-r--r--fietsboek/locale/de/LC_MESSAGES/messages.po38
-rw-r--r--fietsboek/locale/en/LC_MESSAGES/messages.mobin12272 -> 12387 bytes
-rw-r--r--fietsboek/locale/en/LC_MESSAGES/messages.po53
-rw-r--r--fietsboek/locale/fietslog.pot36
-rw-r--r--fietsboek/templates/home.jinja210
-rw-r--r--fietsboek/views/default.py3
7 files changed, 84 insertions, 56 deletions
diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.mo b/fietsboek/locale/de/LC_MESSAGES/messages.mo
index 7627f21..1ebee03 100644
--- a/fietsboek/locale/de/LC_MESSAGES/messages.mo
+++ b/fietsboek/locale/de/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.po b/fietsboek/locale/de/LC_MESSAGES/messages.po
index 500d73b..4a25c77 100644
--- a/fietsboek/locale/de/LC_MESSAGES/messages.po
+++ b/fietsboek/locale/de/LC_MESSAGES/messages.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2023-04-03 20:34+0200\n"
+"POT-Creation-Date: 2023-04-20 21:16+0200\n"
"PO-Revision-Date: 2022-07-02 17:35+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@@ -18,11 +18,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n"
-#: fietsboek/util.py:275
+#: fietsboek/util.py:280
msgid "password_constraint.mismatch"
msgstr "Passwörter stimmen nicht überein"
-#: fietsboek/util.py:277
+#: fietsboek/util.py:282
msgid "password_constraint.length"
msgstr "Passwort zu kurz"
@@ -470,14 +470,20 @@ msgstr "Abbrechen"
msgid "page.home.title"
msgstr "Startseite"
-#: fietsboek/templates/home.jinja2:12 fietsboek/templates/home.jinja2:19
-#: fietsboek/templates/home.jinja2:37
+#: fietsboek/templates/home.jinja2:8
+msgid "page.home.unfinished_uploads"
+msgstr ""
+"Es sind noch nicht abgeschlossene Uploads vorhanden. "
+"Klicke auf die Links, um sie fortzusetzen:"
+
+#: fietsboek/templates/home.jinja2:22 fietsboek/templates/home.jinja2:29
+#: fietsboek/templates/home.jinja2:47
msgid "page.home.summary.track"
msgid_plural "page.home.summary.tracks"
msgstr[0] "%(num)d Strecke"
msgstr[1] "%(num)d Strecken"
-#: fietsboek/templates/home.jinja2:37
+#: fietsboek/templates/home.jinja2:47
msgid "page.home.total"
msgstr "Gesamt"
@@ -752,35 +758,35 @@ msgstr "Wappen bearbeitet"
msgid "flash.badge_deleted"
msgstr "Wappen gelöscht"
-#: fietsboek/views/default.py:114
+#: fietsboek/views/default.py:117
msgid "flash.invalid_credentials"
msgstr "Ungültige Nutzerdaten"
-#: fietsboek/views/default.py:118
+#: fietsboek/views/default.py:121
msgid "flash.account_not_verified"
msgstr "Konto noch nicht bestätigt"
-#: fietsboek/views/default.py:121
+#: fietsboek/views/default.py:124
msgid "flash.logged_in"
msgstr "Du bist nun angemeldet"
-#: fietsboek/views/default.py:143
+#: fietsboek/views/default.py:146
msgid "flash.logged_out"
msgstr "Du bist nun abgemeldet"
-#: fietsboek/views/default.py:177
+#: fietsboek/views/default.py:180
msgid "flash.reset_invalid_email"
msgstr "Ungültige E-Mail-Adresse angegeben"
-#: fietsboek/views/default.py:182
+#: fietsboek/views/default.py:185
msgid "flash.password_token_generated"
msgstr "Ein Link zum Zurücksetzen des Passworts wurde versandt"
-#: fietsboek/views/default.py:187
+#: fietsboek/views/default.py:190
msgid "page.password_reset.email.subject"
msgstr "Fietsboek Passwortzurücksetzung"
-#: fietsboek/views/default.py:190
+#: fietsboek/views/default.py:193
msgid "page.password_reset.email.body"
msgstr ""
"Du kannst Dein Fietsboek-Passwort hier zurücksetzen: {}\n"
@@ -788,11 +794,11 @@ msgstr ""
"Falls Du keine Passwortzurücksetzung beantragt hast, dann ignoriere diese"
" E-Mail."
-#: fietsboek/views/default.py:223
+#: fietsboek/views/default.py:226
msgid "flash.email_verified"
msgstr "E-Mail-Adresse bestätigt"
-#: fietsboek/views/default.py:237
+#: fietsboek/views/default.py:240
msgid "flash.password_updated"
msgstr "Passwort aktualisiert"
diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.mo b/fietsboek/locale/en/LC_MESSAGES/messages.mo
index 723b1a5..9f17f48 100644
--- a/fietsboek/locale/en/LC_MESSAGES/messages.mo
+++ b/fietsboek/locale/en/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.po b/fietsboek/locale/en/LC_MESSAGES/messages.po
index 94fd6a6..9a5bf38 100644
--- a/fietsboek/locale/en/LC_MESSAGES/messages.po
+++ b/fietsboek/locale/en/LC_MESSAGES/messages.po
@@ -7,23 +7,22 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2023-04-03 20:34+0200\n"
+"POT-Creation-Date: 2023-04-20 21:16+0200\n"
"PO-Revision-Date: 2023-04-03 20:42+0200\n"
"Last-Translator: \n"
-"Language-Team: en <LL@li.org>\n"
"Language: en\n"
+"Language-Team: en <LL@li.org>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.11.0\n"
-"X-Generator: Poedit 3.2.2\n"
-#: fietsboek/util.py:275
+#: fietsboek/util.py:280
msgid "password_constraint.mismatch"
msgstr "Passwords don't match"
-#: fietsboek/util.py:277
+#: fietsboek/util.py:282
msgid "password_constraint.length"
msgstr "Password not long enough"
@@ -389,8 +388,8 @@ msgstr "Public"
#: fietsboek/templates/edit_form.jinja2:21
msgid "page.track.form.visibility.info"
msgstr ""
-"Note that tagged people and people with the share link can always view the "
-"track."
+"Note that tagged people and people with the share link can always view "
+"the track."
#: fietsboek/templates/edit_form.jinja2:25
msgid "page.track.form.type"
@@ -449,7 +448,8 @@ msgstr "Apply"
msgid "page.track.form.transformer.enable"
msgstr "Apply transformation"
-#: fietsboek/templates/finish_upload.jinja2:8 fietsboek/templates/upload.jinja2:6
+#: fietsboek/templates/finish_upload.jinja2:8
+#: fietsboek/templates/upload.jinja2:6
msgid "page.upload.title"
msgstr "Upload"
@@ -466,14 +466,18 @@ msgstr "Cancel"
msgid "page.home.title"
msgstr "Home"
-#: fietsboek/templates/home.jinja2:12 fietsboek/templates/home.jinja2:19
-#: fietsboek/templates/home.jinja2:37
+#: fietsboek/templates/home.jinja2:8
+msgid "page.home.unfinished_uploads"
+msgstr "You have unfinished uploads. Click on the links below to resume them:"
+
+#: fietsboek/templates/home.jinja2:22 fietsboek/templates/home.jinja2:29
+#: fietsboek/templates/home.jinja2:47
msgid "page.home.summary.track"
msgid_plural "page.home.summary.tracks"
msgstr[0] "%(num)d track"
msgstr[1] "%(num)d tracks"
-#: fietsboek/templates/home.jinja2:37
+#: fietsboek/templates/home.jinja2:47
msgid "page.home.total"
msgstr "Total"
@@ -636,8 +640,8 @@ msgstr "Request a Password Reset"
#: fietsboek/templates/request_password.jinja2:6
msgid "page.request_password.info"
msgstr ""
-"If you forgot your password, you can type in your email address below and "
-"receive a link to reset your password"
+"If you forgot your password, you can type in your email address below and"
+" receive a link to reset your password"
#: fietsboek/templates/request_password.jinja2:12
msgid "page.request_password.email"
@@ -746,46 +750,46 @@ msgstr "Badge has been modified"
msgid "flash.badge_deleted"
msgstr "Badge has been deleted"
-#: fietsboek/views/default.py:114
+#: fietsboek/views/default.py:117
msgid "flash.invalid_credentials"
msgstr "Invalid login credentials"
-#: fietsboek/views/default.py:118
+#: fietsboek/views/default.py:121
msgid "flash.account_not_verified"
msgstr "Your account is not verified yet"
-#: fietsboek/views/default.py:121
+#: fietsboek/views/default.py:124
msgid "flash.logged_in"
msgstr "You are now logged in"
-#: fietsboek/views/default.py:143
+#: fietsboek/views/default.py:146
msgid "flash.logged_out"
msgstr "You have been logged out"
-#: fietsboek/views/default.py:177
+#: fietsboek/views/default.py:180
msgid "flash.reset_invalid_email"
msgstr "Invalid email address provided"
-#: fietsboek/views/default.py:182
+#: fietsboek/views/default.py:185
msgid "flash.password_token_generated"
msgstr "A password reset email has been sent"
-#: fietsboek/views/default.py:187
+#: fietsboek/views/default.py:190
msgid "page.password_reset.email.subject"
msgstr "Fietsboek Password Reset"
-#: fietsboek/views/default.py:190
+#: fietsboek/views/default.py:193
msgid "page.password_reset.email.body"
msgstr ""
"You can reset your Fietsboek password here: {}\n"
"\n"
"If you did not request a password reset, ignore this email."
-#: fietsboek/views/default.py:223
+#: fietsboek/views/default.py:226
msgid "flash.email_verified"
msgstr "Your email address has been verified"
-#: fietsboek/views/default.py:237
+#: fietsboek/views/default.py:240
msgid "flash.password_updated"
msgstr "Password has been updated"
@@ -828,3 +832,4 @@ msgstr "Friend has been added"
#: fietsboek/views/user_data.py:102
msgid "flash.friend_request_sent"
msgstr "Friend request sent"
+
diff --git a/fietsboek/locale/fietslog.pot b/fietsboek/locale/fietslog.pot
index a232c05..05c148d 100644
--- a/fietsboek/locale/fietslog.pot
+++ b/fietsboek/locale/fietslog.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2023-04-03 20:34+0200\n"
+"POT-Creation-Date: 2023-04-20 21:16+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n"
-#: fietsboek/util.py:275
+#: fietsboek/util.py:280
msgid "password_constraint.mismatch"
msgstr ""
-#: fietsboek/util.py:277
+#: fietsboek/util.py:282
msgid "password_constraint.length"
msgstr ""
@@ -463,14 +463,18 @@ msgstr ""
msgid "page.home.title"
msgstr ""
-#: fietsboek/templates/home.jinja2:12 fietsboek/templates/home.jinja2:19
-#: fietsboek/templates/home.jinja2:37
+#: fietsboek/templates/home.jinja2:8
+msgid "page.home.unfinished_uploads"
+msgstr ""
+
+#: fietsboek/templates/home.jinja2:22 fietsboek/templates/home.jinja2:29
+#: fietsboek/templates/home.jinja2:47
msgid "page.home.summary.track"
msgid_plural "page.home.summary.tracks"
msgstr[0] ""
msgstr[1] ""
-#: fietsboek/templates/home.jinja2:37
+#: fietsboek/templates/home.jinja2:47
msgid "page.home.total"
msgstr ""
@@ -738,43 +742,43 @@ msgstr ""
msgid "flash.badge_deleted"
msgstr ""
-#: fietsboek/views/default.py:114
+#: fietsboek/views/default.py:117
msgid "flash.invalid_credentials"
msgstr ""
-#: fietsboek/views/default.py:118
+#: fietsboek/views/default.py:121
msgid "flash.account_not_verified"
msgstr ""
-#: fietsboek/views/default.py:121
+#: fietsboek/views/default.py:124
msgid "flash.logged_in"
msgstr ""
-#: fietsboek/views/default.py:143
+#: fietsboek/views/default.py:146
msgid "flash.logged_out"
msgstr ""
-#: fietsboek/views/default.py:177
+#: fietsboek/views/default.py:180
msgid "flash.reset_invalid_email"
msgstr ""
-#: fietsboek/views/default.py:182
+#: fietsboek/views/default.py:185
msgid "flash.password_token_generated"
msgstr ""
-#: fietsboek/views/default.py:187
+#: fietsboek/views/default.py:190
msgid "page.password_reset.email.subject"
msgstr ""
-#: fietsboek/views/default.py:190
+#: fietsboek/views/default.py:193
msgid "page.password_reset.email.body"
msgstr ""
-#: fietsboek/views/default.py:223
+#: fietsboek/views/default.py:226
msgid "flash.email_verified"
msgstr ""
-#: fietsboek/views/default.py:237
+#: fietsboek/views/default.py:240
msgid "flash.password_updated"
msgstr ""
diff --git a/fietsboek/templates/home.jinja2 b/fietsboek/templates/home.jinja2
index 5e552e4..26a06d3 100644
--- a/fietsboek/templates/home.jinja2
+++ b/fietsboek/templates/home.jinja2
@@ -3,6 +3,16 @@
{% block content %}
<div class="container">
<h1>{{ _("page.home.title") }}</h1>
+ {% if unfinished_uploads %}
+ <div class="alert alert-warning">
+ {{ _("page.home.unfinished_uploads") }}
+ <ul class="mb-0">
+ {% for upload in unfinished_uploads %}
+ <li><a href="{{ request.route_url("finish-upload", upload_id=upload.id) }}">{{ upload.uploaded_at | format_datetime }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
{% if summary %}
<div class="list-group list-group-root">
{% for year in summary %}
diff --git a/fietsboek/views/default.py b/fietsboek/views/default.py
index 1c30524..c164463 100644
--- a/fietsboek/views/default.py
+++ b/fietsboek/views/default.py
@@ -59,9 +59,12 @@ def home(request):
request.dbsession.add(track.cache)
summary.add(TrackWithMetadata(track, request.data_manager))
+ unfinished_uploads = request.identity.uploads
+
return {
"summary": summary,
"month_name": util.month_name,
+ "unfinished_uploads": unfinished_uploads,
}