diff options
-rw-r--r-- | .mypy.ini | 3 | ||||
-rw-r--r-- | asset-sources/theme.scss | 6 | ||||
-rw-r--r-- | fietsboek/locale/de/LC_MESSAGES/messages.mo | bin | 15685 -> 15785 bytes | |||
-rw-r--r-- | fietsboek/locale/de/LC_MESSAGES/messages.po | 20 | ||||
-rw-r--r-- | fietsboek/locale/en/LC_MESSAGES/messages.mo | bin | 14656 -> 14754 bytes | |||
-rw-r--r-- | fietsboek/locale/en/LC_MESSAGES/messages.po | 20 | ||||
-rw-r--r-- | fietsboek/locale/fietslog.pot | 20 | ||||
-rw-r--r-- | fietsboek/static/theme.css | 6 | ||||
-rw-r--r-- | fietsboek/static/theme.css.map | 2 | ||||
-rw-r--r-- | fietsboek/templates/browse.jinja2 | 6 | ||||
-rw-r--r-- | fietsboek/templates/home.jinja2 | 18 |
11 files changed, 78 insertions, 23 deletions
@@ -14,9 +14,6 @@ ignore_missing_imports = True [mypy-pyramid.*] ignore_missing_imports = True -[mypy-sqlalchemy.*] -ignore_missing_imports = True - [mypy-webob.*] ignore_missing_imports = True diff --git a/asset-sources/theme.scss b/asset-sources/theme.scss index 20708f3..1fe0deb 100644 --- a/asset-sources/theme.scss +++ b/asset-sources/theme.scss @@ -151,6 +151,12 @@ strong { cursor: pointer; } +.count-field { + width: 50px; + display: inline-block; + text-align: right; +} + /* Ensure a consistent width of the cells in the browse view. */ .browse-summary th, .browse-summary td { width: 25%; diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.mo b/fietsboek/locale/de/LC_MESSAGES/messages.mo Binary files differindex 0633a4c..c2fd61b 100644 --- a/fietsboek/locale/de/LC_MESSAGES/messages.mo +++ b/fietsboek/locale/de/LC_MESSAGES/messages.mo diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.po b/fietsboek/locale/de/LC_MESSAGES/messages.po index b7125af..98f05e7 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: 2024-04-06 21:57+0200\n" +"POT-Creation-Date: 2024-04-17 21:42+0200\n" "PO-Revision-Date: 2022-07-02 17:35+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language: de\n" @@ -243,15 +243,23 @@ msgstr "maximale Geschwindigkeit" msgid "page.details.avg_speed" msgstr "durchschnittliche Geschwindigkeit" -#: fietsboek/templates/browse.jinja2:205 +#: fietsboek/templates/browse.jinja2:192 +msgid "page.browse.card.comments" +msgstr "Kommentare" + +#: fietsboek/templates/browse.jinja2:194 +msgid "page.browse.card.images" +msgstr "Bilder" + +#: fietsboek/templates/browse.jinja2:211 msgid "page.browse.download_multiple" msgstr "ausgewählte Herunterladen" -#: fietsboek/templates/browse.jinja2:207 +#: fietsboek/templates/browse.jinja2:213 msgid "page.browse.no_results" msgstr "Es wurden keine Strecken gefunden, die den Filtern entsprechen." -#: fietsboek/templates/browse.jinja2:209 +#: fietsboek/templates/browse.jinja2:215 msgid "page.browse.no_tracks" msgstr "" "Es wurden keine Strecken gefunden, auf die Du Zugriff hast. Versuche, " @@ -520,13 +528,13 @@ msgstr "" "Links, um sie fortzusetzen:" #: fietsboek/templates/home.jinja2:31 fietsboek/templates/home.jinja2:38 -#: fietsboek/templates/home.jinja2:66 +#: fietsboek/templates/home.jinja2:82 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:66 +#: fietsboek/templates/home.jinja2:82 msgid "page.home.total" msgstr "Gesamt" diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.mo b/fietsboek/locale/en/LC_MESSAGES/messages.mo Binary files differindex cc713cb..1390daa 100644 --- a/fietsboek/locale/en/LC_MESSAGES/messages.mo +++ b/fietsboek/locale/en/LC_MESSAGES/messages.mo diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.po b/fietsboek/locale/en/LC_MESSAGES/messages.po index 5e1762c..f4cacb5 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: 2024-04-06 21:57+0200\n" +"POT-Creation-Date: 2024-04-17 21:42+0200\n" "PO-Revision-Date: 2023-04-03 20:42+0200\n" "Last-Translator: \n" "Language: en\n" @@ -243,15 +243,23 @@ msgstr "Max Speed" msgid "page.details.avg_speed" msgstr "Average Speed" -#: fietsboek/templates/browse.jinja2:205 +#: fietsboek/templates/browse.jinja2:192 +msgid "page.browse.card.comments" +msgstr "Comments" + +#: fietsboek/templates/browse.jinja2:194 +msgid "page.browse.card.images" +msgstr "Images" + +#: fietsboek/templates/browse.jinja2:211 msgid "page.browse.download_multiple" msgstr "Download selected" -#: fietsboek/templates/browse.jinja2:207 +#: fietsboek/templates/browse.jinja2:213 msgid "page.browse.no_results" msgstr "No results matching the filters were found." -#: fietsboek/templates/browse.jinja2:209 +#: fietsboek/templates/browse.jinja2:215 msgid "page.browse.no_tracks" msgstr "You currently do not have access to any tracks. Try logging in." @@ -514,13 +522,13 @@ msgid "page.home.unfinished_uploads" msgstr "You have unfinished uploads. Click on the links below to resume them:" #: fietsboek/templates/home.jinja2:31 fietsboek/templates/home.jinja2:38 -#: fietsboek/templates/home.jinja2:66 +#: fietsboek/templates/home.jinja2:82 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:66 +#: fietsboek/templates/home.jinja2:82 msgid "page.home.total" msgstr "Total" diff --git a/fietsboek/locale/fietslog.pot b/fietsboek/locale/fietslog.pot index 747cd78..a3dea70 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: 2024-04-06 21:57+0200\n" +"POT-Creation-Date: 2024-04-17 21:42+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" @@ -239,15 +239,23 @@ msgstr "" msgid "page.details.avg_speed" msgstr "" -#: fietsboek/templates/browse.jinja2:205 +#: fietsboek/templates/browse.jinja2:192 +msgid "page.browse.card.comments" +msgstr "" + +#: fietsboek/templates/browse.jinja2:194 +msgid "page.browse.card.images" +msgstr "" + +#: fietsboek/templates/browse.jinja2:211 msgid "page.browse.download_multiple" msgstr "" -#: fietsboek/templates/browse.jinja2:207 +#: fietsboek/templates/browse.jinja2:213 msgid "page.browse.no_results" msgstr "" -#: fietsboek/templates/browse.jinja2:209 +#: fietsboek/templates/browse.jinja2:215 msgid "page.browse.no_tracks" msgstr "" @@ -508,13 +516,13 @@ msgid "page.home.unfinished_uploads" msgstr "" #: fietsboek/templates/home.jinja2:31 fietsboek/templates/home.jinja2:38 -#: fietsboek/templates/home.jinja2:66 +#: fietsboek/templates/home.jinja2:82 msgid "page.home.summary.track" msgid_plural "page.home.summary.tracks" msgstr[0] "" msgstr[1] "" -#: fietsboek/templates/home.jinja2:66 +#: fietsboek/templates/home.jinja2:82 msgid "page.home.total" msgstr "" diff --git a/fietsboek/static/theme.css b/fietsboek/static/theme.css index 8a77608..7656bc2 100644 --- a/fietsboek/static/theme.css +++ b/fietsboek/static/theme.css @@ -144,6 +144,12 @@ strong { cursor: pointer; } +.count-field { + width: 50px; + display: inline-block; + text-align: right; +} + /* Ensure a consistent width of the cells in the browse view. */ .browse-summary th, .browse-summary td { width: 25%; diff --git a/fietsboek/static/theme.css.map b/fietsboek/static/theme.css.map index fb7eb58..f2286e4 100644 --- a/fietsboek/static/theme.css.map +++ b/fietsboek/static/theme.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../asset-sources/theme.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EAqCE;EACA;EACA;EACA;EACA;EACA;;AAzCA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAWJ;EACI;;;AAGJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;AACA;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE","file":"theme.css"}
\ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../asset-sources/theme.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EAqCE;EACA;EACA;EACA;EACA;EACA;;AAzCA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAWJ;EACI;;;AAGJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;AACA;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE","file":"theme.css"}
\ No newline at end of file diff --git a/fietsboek/templates/browse.jinja2 b/fietsboek/templates/browse.jinja2 index 1eae88d..308e89d 100644 --- a/fietsboek/templates/browse.jinja2 +++ b/fietsboek/templates/browse.jinja2 @@ -188,6 +188,12 @@ <td>{{ mps_to_kph(track.avg_speed) | round(2) | format_decimal }} km/h</td> </tr> {% endif %} + <tr> + <th scope="row"><i class="bi bi-chat-left-text-fill"></i> {{ _("page.browse.card.comments") }}</th> + <td>{{ track.comments | length }}</td> + <th scope="row"><i class="bi bi-images"></i> {{ _("page.browse.card.images") }}</th> + <td>{{ track.images | length }}</td> + </tr> </tbody> </table> diff --git a/fietsboek/templates/home.jinja2 b/fietsboek/templates/home.jinja2 index d3725ca..6092669 100644 --- a/fietsboek/templates/home.jinja2 +++ b/fietsboek/templates/home.jinja2 @@ -48,10 +48,26 @@ <i class="bi bi-star-fill favourite-star-ni"></i> {% endif %} <span class="float-end"> + {% if track.images %} + <span class="count-field"> + {{ track.images | length }} <i class="bi bi-images"></i> + </span> + {% else %} + <span class="count-field"></span> + {% endif %} + {% if track.comments %} + <span class="count-field"> + {{ track.comments | length }} <i class="bi bi-chat-left-text-fill"></i> + </span> + {% else %} + <span class="count-field"></span> + {% endif %} {% if track.tagged_people %} - <span data-bs-toggle="tooltip" data-bs-container="body" data-bs-html="true" title="{{ track.html_tooltip_tagged_people() }}"> + <span class="count-field" data-bs-toggle="tooltip" data-bs-container="body" data-bs-html="true" title="{{ track.html_tooltip_tagged_people() }}"> {{ track.tagged_people | length + 1 }} <i class="bi bi-people-fill"></i> </span> + {% else %} + <span class="count-field"></span> {% endif %} {{ (track.length / 1000) | round(2) | format_decimal }} km </span> |