aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-08-12 12:53:10 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-08-12 12:53:10 +0200
commit00266d2fe96351909365c08d9b293dae1b3ba4bc (patch)
tree917a683b4aa2696d8ec60f452c821d914dd612c8
parentcdba92f34d4b2858799dc5e3cdd411c7d84fd52b (diff)
parent9b41c25649161880f0490cb588c11cb2b5d5c5f6 (diff)
downloadfietsboek-00266d2fe96351909365c08d9b293dae1b3ba4bc.tar.gz
fietsboek-00266d2fe96351909365c08d9b293dae1b3ba4bc.tar.bz2
fietsboek-00266d2fe96351909365c08d9b293dae1b3ba4bc.zip
Merge branch 'track-templates'
-rw-r--r--fietsboek/alembic/versions/20220808_d085998b49ca.py23
-rw-r--r--fietsboek/locale/de/LC_MESSAGES/messages.mobin11214 -> 11699 bytes
-rw-r--r--fietsboek/locale/de/LC_MESSAGES/messages.po149
-rw-r--r--fietsboek/locale/en/LC_MESSAGES/messages.mobin10549 -> 11018 bytes
-rw-r--r--fietsboek/locale/en/LC_MESSAGES/messages.po146
-rw-r--r--fietsboek/locale/fietslog.pot146
-rw-r--r--fietsboek/models/track.py28
-rw-r--r--fietsboek/static/bootstrap-icons.css177
-rw-r--r--fietsboek/static/fietsboek.js4
-rw-r--r--fietsboek/static/fonts/bootstrap-icons.woffbin137216 -> 150592 bytes
-rw-r--r--fietsboek/static/fonts/bootstrap-icons.woff2bin102380 -> 112440 bytes
-rw-r--r--fietsboek/static/theme.css5
-rw-r--r--fietsboek/templates/browse.jinja231
-rw-r--r--fietsboek/templates/details.jinja26
-rw-r--r--fietsboek/templates/edit.jinja22
-rw-r--r--fietsboek/templates/edit_form.jinja29
-rw-r--r--fietsboek/templates/finish_upload.jinja22
-rw-r--r--fietsboek/views/browse.py3
-rw-r--r--fietsboek/views/default.py3
-rw-r--r--fietsboek/views/detail.py1
-rw-r--r--fietsboek/views/edit.py3
-rw-r--r--fietsboek/views/upload.py4
22 files changed, 549 insertions, 193 deletions
diff --git a/fietsboek/alembic/versions/20220808_d085998b49ca.py b/fietsboek/alembic/versions/20220808_d085998b49ca.py
new file mode 100644
index 0000000..56dbbf7
--- /dev/null
+++ b/fietsboek/alembic/versions/20220808_d085998b49ca.py
@@ -0,0 +1,23 @@
+"""Add track.type column.
+
+Revision ID: d085998b49ca
+Revises: 091ce24409fe
+Create Date: 2022-08-08 14:11:40.746008
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = 'd085998b49ca'
+down_revision = '091ce24409fe'
+branch_labels = None
+depends_on = None
+
+def upgrade():
+ op.add_column('tracks', sa.Column('type', sa.Enum('ORGANIC', 'SYNTHETIC', name='tracktype'), nullable=True))
+ op.execute("UPDATE tracks SET type='ORGANIC';")
+
+def downgrade():
+ op.drop_column('tracks', 'type')
diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.mo b/fietsboek/locale/de/LC_MESSAGES/messages.mo
index 97ee495..7efce7f 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 9c93bb4..f4a7f03 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: 2022-08-02 11:57+0200\n"
+"POT-Creation-Date: 2022-08-10 13:36+0200\n"
"PO-Revision-Date: 2022-07-02 17:35+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@@ -26,31 +26,31 @@ msgstr "Passwörter stimmen nicht überein"
msgid "password_constraint.length"
msgstr "Passwort zu kurz"
-#: fietsboek/models/track.py:498
+#: fietsboek/models/track.py:526
msgid "tooltip.table.length"
msgstr "Länge"
-#: fietsboek/models/track.py:499
+#: fietsboek/models/track.py:527
msgid "tooltip.table.uphill"
msgstr "Bergauf"
-#: fietsboek/models/track.py:500
+#: fietsboek/models/track.py:528
msgid "tooltip.table.downhill"
msgstr "Bergab"
-#: fietsboek/models/track.py:501
+#: fietsboek/models/track.py:529
msgid "tooltip.table.moving_time"
msgstr "Fahrzeit"
-#: fietsboek/models/track.py:502
+#: fietsboek/models/track.py:530
msgid "tooltip.table.stopped_time"
msgstr "Haltezeit"
-#: fietsboek/models/track.py:503
+#: fietsboek/models/track.py:531
msgid "tooltip.table.max_speed"
msgstr "Maximalgeschwindigkeit"
-#: fietsboek/models/track.py:505
+#: fietsboek/models/track.py:533
msgid "tooltip.table.avg_speed"
msgstr "Durchschnittsgeschwindigkeit"
@@ -114,80 +114,95 @@ msgstr "Maximale Länge"
msgid "page.browse.filter.date_boundaries"
msgstr "Datumsgrenzen"
-#: fietsboek/templates/browse.jinja2:77
+#: fietsboek/templates/browse.jinja2:73
+msgid "page.browse.filter.type.organic"
+msgstr "Aufnahme (natürlich)"
+
+#: fietsboek/templates/browse.jinja2:74
+msgid "page.browse.filter.type.synthetic"
+msgstr "Vorlage (synthetisch)"
+
+#: fietsboek/templates/browse.jinja2:86
msgid "page.browse.filter.my_tracks.only"
msgstr "Zeige nur eigene Strecken"
-#: fietsboek/templates/browse.jinja2:78
+#: fietsboek/templates/browse.jinja2:87
msgid "page.browse.filter.friends_tracks_only"
msgstr "Zeige nur Strecken von Freunden"
-#: fietsboek/templates/browse.jinja2:79
+#: fietsboek/templates/browse.jinja2:88
msgid "page.browse.filter.me_tagged_only"
msgstr "Zeige nur Strecken, in denen ich markiert bin"
-#: fietsboek/templates/browse.jinja2:88
+#: fietsboek/templates/browse.jinja2:98
msgid "page.browse.filters.apply"
msgstr "Filter anwenden"
-#: fietsboek/templates/browse.jinja2:92
+#: fietsboek/templates/browse.jinja2:102
msgid "page.browse.filters.clear_all"
msgstr "Filter zurücksetzen"
-#: fietsboek/templates/browse.jinja2:95
+#: fietsboek/templates/browse.jinja2:105
msgid "page.browse.filters.expand_advanced"
msgstr "Erweitert"
-#: fietsboek/templates/browse.jinja2:115 fietsboek/templates/details.jinja2:86
+#: fietsboek/templates/browse.jinja2:122
+msgid "page.browse.organic_tooltip"
+msgstr "Dies ist eine Aufnahme einer Strecke"
+
+#: fietsboek/templates/browse.jinja2:124
+msgid "page.browse.synthetic_tooltip"
+msgstr "Dies ist eine geplante Strecke"
+
+#: fietsboek/templates/browse.jinja2:132 fietsboek/templates/details.jinja2:88
msgid "page.details.date"
msgstr "Datum"
-#: fietsboek/templates/browse.jinja2:117 fietsboek/templates/details.jinja2:98
+#: fietsboek/templates/browse.jinja2:134 fietsboek/templates/details.jinja2:102
msgid "page.details.length"
msgstr "Länge"
-#: fietsboek/templates/browse.jinja2:121 fietsboek/templates/details.jinja2:90
+#: fietsboek/templates/browse.jinja2:139 fietsboek/templates/details.jinja2:93
msgid "page.details.start_time"
msgstr "Startzeit"
-#: fietsboek/templates/browse.jinja2:123 fietsboek/templates/details.jinja2:94
+#: fietsboek/templates/browse.jinja2:141 fietsboek/templates/details.jinja2:97
msgid "page.details.end_time"
msgstr "Endzeit"
-#: fietsboek/templates/browse.jinja2:127 fietsboek/templates/details.jinja2:102
+#: fietsboek/templates/browse.jinja2:146 fietsboek/templates/details.jinja2:106
msgid "page.details.uphill"
msgstr "Bergauf"
-#: fietsboek/templates/browse.jinja2:129 fietsboek/templates/details.jinja2:106
+#: fietsboek/templates/browse.jinja2:148 fietsboek/templates/details.jinja2:110
msgid "page.details.downhill"
msgstr "Bergab"
-#: fietsboek/templates/browse.jinja2:133 fietsboek/templates/details.jinja2:110
+#: fietsboek/templates/browse.jinja2:153 fietsboek/templates/details.jinja2:115
msgid "page.details.moving_time"
msgstr "Fahrzeit"
-#: fietsboek/templates/browse.jinja2:135 fietsboek/templates/details.jinja2:114
+#: fietsboek/templates/browse.jinja2:155 fietsboek/templates/details.jinja2:119
msgid "page.details.stopped_time"
msgstr "Haltezeit"
-#: fietsboek/templates/browse.jinja2:139 fietsboek/templates/details.jinja2:118
+#: fietsboek/templates/browse.jinja2:159 fietsboek/templates/details.jinja2:123
msgid "page.details.max_speed"
msgstr "maximale Geschwindigkeit"
-#: fietsboek/templates/browse.jinja2:141 fietsboek/templates/details.jinja2:122
+#: fietsboek/templates/browse.jinja2:161 fietsboek/templates/details.jinja2:127
msgid "page.details.avg_speed"
msgstr "durchschnittliche Geschwindigkeit"
-#: fietsboek/templates/browse.jinja2:156
+#: fietsboek/templates/browse.jinja2:179
msgid "page.browse.download_multiple"
msgstr "ausgewählte Herunterladen"
-#: fietsboek/templates/browse.jinja2:158
+#: fietsboek/templates/browse.jinja2:181
msgid "page.browse.no_results"
-msgstr ""
-"Es wurden keine Strecken gefunden, die den Filtern entsprechen."
+msgstr "Es wurden keine Strecken gefunden, die den Filtern entsprechen."
-#: fietsboek/templates/browse.jinja2:160
+#: fietsboek/templates/browse.jinja2:183
msgid "page.browse.no_tracks"
msgstr ""
"Es wurden keine Strecken gefunden, auf die Du Zugriff hast. Versuche, "
@@ -281,42 +296,42 @@ msgstr "Löschen"
msgid "page.details.delete.close"
msgstr "Abbrechen"
-#: fietsboek/templates/details.jinja2:67
+#: fietsboek/templates/details.jinja2:69
msgid "page.details.tags"
msgstr "Schlagwörter"
-#: fietsboek/templates/details.jinja2:76 fietsboek/templates/edit.jinja2:10
+#: fietsboek/templates/details.jinja2:78 fietsboek/templates/edit.jinja2:10
#: fietsboek/templates/finish_upload.jinja2:10
msgid "page.noscript"
msgstr ""
"JavaScript ist deaktiviert, zum Nutzen aller Funktionen bitte JavaScript "
"aktivieren"
-#: fietsboek/templates/details.jinja2:81
+#: fietsboek/templates/details.jinja2:83
msgid "page.details.download"
msgstr "Herunterladen"
-#: fietsboek/templates/details.jinja2:166
+#: fietsboek/templates/details.jinja2:172
msgid "page.details.comments"
msgstr "Kommentare"
-#: fietsboek/templates/details.jinja2:170
+#: fietsboek/templates/details.jinja2:176
msgid "page.details.comments.author"
msgstr "Kommentar von {}"
-#: fietsboek/templates/details.jinja2:187
+#: fietsboek/templates/details.jinja2:193
msgid "page.details.comments.new.title"
msgstr "Kommentar erstellen"
-#: fietsboek/templates/details.jinja2:190
+#: fietsboek/templates/details.jinja2:196
msgid "page.details.comments.new.input_title"
msgstr "Titel"
-#: fietsboek/templates/details.jinja2:191
+#: fietsboek/templates/details.jinja2:197
msgid "page.details.comments.new.input_comment"
msgstr "Kommentar"
-#: fietsboek/templates/details.jinja2:194
+#: fietsboek/templates/details.jinja2:200
msgid "page.details.comments.new.submit"
msgstr "Absenden"
@@ -371,43 +386,55 @@ msgstr ""
"'Teilen'-Link die Strecke jederzeit sehen können."
#: fietsboek/templates/edit_form.jinja2:25
+msgid "page.track.form.type"
+msgstr "Streckenart"
+
+#: fietsboek/templates/edit_form.jinja2:27
+msgid "page.track.form.type.organic"
+msgstr "Aufnahme (natürlich)"
+
+#: fietsboek/templates/edit_form.jinja2:28
+msgid "page.track.form.type.synthetic"
+msgstr "Vorlage (synthetisch)"
+
+#: fietsboek/templates/edit_form.jinja2:32
msgid "page.track.form.tags"
msgstr "Schlagwörter"
-#: fietsboek/templates/edit_form.jinja2:36
+#: fietsboek/templates/edit_form.jinja2:43
msgid "page.track.form.add_tag"
msgstr "Schlagwort hinzufügen"
-#: fietsboek/templates/edit_form.jinja2:41
+#: fietsboek/templates/edit_form.jinja2:48
msgid "page.track.form.tagged_people"
msgstr "Markierte Personen"
-#: fietsboek/templates/edit_form.jinja2:56
+#: fietsboek/templates/edit_form.jinja2:63
msgid "page.track.form.add_friend"
msgstr "Freund suchen"
-#: fietsboek/templates/edit_form.jinja2:76
+#: fietsboek/templates/edit_form.jinja2:83
msgid "page.track.form.badges"
msgstr "Wappen"
-#: fietsboek/templates/edit_form.jinja2:87
+#: fietsboek/templates/edit_form.jinja2:94
msgid "page.track.form.description"
msgstr "Beschreibung"
-#: fietsboek/templates/edit_form.jinja2:94
-#: fietsboek/templates/edit_form.jinja2:108
+#: fietsboek/templates/edit_form.jinja2:101
+#: fietsboek/templates/edit_form.jinja2:115
msgid "page.track.form.remove_image"
msgstr "Bild entfernen"
-#: fietsboek/templates/edit_form.jinja2:103
+#: fietsboek/templates/edit_form.jinja2:110
msgid "page.track.form.select_images"
msgstr "Bilder auswählen"
-#: fietsboek/templates/edit_form.jinja2:119
+#: fietsboek/templates/edit_form.jinja2:126
msgid "page.track.form.image_description_modal"
msgstr "Bildbeschreibung"
-#: fietsboek/templates/edit_form.jinja2:126
+#: fietsboek/templates/edit_form.jinja2:133
msgid "page.track.form.image_description_modal.save"
msgstr "Übernehmen"
@@ -630,35 +657,35 @@ msgstr "Wappen bearbeitet"
msgid "flash.badge_deleted"
msgstr "Wappen gelöscht"
-#: fietsboek/views/default.py:72
+#: fietsboek/views/default.py:75
msgid "flash.invalid_credentials"
msgstr "Ungültige Nutzerdaten"
-#: fietsboek/views/default.py:76
+#: fietsboek/views/default.py:79
msgid "flash.account_not_verified"
msgstr "Konto noch nicht bestätigt"
-#: fietsboek/views/default.py:79
+#: fietsboek/views/default.py:82
msgid "flash.logged_in"
msgstr "Du bist nun angemeldet"
-#: fietsboek/views/default.py:93
+#: fietsboek/views/default.py:96
msgid "flash.logged_out"
msgstr "Du bist nun abgemeldet"
-#: fietsboek/views/default.py:124
+#: fietsboek/views/default.py:127
msgid "flash.reset_invalid_email"
msgstr "Ungültige E-Mail-Adresse angegeben"
-#: fietsboek/views/default.py:129
+#: fietsboek/views/default.py:132
msgid "flash.password_token_generated"
msgstr "Ein Link zum Zurücksetzen des Passworts wurde versandt"
-#: fietsboek/views/default.py:134
+#: fietsboek/views/default.py:137
msgid "page.password_reset.email.subject"
msgstr "Fietsboek Passwortzurücksetzung"
-#: fietsboek/views/default.py:138
+#: fietsboek/views/default.py:141
msgid "page.password_reset.email.body"
msgstr ""
"Du kannst Dein Fietsboek-Passwort hier zurücksetzen: {}\n"
@@ -666,15 +693,15 @@ msgstr ""
"Falls Du keine Passwortzurücksetzung beantragt hast, dann ignoriere diese"
" E-Mail."
-#: fietsboek/views/default.py:165
+#: fietsboek/views/default.py:168
msgid "flash.email_verified"
msgstr "E-Mail-Adresse bestätigt"
-#: fietsboek/views/default.py:179
+#: fietsboek/views/default.py:182
msgid "flash.password_updated"
msgstr "Passwort aktualisiert"
-#: fietsboek/views/detail.py:93
+#: fietsboek/views/detail.py:94
msgid "flash.track_deleted"
msgstr "Strecke gelöscht"
@@ -706,11 +733,11 @@ msgstr "Keine Datei ausgewählt"
msgid "flash.invalid_file"
msgstr "Ungültige GPX-Datei gesendet"
-#: fietsboek/views/upload.py:177
+#: fietsboek/views/upload.py:179
msgid "flash.upload_success"
msgstr "Hochladen erfolgreich"
-#: fietsboek/views/upload.py:193
+#: fietsboek/views/upload.py:195
msgid "flash.upload_cancelled"
msgstr "Hochladen abgebrochen"
diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.mo b/fietsboek/locale/en/LC_MESSAGES/messages.mo
index 8887d3d..ee23eef 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 2ac9f98..71c8b17 100644
--- a/fietsboek/locale/en/LC_MESSAGES/messages.po
+++ b/fietsboek/locale/en/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: 2022-08-02 11:57+0200\n"
+"POT-Creation-Date: 2022-08-10 13:36+0200\n"
"PO-Revision-Date: 2022-06-28 13:11+0200\n"
"Last-Translator: \n"
"Language: en\n"
@@ -26,31 +26,31 @@ msgstr "Passwords don't match"
msgid "password_constraint.length"
msgstr "Password not long enough"
-#: fietsboek/models/track.py:498
+#: fietsboek/models/track.py:526
msgid "tooltip.table.length"
msgstr "Length"
-#: fietsboek/models/track.py:499
+#: fietsboek/models/track.py:527
msgid "tooltip.table.uphill"
msgstr "Uphill"
-#: fietsboek/models/track.py:500
+#: fietsboek/models/track.py:528
msgid "tooltip.table.downhill"
msgstr "Downhill"
-#: fietsboek/models/track.py:501
+#: fietsboek/models/track.py:529
msgid "tooltip.table.moving_time"
msgstr "Moving Time"
-#: fietsboek/models/track.py:502
+#: fietsboek/models/track.py:530
msgid "tooltip.table.stopped_time"
msgstr "Stopped Time"
-#: fietsboek/models/track.py:503
+#: fietsboek/models/track.py:531
msgid "tooltip.table.max_speed"
msgstr "Max Speed"
-#: fietsboek/models/track.py:505
+#: fietsboek/models/track.py:533
msgid "tooltip.table.avg_speed"
msgstr "Average Speed"
@@ -114,79 +114,95 @@ msgstr "Maximum length"
msgid "page.browse.filter.date_boundaries"
msgstr "Date limits"
-#: fietsboek/templates/browse.jinja2:77
+#: fietsboek/templates/browse.jinja2:73
+msgid "page.browse.filter.type.organic"
+msgstr "Recording (organic)"
+
+#: fietsboek/templates/browse.jinja2:74
+msgid "page.browse.filter.type.synthetic"
+msgstr "Template (synthetic)"
+
+#: fietsboek/templates/browse.jinja2:86
msgid "page.browse.filter.my_tracks.only"
msgstr "Show only my own tracks"
-#: fietsboek/templates/browse.jinja2:78
+#: fietsboek/templates/browse.jinja2:87
msgid "page.browse.filter.friends_tracks_only"
msgstr "Show only tracks of my friends"
-#: fietsboek/templates/browse.jinja2:79
+#: fietsboek/templates/browse.jinja2:88
msgid "page.browse.filter.me_tagged_only"
msgstr "Show only tracks in which I'm tagged"
-#: fietsboek/templates/browse.jinja2:88
+#: fietsboek/templates/browse.jinja2:98
msgid "page.browse.filters.apply"
msgstr "Apply filters"
-#: fietsboek/templates/browse.jinja2:92
+#: fietsboek/templates/browse.jinja2:102
msgid "page.browse.filters.clear_all"
msgstr "Remove filters"
-#: fietsboek/templates/browse.jinja2:95
+#: fietsboek/templates/browse.jinja2:105
msgid "page.browse.filters.expand_advanced"
msgstr "Advanced"
-#: fietsboek/templates/browse.jinja2:115 fietsboek/templates/details.jinja2:86
+#: fietsboek/templates/browse.jinja2:122
+msgid "page.browse.organic_tooltip"
+msgstr "This is a recording of a track"
+
+#: fietsboek/templates/browse.jinja2:124
+msgid "page.browse.synthetic_tooltip"
+msgstr "This is a pre-planned track"
+
+#: fietsboek/templates/browse.jinja2:132 fietsboek/templates/details.jinja2:88
msgid "page.details.date"
msgstr "Date"
-#: fietsboek/templates/browse.jinja2:117 fietsboek/templates/details.jinja2:98
+#: fietsboek/templates/browse.jinja2:134 fietsboek/templates/details.jinja2:102
msgid "page.details.length"
msgstr "Length"
-#: fietsboek/templates/browse.jinja2:121 fietsboek/templates/details.jinja2:90
+#: fietsboek/templates/browse.jinja2:139 fietsboek/templates/details.jinja2:93
msgid "page.details.start_time"
msgstr "Record Start"
-#: fietsboek/templates/browse.jinja2:123 fietsboek/templates/details.jinja2:94
+#: fietsboek/templates/browse.jinja2:141 fietsboek/templates/details.jinja2:97
msgid "page.details.end_time"
msgstr "Record End"
-#: fietsboek/templates/browse.jinja2:127 fietsboek/templates/details.jinja2:102
+#: fietsboek/templates/browse.jinja2:146 fietsboek/templates/details.jinja2:106
msgid "page.details.uphill"
msgstr "Uphill"
-#: fietsboek/templates/browse.jinja2:129 fietsboek/templates/details.jinja2:106
+#: fietsboek/templates/browse.jinja2:148 fietsboek/templates/details.jinja2:110
msgid "page.details.downhill"
msgstr "Downhill"
-#: fietsboek/templates/browse.jinja2:133 fietsboek/templates/details.jinja2:110
+#: fietsboek/templates/browse.jinja2:153 fietsboek/templates/details.jinja2:115
msgid "page.details.moving_time"
msgstr "Moving Time"
-#: fietsboek/templates/browse.jinja2:135 fietsboek/templates/details.jinja2:114
+#: fietsboek/templates/browse.jinja2:155 fietsboek/templates/details.jinja2:119
msgid "page.details.stopped_time"
msgstr "Stopped Time"
-#: fietsboek/templates/browse.jinja2:139 fietsboek/templates/details.jinja2:118
+#: fietsboek/templates/browse.jinja2:159 fietsboek/templates/details.jinja2:123
msgid "page.details.max_speed"
msgstr "Max Speed"
-#: fietsboek/templates/browse.jinja2:141 fietsboek/templates/details.jinja2:122
+#: fietsboek/templates/browse.jinja2:161 fietsboek/templates/details.jinja2:127
msgid "page.details.avg_speed"
msgstr "Average Speed"
-#: fietsboek/templates/browse.jinja2:156
+#: fietsboek/templates/browse.jinja2:179
msgid "page.browse.download_multiple"
msgstr "Download selected"
-#: fietsboek/templates/browse.jinja2:158
+#: fietsboek/templates/browse.jinja2:181
msgid "page.browse.no_results"
msgstr "No results matching the filters were found."
-#: fietsboek/templates/browse.jinja2:160
+#: fietsboek/templates/browse.jinja2:183
msgid "page.browse.no_tracks"
msgstr "You currently do not have access to any tracks. Try logging in."
@@ -278,40 +294,40 @@ msgstr "Delete"
msgid "page.details.delete.close"
msgstr "Abort"
-#: fietsboek/templates/details.jinja2:67
+#: fietsboek/templates/details.jinja2:69
msgid "page.details.tags"
msgstr "Tagged as"
-#: fietsboek/templates/details.jinja2:76 fietsboek/templates/edit.jinja2:10
+#: fietsboek/templates/details.jinja2:78 fietsboek/templates/edit.jinja2:10
#: fietsboek/templates/finish_upload.jinja2:10
msgid "page.noscript"
msgstr "JavaScript is disabled, please enable JavaScript"
-#: fietsboek/templates/details.jinja2:81
+#: fietsboek/templates/details.jinja2:83
msgid "page.details.download"
msgstr "Download Tour"
-#: fietsboek/templates/details.jinja2:166
+#: fietsboek/templates/details.jinja2:172
msgid "page.details.comments"
msgstr "Comments"
-#: fietsboek/templates/details.jinja2:170
+#: fietsboek/templates/details.jinja2:176
msgid "page.details.comments.author"
msgstr "Comment by {}"
-#: fietsboek/templates/details.jinja2:187
+#: fietsboek/templates/details.jinja2:193
msgid "page.details.comments.new.title"
msgstr "Create a new comment"
-#: fietsboek/templates/details.jinja2:190
+#: fietsboek/templates/details.jinja2:196
msgid "page.details.comments.new.input_title"
msgstr "Title"
-#: fietsboek/templates/details.jinja2:191
+#: fietsboek/templates/details.jinja2:197
msgid "page.details.comments.new.input_comment"
msgstr "Comment"
-#: fietsboek/templates/details.jinja2:194
+#: fietsboek/templates/details.jinja2:200
msgid "page.details.comments.new.submit"
msgstr "Submit"
@@ -366,43 +382,55 @@ msgstr ""
"the track."
#: fietsboek/templates/edit_form.jinja2:25
+msgid "page.track.form.type"
+msgstr "Track type"
+
+#: fietsboek/templates/edit_form.jinja2:27
+msgid "page.track.form.type.organic"
+msgstr "Recording (organic)"
+
+#: fietsboek/templates/edit_form.jinja2:28
+msgid "page.track.form.type.synthetic"
+msgstr "Template (synthetic)"
+
+#: fietsboek/templates/edit_form.jinja2:32
msgid "page.track.form.tags"
msgstr "Tags"
-#: fietsboek/templates/edit_form.jinja2:36
+#: fietsboek/templates/edit_form.jinja2:43
msgid "page.track.form.add_tag"
msgstr "Add Tag"
-#: fietsboek/templates/edit_form.jinja2:41
+#: fietsboek/templates/edit_form.jinja2:48
msgid "page.track.form.tagged_people"
msgstr "Tagged People"
-#: fietsboek/templates/edit_form.jinja2:56
+#: fietsboek/templates/edit_form.jinja2:63
msgid "page.track.form.add_friend"
msgstr "Search friends"
-#: fietsboek/templates/edit_form.jinja2:76
+#: fietsboek/templates/edit_form.jinja2:83
msgid "page.track.form.badges"
msgstr "Badges"
-#: fietsboek/templates/edit_form.jinja2:87
+#: fietsboek/templates/edit_form.jinja2:94
msgid "page.track.form.description"
msgstr "Description"
-#: fietsboek/templates/edit_form.jinja2:94
-#: fietsboek/templates/edit_form.jinja2:108
+#: fietsboek/templates/edit_form.jinja2:101
+#: fietsboek/templates/edit_form.jinja2:115
msgid "page.track.form.remove_image"
msgstr "Remove image"
-#: fietsboek/templates/edit_form.jinja2:103
+#: fietsboek/templates/edit_form.jinja2:110
msgid "page.track.form.select_images"
msgstr "Select images"
-#: fietsboek/templates/edit_form.jinja2:119
+#: fietsboek/templates/edit_form.jinja2:126
msgid "page.track.form.image_description_modal"
msgstr "Image description"
-#: fietsboek/templates/edit_form.jinja2:126
+#: fietsboek/templates/edit_form.jinja2:133
msgid "page.track.form.image_description_modal.save"
msgstr "Apply"
@@ -625,50 +653,50 @@ msgstr "Badge has been modified"
msgid "flash.badge_deleted"
msgstr "Badge has been deleted"
-#: fietsboek/views/default.py:72
+#: fietsboek/views/default.py:75
msgid "flash.invalid_credentials"
msgstr "Invalid login credentials"
-#: fietsboek/views/default.py:76
+#: fietsboek/views/default.py:79
msgid "flash.account_not_verified"
msgstr "Your account is not verified yet"
-#: fietsboek/views/default.py:79
+#: fietsboek/views/default.py:82
msgid "flash.logged_in"
msgstr "You are now logged in"
-#: fietsboek/views/default.py:93
+#: fietsboek/views/default.py:96
msgid "flash.logged_out"
msgstr "You have been logged out"
-#: fietsboek/views/default.py:124
+#: fietsboek/views/default.py:127
msgid "flash.reset_invalid_email"
msgstr "Invalid email address provided"
-#: fietsboek/views/default.py:129
+#: fietsboek/views/default.py:132
msgid "flash.password_token_generated"
msgstr "A password reset email has been sent"
-#: fietsboek/views/default.py:134
+#: fietsboek/views/default.py:137
msgid "page.password_reset.email.subject"
msgstr "Fietsboek Password Reset"
-#: fietsboek/views/default.py:138
+#: fietsboek/views/default.py:141
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:165
+#: fietsboek/views/default.py:168
msgid "flash.email_verified"
msgstr "Your email address has been verified"
-#: fietsboek/views/default.py:179
+#: fietsboek/views/default.py:182
msgid "flash.password_updated"
msgstr "Password has been updated"
-#: fietsboek/views/detail.py:93
+#: fietsboek/views/detail.py:94
msgid "flash.track_deleted"
msgstr "Track has been deleted"
@@ -700,11 +728,11 @@ msgstr "No file selected"
msgid "flash.invalid_file"
msgstr "Invalid GPX file selected"
-#: fietsboek/views/upload.py:177
+#: fietsboek/views/upload.py:179
msgid "flash.upload_success"
msgstr "Upload successful"
-#: fietsboek/views/upload.py:193
+#: fietsboek/views/upload.py:195
msgid "flash.upload_cancelled"
msgstr "Upload cancelled"
diff --git a/fietsboek/locale/fietslog.pot b/fietsboek/locale/fietslog.pot
index 2c25251..91390c8 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: 2022-08-02 11:57+0200\n"
+"POT-Creation-Date: 2022-08-10 13:36+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"
@@ -25,31 +25,31 @@ msgstr ""
msgid "password_constraint.length"
msgstr ""
-#: fietsboek/models/track.py:498
+#: fietsboek/models/track.py:526
msgid "tooltip.table.length"
msgstr ""
-#: fietsboek/models/track.py:499
+#: fietsboek/models/track.py:527
msgid "tooltip.table.uphill"
msgstr ""
-#: fietsboek/models/track.py:500
+#: fietsboek/models/track.py:528
msgid "tooltip.table.downhill"
msgstr ""
-#: fietsboek/models/track.py:501
+#: fietsboek/models/track.py:529
msgid "tooltip.table.moving_time"
msgstr ""
-#: fietsboek/models/track.py:502
+#: fietsboek/models/track.py:530
msgid "tooltip.table.stopped_time"
msgstr ""
-#: fietsboek/models/track.py:503
+#: fietsboek/models/track.py:531
msgid "tooltip.table.max_speed"
msgstr ""
-#: fietsboek/models/track.py:505
+#: fietsboek/models/track.py:533
msgid "tooltip.table.avg_speed"
msgstr ""
@@ -113,79 +113,95 @@ msgstr ""
msgid "page.browse.filter.date_boundaries"
msgstr ""
-#: fietsboek/templates/browse.jinja2:77
+#: fietsboek/templates/browse.jinja2:73
+msgid "page.browse.filter.type.organic"
+msgstr ""
+
+#: fietsboek/templates/browse.jinja2:74
+msgid "page.browse.filter.type.synthetic"
+msgstr ""
+
+#: fietsboek/templates/browse.jinja2:86
msgid "page.browse.filter.my_tracks.only"
msgstr ""
-#: fietsboek/templates/browse.jinja2:78
+#: fietsboek/templates/browse.jinja2:87
msgid "page.browse.filter.friends_tracks_only"
msgstr ""
-#: fietsboek/templates/browse.jinja2:79
+#: fietsboek/templates/browse.jinja2:88
msgid "page.browse.filter.me_tagged_only"
msgstr ""
-#: fietsboek/templates/browse.jinja2:88
+#: fietsboek/templates/browse.jinja2:98
msgid "page.browse.filters.apply"
msgstr ""
-#: fietsboek/templates/browse.jinja2:92
+#: fietsboek/templates/browse.jinja2:102
msgid "page.browse.filters.clear_all"
msgstr ""
-#: fietsboek/templates/browse.jinja2:95
+#: fietsboek/templates/browse.jinja2:105
msgid "page.browse.filters.expand_advanced"
msgstr ""
-#: fietsboek/templates/browse.jinja2:115 fietsboek/templates/details.jinja2:86
+#: fietsboek/templates/browse.jinja2:122
+msgid "page.browse.organic_tooltip"
+msgstr ""
+
+#: fietsboek/templates/browse.jinja2:124
+msgid "page.browse.synthetic_tooltip"
+msgstr ""
+
+#: fietsboek/templates/browse.jinja2:132 fietsboek/templates/details.jinja2:88
msgid "page.details.date"
msgstr ""
-#: fietsboek/templates/browse.jinja2:117 fietsboek/templates/details.jinja2:98
+#: fietsboek/templates/browse.jinja2:134 fietsboek/templates/details.jinja2:102
msgid "page.details.length"
msgstr ""
-#: fietsboek/templates/browse.jinja2:121 fietsboek/templates/details.jinja2:90
+#: fietsboek/templates/browse.jinja2:139 fietsboek/templates/details.jinja2:93
msgid "page.details.start_time"
msgstr ""
-#: fietsboek/templates/browse.jinja2:123 fietsboek/templates/details.jinja2:94
+#: fietsboek/templates/browse.jinja2:141 fietsboek/templates/details.jinja2:97
msgid "page.details.end_time"
msgstr ""
-#: fietsboek/templates/browse.jinja2:127 fietsboek/templates/details.jinja2:102
+#: fietsboek/templates/browse.jinja2:146 fietsboek/templates/details.jinja2:106
msgid "page.details.uphill"
msgstr ""
-#: fietsboek/templates/browse.jinja2:129 fietsboek/templates/details.jinja2:106
+#: fietsboek/templates/browse.jinja2:148 fietsboek/templates/details.jinja2:110
msgid "page.details.downhill"
msgstr ""
-#: fietsboek/templates/browse.jinja2:133 fietsboek/templates/details.jinja2:110
+#: fietsboek/templates/browse.jinja2:153 fietsboek/templates/details.jinja2:115
msgid "page.details.moving_time"
msgstr ""
-#: fietsboek/templates/browse.jinja2:135 fietsboek/templates/details.jinja2:114
+#: fietsboek/templates/browse.jinja2:155 fietsboek/templates/details.jinja2:119
msgid "page.details.stopped_time"
msgstr ""
-#: fietsboek/templates/browse.jinja2:139 fietsboek/templates/details.jinja2:118
+#: fietsboek/templates/browse.jinja2:159 fietsboek/templates/details.jinja2:123
msgid "page.details.max_speed"
msgstr ""
-#: fietsboek/templates/browse.jinja2:141 fietsboek/templates/details.jinja2:122
+#: fietsboek/templates/browse.jinja2:161 fietsboek/templates/details.jinja2:127
msgid "page.details.avg_speed"
msgstr ""
-#: fietsboek/templates/browse.jinja2:156
+#: fietsboek/templates/browse.jinja2:179
msgid "page.browse.download_multiple"
msgstr ""
-#: fietsboek/templates/browse.jinja2:158
+#: fietsboek/templates/browse.jinja2:181
msgid "page.browse.no_results"
msgstr ""
-#: fietsboek/templates/browse.jinja2:160
+#: fietsboek/templates/browse.jinja2:183
msgid "page.browse.no_tracks"
msgstr ""
@@ -277,40 +293,40 @@ msgstr ""
msgid "page.details.delete.close"
msgstr ""
-#: fietsboek/templates/details.jinja2:67
+#: fietsboek/templates/details.jinja2:69
msgid "page.details.tags"
msgstr ""
-#: fietsboek/templates/details.jinja2:76 fietsboek/templates/edit.jinja2:10
+#: fietsboek/templates/details.jinja2:78 fietsboek/templates/edit.jinja2:10
#: fietsboek/templates/finish_upload.jinja2:10
msgid "page.noscript"
msgstr ""
-#: fietsboek/templates/details.jinja2:81
+#: fietsboek/templates/details.jinja2:83
msgid "page.details.download"
msgstr ""
-#: fietsboek/templates/details.jinja2:166
+#: fietsboek/templates/details.jinja2:172
msgid "page.details.comments"
msgstr ""
-#: fietsboek/templates/details.jinja2:170
+#: fietsboek/templates/details.jinja2:176
msgid "page.details.comments.author"
msgstr ""
-#: fietsboek/templates/details.jinja2:187
+#: fietsboek/templates/details.jinja2:193
msgid "page.details.comments.new.title"
msgstr ""
-#: fietsboek/templates/details.jinja2:190
+#: fietsboek/templates/details.jinja2:196
msgid "page.details.comments.new.input_title"
msgstr ""
-#: fietsboek/templates/details.jinja2:191
+#: fietsboek/templates/details.jinja2:197
msgid "page.details.comments.new.input_comment"
msgstr ""
-#: fietsboek/templates/details.jinja2:194
+#: fietsboek/templates/details.jinja2:200
msgid "page.details.comments.new.submit"
msgstr ""
@@ -363,43 +379,55 @@ msgid "page.track.form.visibility.info"
msgstr ""
#: fietsboek/templates/edit_form.jinja2:25
+msgid "page.track.form.type"
+msgstr ""
+
+#: fietsboek/templates/edit_form.jinja2:27
+msgid "page.track.form.type.organic"
+msgstr ""
+
+#: fietsboek/templates/edit_form.jinja2:28
+msgid "page.track.form.type.synthetic"
+msgstr ""
+
+#: fietsboek/templates/edit_form.jinja2:32
msgid "page.track.form.tags"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:36
+#: fietsboek/templates/edit_form.jinja2:43
msgid "page.track.form.add_tag"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:41
+#: fietsboek/templates/edit_form.jinja2:48
msgid "page.track.form.tagged_people"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:56
+#: fietsboek/templates/edit_form.jinja2:63
msgid "page.track.form.add_friend"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:76
+#: fietsboek/templates/edit_form.jinja2:83
msgid "page.track.form.badges"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:87
+#: fietsboek/templates/edit_form.jinja2:94
msgid "page.track.form.description"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:94
-#: fietsboek/templates/edit_form.jinja2:108
+#: fietsboek/templates/edit_form.jinja2:101
+#: fietsboek/templates/edit_form.jinja2:115
msgid "page.track.form.remove_image"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:103
+#: fietsboek/templates/edit_form.jinja2:110
msgid "page.track.form.select_images"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:119
+#: fietsboek/templates/edit_form.jinja2:126
msgid "page.track.form.image_description_modal"
msgstr ""
-#: fietsboek/templates/edit_form.jinja2:126
+#: fietsboek/templates/edit_form.jinja2:133
msgid "page.track.form.image_description_modal.save"
msgstr ""
@@ -617,47 +645,47 @@ msgstr ""
msgid "flash.badge_deleted"
msgstr ""
-#: fietsboek/views/default.py:72
+#: fietsboek/views/default.py:75
msgid "flash.invalid_credentials"
msgstr ""
-#: fietsboek/views/default.py:76
+#: fietsboek/views/default.py:79
msgid "flash.account_not_verified"
msgstr ""
-#: fietsboek/views/default.py:79
+#: fietsboek/views/default.py:82
msgid "flash.logged_in"
msgstr ""
-#: fietsboek/views/default.py:93
+#: fietsboek/views/default.py:96
msgid "flash.logged_out"
msgstr ""
-#: fietsboek/views/default.py:124
+#: fietsboek/views/default.py:127
msgid "flash.reset_invalid_email"
msgstr ""
-#: fietsboek/views/default.py:129
+#: fietsboek/views/default.py:132
msgid "flash.password_token_generated"
msgstr ""
-#: fietsboek/views/default.py:134
+#: fietsboek/views/default.py:137
msgid "page.password_reset.email.subject"
msgstr ""
-#: fietsboek/views/default.py:138
+#: fietsboek/views/default.py:141
msgid "page.password_reset.email.body"
msgstr ""
-#: fietsboek/views/default.py:165
+#: fietsboek/views/default.py:168
msgid "flash.email_verified"
msgstr ""
-#: fietsboek/views/default.py:179
+#: fietsboek/views/default.py:182
msgid "flash.password_updated"
msgstr ""
-#: fietsboek/views/detail.py:93
+#: fietsboek/views/detail.py:94
msgid "flash.track_deleted"
msgstr ""
@@ -689,11 +717,11 @@ msgstr ""
msgid "flash.invalid_file"
msgstr ""
-#: fietsboek/views/upload.py:177
+#: fietsboek/views/upload.py:179
msgid "flash.upload_success"
msgstr ""
-#: fietsboek/views/upload.py:193
+#: fietsboek/views/upload.py:195
msgid "flash.upload_cancelled"
msgstr ""
diff --git a/fietsboek/models/track.py b/fietsboek/models/track.py
index 83c725f..ce7b4d0 100644
--- a/fietsboek/models/track.py
+++ b/fietsboek/models/track.py
@@ -84,6 +84,19 @@ class Visibility(enum.Enum):
"""Anyone can see the track."""
+class TrackType(enum.Enum):
+ """An enum that represents the type of a track."""
+
+ ORGANIC = enum.auto()
+ """An organic track that represents a recording of a user."""
+
+ SYNTHETIC = enum.auto()
+ """A planned track that represents a route, but not an actual recording.
+
+ This is also called a "template".
+ """
+
+
track_people_assoc = Table(
"track_people_assoc",
Base.metadata,
@@ -150,6 +163,8 @@ class Track(Base):
:vartype tags: list[Tag]
:ivar link_secret: The secret string for the share link.
:vartype link_secret: str
+ :ivar type: Type of the track
+ :vartype type: TrackType
:ivar owner: Owner of the track.
:vartype owner: fietsboek.models.user.User
:ivar cache: Cache for the computed track metadata.
@@ -173,6 +188,7 @@ class Track(Base):
gpx = Column(LargeBinary)
visibility = Column(Enum(Visibility))
link_secret = Column(Text)
+ type = Column(Enum(TrackType))
owner = relationship('User', back_populates='tracks')
cache = relationship('TrackCache', back_populates='track', uselist=False,
@@ -285,6 +301,18 @@ class Track(Base):
self.date_tz = value.tzinfo.utcoffset(value).total_seconds() // 60
self.date_raw = value.replace(tzinfo=None)
+ def show_organic_data(self):
+ """Determines whether the organic data should be shown.
+
+ This includes average speed, maximum speed, record start time and record end time.
+
+ For synthetic tracks, we only show the length, uphill and downhill values.
+
+ :return: Whether the organic data should be shown.
+ :rtype: bool
+ """
+ return self.type == TrackType.ORGANIC
+
def is_visible_to(self, user):
"""Checks whether the track is visible to the given user.
diff --git a/fietsboek/static/bootstrap-icons.css b/fietsboek/static/bootstrap-icons.css
index 4fb8787..7f0bd54 100644
--- a/fietsboek/static/bootstrap-icons.css
+++ b/fietsboek/static/bootstrap-icons.css
@@ -1,14 +1,14 @@
@font-face {
+ font-display: block;
font-family: "bootstrap-icons";
- src: url("./fonts/bootstrap-icons.woff2?08efbba7c53d8c5413793eecb19b20bb") format("woff2"),
-url("./fonts/bootstrap-icons.woff?08efbba7c53d8c5413793eecb19b20bb") format("woff");
+ src: url("./fonts/bootstrap-icons.woff2?8d200481aa7f02a2d63a331fc782cfaf") format("woff2"),
+url("./fonts/bootstrap-icons.woff?8d200481aa7f02a2d63a331fc782cfaf") format("woff");
}
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
display: inline-block;
- font-display: block;
font-family: bootstrap-icons !important;
font-style: normal;
font-weight: normal !important;
@@ -1703,3 +1703,174 @@ url("./fonts/bootstrap-icons.woff?08efbba7c53d8c5413793eecb19b20bb") format("wof
.bi-filetype-json::before { content: "\f791"; }
.bi-filetype-pptx::before { content: "\f792"; }
.bi-filetype-xlsx::before { content: "\f793"; }
+.bi-1-circle-1::before { content: "\f794"; }
+.bi-1-circle-fill-1::before { content: "\f795"; }
+.bi-1-circle-fill::before { content: "\f796"; }
+.bi-1-circle::before { content: "\f797"; }
+.bi-1-square-fill::before { content: "\f798"; }
+.bi-1-square::before { content: "\f799"; }
+.bi-2-circle-1::before { content: "\f79a"; }
+.bi-2-circle-fill-1::before { content: "\f79b"; }
+.bi-2-circle-fill::before { content: "\f79c"; }
+.bi-2-circle::before { content: "\f79d"; }
+.bi-2-square-fill::before { content: "\f79e"; }
+.bi-2-square::before { content: "\f79f"; }
+.bi-3-circle-1::before { content: "\f7a0"; }
+.bi-3-circle-fill-1::before { content: "\f7a1"; }
+.bi-3-circle-fill::before { content: "\f7a2"; }
+.bi-3-circle::before { content: "\f7a3"; }
+.bi-3-square-fill::before { content: "\f7a4"; }
+.bi-3-square::before { content: "\f7a5"; }
+.bi-4-circle-1::before { content: "\f7a6"; }
+.bi-4-circle-fill-1::before { content: "\f7a7"; }
+.bi-4-circle-fill::before { content: "\f7a8"; }
+.bi-4-circle::before { content: "\f7a9"; }
+.bi-4-square-fill::before { content: "\f7aa"; }
+.bi-4-square::before { content: "\f7ab"; }
+.bi-5-circle-1::before { content: "\f7ac"; }
+.bi-5-circle-fill-1::before { content: "\f7ad"; }
+.bi-5-circle-fill::before { content: "\f7ae"; }
+.bi-5-circle::before { content: "\f7af"; }
+.bi-5-square-fill::before { content: "\f7b0"; }
+.bi-5-square::before { content: "\f7b1"; }
+.bi-6-circle-1::before { content: "\f7b2"; }
+.bi-6-circle-fill-1::before { content: "\f7b3"; }
+.bi-6-circle-fill::before { content: "\f7b4"; }
+.bi-6-circle::before { content: "\f7b5"; }
+.bi-6-square-fill::before { content: "\f7b6"; }
+.bi-6-square::before { content: "\f7b7"; }
+.bi-7-circle-1::before { content: "\f7b8"; }
+.bi-7-circle-fill-1::before { content: "\f7b9"; }
+.bi-7-circle-fill::before { content: "\f7ba"; }
+.bi-7-circle::before { content: "\f7bb"; }
+.bi-7-square-fill::before { content: "\f7bc"; }
+.bi-7-square::before { content: "\f7bd"; }
+.bi-8-circle-1::before { content: "\f7be"; }
+.bi-8-circle-fill-1::before { content: "\f7bf"; }
+.bi-8-circle-fill::before { content: "\f7c0"; }
+.bi-8-circle::before { content: "\f7c1"; }
+.bi-8-square-fill::before { content: "\f7c2"; }
+.bi-8-square::before { content: "\f7c3"; }
+.bi-9-circle-1::before { content: "\f7c4"; }
+.bi-9-circle-fill-1::before { content: "\f7c5"; }
+.bi-9-circle-fill::before { content: "\f7c6"; }
+.bi-9-circle::before { content: "\f7c7"; }
+.bi-9-square-fill::before { content: "\f7c8"; }
+.bi-9-square::before { content: "\f7c9"; }
+.bi-airplane-engines-fill::before { content: "\f7ca"; }
+.bi-airplane-engines::before { content: "\f7cb"; }
+.bi-airplane-fill::before { content: "\f7cc"; }
+.bi-airplane::before { content: "\f7cd"; }
+.bi-alexa::before { content: "\f7ce"; }
+.bi-alipay::before { content: "\f7cf"; }
+.bi-android::before { content: "\f7d0"; }
+.bi-android2::before { content: "\f7d1"; }
+.bi-box-fill::before { content: "\f7d2"; }
+.bi-box-seam-fill::before { content: "\f7d3"; }
+.bi-browser-chrome::before { content: "\f7d4"; }
+.bi-browser-edge::before { content: "\f7d5"; }
+.bi-browser-firefox::before { content: "\f7d6"; }
+.bi-browser-safari::before { content: "\f7d7"; }
+.bi-c-circle-1::before { content: "\f7d8"; }
+.bi-c-circle-fill-1::before { content: "\f7d9"; }
+.bi-c-circle-fill::before { content: "\f7da"; }
+.bi-c-circle::before { content: "\f7db"; }
+.bi-c-square-fill::before { content: "\f7dc"; }
+.bi-c-square::before { content: "\f7dd"; }
+.bi-capsule-pill::before { content: "\f7de"; }
+.bi-capsule::before { content: "\f7df"; }
+.bi-car-front-fill::before { content: "\f7e0"; }
+.bi-car-front::before { content: "\f7e1"; }
+.bi-cassette-fill::before { content: "\f7e2"; }
+.bi-cassette::before { content: "\f7e3"; }
+.bi-cc-circle-1::before { content: "\f7e4"; }
+.bi-cc-circle-fill-1::before { content: "\f7e5"; }
+.bi-cc-circle-fill::before { content: "\f7e6"; }
+.bi-cc-circle::before { content: "\f7e7"; }
+.bi-cc-square-fill::before { content: "\f7e8"; }
+.bi-cc-square::before { content: "\f7e9"; }
+.bi-cup-hot-fill::before { content: "\f7ea"; }
+.bi-cup-hot::before { content: "\f7eb"; }
+.bi-currency-rupee::before { content: "\f7ec"; }
+.bi-dropbox::before { content: "\f7ed"; }
+.bi-escape::before { content: "\f7ee"; }
+.bi-fast-forward-btn-fill::before { content: "\f7ef"; }
+.bi-fast-forward-btn::before { content: "\f7f0"; }
+.bi-fast-forward-circle-fill::before { content: "\f7f1"; }
+.bi-fast-forward-circle::before { content: "\f7f2"; }
+.bi-fast-forward-fill::before { content: "\f7f3"; }
+.bi-fast-forward::before { content: "\f7f4"; }
+.bi-filetype-sql::before { content: "\f7f5"; }
+.bi-fire::before { content: "\f7f6"; }
+.bi-google-play::before { content: "\f7f7"; }
+.bi-h-circle-1::before { content: "\f7f8"; }
+.bi-h-circle-fill-1::before { content: "\f7f9"; }
+.bi-h-circle-fill::before { content: "\f7fa"; }
+.bi-h-circle::before { content: "\f7fb"; }
+.bi-h-square-fill::before { content: "\f7fc"; }
+.bi-h-square::before { content: "\f7fd"; }
+.bi-indent::before { content: "\f7fe"; }
+.bi-lungs-fill::before { content: "\f7ff"; }
+.bi-lungs::before { content: "\f800"; }
+.bi-microsoft-teams::before { content: "\f801"; }
+.bi-p-circle-1::before { content: "\f802"; }
+.bi-p-circle-fill-1::before { content: "\f803"; }
+.bi-p-circle-fill::before { content: "\f804"; }
+.bi-p-circle::before { content: "\f805"; }
+.bi-p-square-fill::before { content: "\f806"; }
+.bi-p-square::before { content: "\f807"; }
+.bi-pass-fill::before { content: "\f808"; }
+.bi-pass::before { content: "\f809"; }
+.bi-prescription::before { content: "\f80a"; }
+.bi-prescription2::before { content: "\f80b"; }
+.bi-r-circle-1::before { content: "\f80c"; }
+.bi-r-circle-fill-1::before { content: "\f80d"; }
+.bi-r-circle-fill::before { content: "\f80e"; }
+.bi-r-circle::before { content: "\f80f"; }
+.bi-r-square-fill::before { content: "\f810"; }
+.bi-r-square::before { content: "\f811"; }
+.bi-repeat-1::before { content: "\f812"; }
+.bi-repeat::before { content: "\f813"; }
+.bi-rewind-btn-fill::before { content: "\f814"; }
+.bi-rewind-btn::before { content: "\f815"; }
+.bi-rewind-circle-fill::before { content: "\f816"; }
+.bi-rewind-circle::before { content: "\f817"; }
+.bi-rewind-fill::before { content: "\f818"; }
+.bi-rewind::before { content: "\f819"; }
+.bi-train-freight-front-fill::before { content: "\f81a"; }
+.bi-train-freight-front::before { content: "\f81b"; }
+.bi-train-front-fill::before { content: "\f81c"; }
+.bi-train-front::before { content: "\f81d"; }
+.bi-train-lightrail-front-fill::before { content: "\f81e"; }
+.bi-train-lightrail-front::before { content: "\f81f"; }
+.bi-truck-front-fill::before { content: "\f820"; }
+.bi-truck-front::before { content: "\f821"; }
+.bi-ubuntu::before { content: "\f822"; }
+.bi-unindent::before { content: "\f823"; }
+.bi-unity::before { content: "\f824"; }
+.bi-universal-access-circle::before { content: "\f825"; }
+.bi-universal-access::before { content: "\f826"; }
+.bi-virus::before { content: "\f827"; }
+.bi-virus2::before { content: "\f828"; }
+.bi-wechat::before { content: "\f829"; }
+.bi-yelp::before { content: "\f82a"; }
+.bi-sign-stop-fill::before { content: "\f82b"; }
+.bi-sign-stop-lights-fill::before { content: "\f82c"; }
+.bi-sign-stop-lights::before { content: "\f82d"; }
+.bi-sign-stop::before { content: "\f82e"; }
+.bi-sign-turn-left-fill::before { content: "\f82f"; }
+.bi-sign-turn-left::before { content: "\f830"; }
+.bi-sign-turn-right-fill::before { content: "\f831"; }
+.bi-sign-turn-right::before { content: "\f832"; }
+.bi-sign-turn-slight-left-fill::before { content: "\f833"; }
+.bi-sign-turn-slight-left::before { content: "\f834"; }
+.bi-sign-turn-slight-right-fill::before { content: "\f835"; }
+.bi-sign-turn-slight-right::before { content: "\f836"; }
+.bi-sign-yield-fill::before { content: "\f837"; }
+.bi-sign-yield::before { content: "\f838"; }
+.bi-ev-station-fill::before { content: "\f839"; }
+.bi-ev-station::before { content: "\f83a"; }
+.bi-fuel-pump-diesel-fill::before { content: "\f83b"; }
+.bi-fuel-pump-diesel::before { content: "\f83c"; }
+.bi-fuel-pump-fill::before { content: "\f83d"; }
+.bi-fuel-pump::before { content: "\f83e"; }
diff --git a/fietsboek/static/fietsboek.js b/fietsboek/static/fietsboek.js
index 2e88aa3..60de398 100644
--- a/fietsboek/static/fietsboek.js
+++ b/fietsboek/static/fietsboek.js
@@ -319,8 +319,8 @@ addHandler(".archive-checkbox", "change", () => {
* @param event - The triggering event.
*/
function clearInputButtonClicked(event) {
- const input = event.target.closest(".input-group").querySelector("input");
- input.value = "";
+ event.target.closest(".input-group").querySelectorAll("input").forEach((i) => i.value = "");
+ event.target.closest(".input-group").querySelectorAll("select").forEach((i) => i.value = "");
}
addHandler(".button-clear-input", "click", clearInputButtonClicked);
diff --git a/fietsboek/static/fonts/bootstrap-icons.woff b/fietsboek/static/fonts/bootstrap-icons.woff
index 4cd66b7..cf0a6d0 100644
--- a/fietsboek/static/fonts/bootstrap-icons.woff
+++ b/fietsboek/static/fonts/bootstrap-icons.woff
Binary files differ
diff --git a/fietsboek/static/fonts/bootstrap-icons.woff2 b/fietsboek/static/fonts/bootstrap-icons.woff2
index de01cad..ecc8f4c 100644
--- a/fietsboek/static/fonts/bootstrap-icons.woff2
+++ b/fietsboek/static/fonts/bootstrap-icons.woff2
Binary files differ
diff --git a/fietsboek/static/theme.css b/fietsboek/static/theme.css
index 3f7f74d..5ce61c6 100644
--- a/fietsboek/static/theme.css
+++ b/fietsboek/static/theme.css
@@ -114,6 +114,11 @@ strong {
padding-left: 1em;
}
+/* Ensure a consistent width of the cells in the browse view. */
+.browse-summary th, .browse-summary td {
+ width: 25%;
+}
+
.list-group.list-group-root {
padding: 0;
overflow: hidden;
diff --git a/fietsboek/templates/browse.jinja2 b/fietsboek/templates/browse.jinja2
index 0f98192..6f3e0eb 100644
--- a/fietsboek/templates/browse.jinja2
+++ b/fietsboek/templates/browse.jinja2
@@ -66,8 +66,17 @@
</div>
</div>
- {% if request.identity %}
- <div class="col-12">
+ <div class="col-md-6">
+ <div class="input-group">
+ <button type="button" class="btn btn-outline-secondary button-clear-input"><i class="bi bi-eraser-fill"></i></button>
+ <select class="form-select" size="2" name="type[]" multiple>
+ <option value="ORGANIC"{% if "ORGANIC" in request.params.getall("type[]") %} selected{% endif %}>{{ _("page.browse.filter.type.organic") }}</option>
+ <option value="SYNTHETIC"{% if "SYNTHETIC" in request.params.getall("type[]") %} selected{% endif %}>{{ _("page.browse.filter.type.synthetic") }}</option>
+ </select>
+ </div>
+ </div>
+ <div class="col-md-6">
+ {% if request.identity %}
{% macro render_switch(id, name, value, text) %}
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="{{ id }}" name="{{ name }}" value="{{ value }}" {% if value in request.params.getall(name) %}checked{% endif %}>
@@ -77,8 +86,9 @@
{{ render_switch("switchOnlyMyTracks", "show-only[]", "mine", _("page.browse.filter.my_tracks.only")) }}
{{ render_switch("switchOnlyFriendsTracks", "show-only[]", "friends", _("page.browse.filter.friends_tracks_only")) }}
{{ render_switch("switchOnlyMeTagged", "user-tagged", "on", _("page.browse.filter.me_tagged_only")) }}
+ {% endif %}
</div>
- {% endif %}
+
</div>
<div class="row g-3 mb-3">
@@ -107,9 +117,16 @@
{% if track.text_tags() %}
{% for tag in track.tags %}<span class="badge bg-info text-dark">{{ tag.tag }}</span> {% endfor %}
{% endif %}
+ <span class="float-end">
+ {% if track.show_organic_data() %}
+ <i class="bi bi-cassette" title="{{ _("page.browse.organic_tooltip") }}"></i>
+ {% else %}
+ <i class="bi bi-sign-turn-slight-right" title="{{ _("page.browse.synthetic_tooltip") }}"></i>
+ {% endif %}
+ </span>
</h5>
<div class="card-body">
- <table class="table table-hover table-sm">
+ <table class="table table-hover table-sm browse-summary">
<tbody>
<tr>
<th scope="row">{{ _("page.details.date") }}</th>
@@ -117,18 +134,21 @@
<th scope="row">{{ _("page.details.length") }}</th>
<td>{{ (track.length / 1000) | round(2) | format_decimal }} km</td>
</tr>
+ {% if track.show_organic_data() %}
<tr>
<th scope="row">{{ _("page.details.start_time") }}</th>
<td>{{ track.start_time | format_datetime }}</td>
<th scope="row">{{ _("page.details.end_time") }}</th>
<td>{{ track.end_time | format_datetime }}</td>
</tr>
+ {% endif %}
<tr>
<th scope="row">{{ _("page.details.uphill") }}</th>
<td>{{ track.uphill | round(2) | format_decimal }} m</td>
<th scope="row">{{ _("page.details.downhill") }}</th>
<td>{{ track.downhill | round(2) | format_decimal }} m</td>
</tr>
+ {% if track.show_organic_data() %}
<tr>
<th scope="row">{{ _("page.details.moving_time") }}</th>
<td>{{ track.moving_time }}</td>
@@ -141,15 +161,18 @@
<th scope="row">{{ _("page.details.avg_speed") }}</th>
<td>{{ mps_to_kph(track.avg_speed) | round(2) | format_decimal }} km/h</td>
</tr>
+ {% endif %}
</tbody>
</table>
+ {% if track.show_organic_data() %}
<ul>
<li>{{ track.owner.name }}</li>
{% for user in track.tagged_people %}
<li>{{ user.name }}</li>
{% endfor %}
</ul>
+ {% endif %}
</div>
</div>
{% endfor %}
diff --git a/fietsboek/templates/details.jinja2 b/fietsboek/templates/details.jinja2
index 55a5c26..4d67f07 100644
--- a/fietsboek/templates/details.jinja2
+++ b/fietsboek/templates/details.jinja2
@@ -56,12 +56,14 @@
{% endif %}
+ {% if is_organic %}
<ul>
<li>{{ track.owner.name }}</li>
{% for user in track.tagged_people %}
<li>{{ user.name }}</li>
{% endfor %}
</ul>
+ {% endif %}
<p>
{{ _("page.details.tags") }}: {% for tag in track.tags %}<span class="badge rounded-pill bg-info text-dark">{{ tag.tag }}</span> {% endfor %}
@@ -86,6 +88,7 @@
<th scope="row">{{ _("page.details.date") }}</th>
<td>{{ track.date | format_datetime }}</td>
</tr>
+ {% if show_organic %}
<tr>
<th scope="row">{{ _("page.details.start_time") }}</th>
<td>{{ track.start_time | format_datetime }}</td>
@@ -94,6 +97,7 @@
<th scope="row">{{ _("page.details.end_time") }}</th>
<td>{{ track.end_time | format_datetime }}</td>
</tr>
+ {% endif %}
<tr>
<th scope="row">{{ _("page.details.length") }}</th>
<td>{{ (track.length / 1000) | round(2) | format_decimal }} km</td>
@@ -106,6 +110,7 @@
<th scope="row">{{ _("page.details.downhill") }}</th>
<td>{{ track.downhill | round(2) | format_decimal }} m</td>
</tr>
+ {% if show_organic %}
<tr>
<th scope="row">{{ _("page.details.moving_time") }}</th>
<td>{{ track.moving_time }}</td>
@@ -122,6 +127,7 @@
<th scope="row">{{ _("page.details.avg_speed") }}</th>
<td>{{ mps_to_kph(track.avg_speed) | round(2) | format_decimal }} km/h</td>
</tr>
+ {% endif %}
</tbody>
</table>
{% if track.badges %}
diff --git a/fietsboek/templates/edit.jinja2 b/fietsboek/templates/edit.jinja2
index 4e64f69..91c44e3 100644
--- a/fietsboek/templates/edit.jinja2
+++ b/fietsboek/templates/edit.jinja2
@@ -10,7 +10,7 @@
<noscript><p>{{ _("page.noscript") }}<p></noscript>
</div>
<form method="POST" enctype="multipart/form-data">
- {{ edit_form.edit_track(track.title, track.date_raw, track.date_tz or 0, track.visibility, track.description, track.text_tags(), badges, track.tagged_people, images) }}
+ {{ edit_form.edit_track(track.title, track.date_raw, track.date_tz or 0, track.visibility, track.type, track.description, track.text_tags(), badges, track.tagged_people, images) }}
{{ util.hidden_csrf_input() }}
<div class="btn-group" role="group">
<button type="submit" class="btn btn-primary"><i class="bi bi-save"></i> {{ _("page.edit.form.submit") }}</button>
diff --git a/fietsboek/templates/edit_form.jinja2 b/fietsboek/templates/edit_form.jinja2
index c4a478c..34c34c3 100644
--- a/fietsboek/templates/edit_form.jinja2
+++ b/fietsboek/templates/edit_form.jinja2
@@ -1,4 +1,4 @@
-{% macro edit_track(title, date, date_tz, visibility, description, tags, badges, friends, images) %}
+{% macro edit_track(title, date, date_tz, visibility, type, description, tags, badges, friends, images) %}
<div class="mb-3">
<label for="formTitle" class="form-label">{{ _("page.track.form.title") }}</label>
<input class="form-control" type="text" id="formTitle" name="title" value="{{ title | default("", true) }}">
@@ -22,6 +22,13 @@
</p>
</div>
<div class="mb-3">
+ <label for="formType" class="form-label">{{ _("page.track.form.type") }}</label>
+ <select class="form-select" id="formType" name="type">
+ <option value="ORGANIC"{% if type.name == "ORGANIC" %} selected{% endif%}>{{ _("page.track.form.type.organic") }}</option>
+ <option value="SYNTHETIC"{% if type.name == "SYNTHETIC" %} selected{% endif%}>{{ _("page.track.form.type.synthetic") }}</option>
+ </select>
+</div>
+<div class="mb-3">
<div>{{ _("page.track.form.tags") }}</div>
<div id="formTags" class="mb-1">
{% for tag in tags %}
diff --git a/fietsboek/templates/finish_upload.jinja2 b/fietsboek/templates/finish_upload.jinja2
index d6f9f00..0d32392 100644
--- a/fietsboek/templates/finish_upload.jinja2
+++ b/fietsboek/templates/finish_upload.jinja2
@@ -10,7 +10,7 @@
<noscript><p>{{ _("page.noscript") }}<p></noscript>
</div>
<form method="POST" enctype="multipart/form-data">
- {{ edit_form.edit_track(upload_title, upload_date, upload_date_tz, upload_visibility, upload_description, upload_tags, badges, upload_tagged_people, []) }}
+ {{ edit_form.edit_track(upload_title, upload_date, upload_date_tz, upload_visibility, upload_type, upload_description, upload_tags, badges, upload_tagged_people, []) }}
{{ util.hidden_csrf_input() }}
<div class="btn-group" role="group">
<button type="submit" class="btn btn-primary">{{ _("page.upload.form.submit") }}</button>
diff --git a/fietsboek/views/browse.py b/fietsboek/views/browse.py
index 7120b0d..ffd3eae 100644
--- a/fietsboek/views/browse.py
+++ b/fietsboek/views/browse.py
@@ -135,6 +135,9 @@ class TrackFilters:
(track.owner == request.identity or
request.identity in track.tagged_people))
+ if 'type[]' in request.params:
+ filters.append(lambda track: track.type.name in request.params.getall('type[]'))
+
return TrackFilters(filters)
diff --git a/fietsboek/views/default.py b/fietsboek/views/default.py
index e7a1cb0..1d7bfa9 100644
--- a/fietsboek/views/default.py
+++ b/fietsboek/views/default.py
@@ -10,6 +10,7 @@ from sqlalchemy.exc import NoResultFound
from .. import models, summaries, util, email
from ..models.user import PasswordMismatch, TokenType
+from ..models.track import TrackType
@view_config(route_name='home', renderer='fietsboek:templates/home.jinja2')
@@ -32,6 +33,8 @@ def home(request):
summary = summaries.Summary()
for track in all_tracks:
+ if track.type != TrackType.ORGANIC:
+ continue
track.ensure_cache()
request.dbsession.add(track.cache)
summary.add(track)
diff --git a/fietsboek/views/detail.py b/fietsboek/views/detail.py
index 6eba3ce..38dc31f 100644
--- a/fietsboek/views/detail.py
+++ b/fietsboek/views/detail.py
@@ -40,6 +40,7 @@ def details(request):
return {
'track': track,
+ 'show_organic': track.show_organic_data(),
'show_edit_link': show_edit_link,
'mps_to_kph': util.mps_to_kph,
'comment_md_to_html': util.safe_markdown,
diff --git a/fietsboek/views/edit.py b/fietsboek/views/edit.py
index 946a862..ff71282 100644
--- a/fietsboek/views/edit.py
+++ b/fietsboek/views/edit.py
@@ -10,7 +10,7 @@ from pyramid.httpexceptions import HTTPFound, HTTPBadRequest
from sqlalchemy import select
from .. import models, util
-from ..models.track import Visibility
+from ..models.track import Visibility, TrackType
ImageEmbed = namedtuple("ImageEmbed", "name url description")
@@ -78,6 +78,7 @@ def do_edit(request):
track.tagged_people = tagged_people
track.title = request.params["title"]
track.visibility = Visibility[request.params["visibility"]]
+ track.type = TrackType[request.params["type"]]
track.description = request.params["description"]
track.badges = badges
tags = request.params.getall("tag[]")
diff --git a/fietsboek/views/upload.py b/fietsboek/views/upload.py
index 95008b4..f63f45d 100644
--- a/fietsboek/views/upload.py
+++ b/fietsboek/views/upload.py
@@ -13,7 +13,7 @@ import gpxpy
from . import edit
from .. import models, util
-from ..models.track import Visibility
+from ..models.track import Visibility, TrackType
LOGGER = logging.getLogger(__name__)
@@ -120,6 +120,7 @@ def finish_upload(request):
'upload_date': date,
'upload_date_tz': int(tz_offset.total_seconds() // 60),
'upload_visibility': Visibility.PRIVATE,
+ 'upload_type': TrackType.ORGANIC,
'upload_description': gpx.description,
'upload_tags': set(),
'upload_tagged_people': [],
@@ -153,6 +154,7 @@ def do_finish_upload(request):
owner=request.identity,
title=request.params["title"],
visibility=Visibility[request.params["visibility"]],
+ type=TrackType[request.params["type"]],
description=request.params["description"],
badges=badges,
link_secret=util.random_link_secret(),