diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-08-16 23:06:32 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-08-16 23:06:32 +0200 |
commit | 79a440d36b6735cf2afbf220f8cc3ffd58e3bc8a (patch) | |
tree | 59bf0de07eb5f58c89087e3728c7ceac5cd28d32 | |
parent | 9c36563c333269cfcda6da311767aadebc5be481 (diff) | |
download | fietsboek-79a440d36b6735cf2afbf220f8cc3ffd58e3bc8a.tar.gz fietsboek-79a440d36b6735cf2afbf220f8cc3ffd58e3bc8a.tar.bz2 fietsboek-79a440d36b6735cf2afbf220f8cc3ffd58e3bc8a.zip |
add a favourite star to the detail page
-rw-r--r-- | fietsboek/templates/details.jinja2 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fietsboek/templates/details.jinja2 b/fietsboek/templates/details.jinja2 index b7ebefe..7307270 100644 --- a/fietsboek/templates/details.jinja2 +++ b/fietsboek/templates/details.jinja2 @@ -3,7 +3,18 @@ {% block content %} <div class="container"> - <h1>{{ track.title | default(_("page.details.title"), true) }}</h1> + <h1> + {{ track.title | default(_("page.details.title"), true) }} + {% if request.identity %} + <span style="display: inline-flex; vertical-align: middle;"> + {% if request.identity in track.favourees %} + <i class="bi bi-star-fill favourite-star" data-track-id="{{ track.id }}"></i> + {% else %} + <i class="bi bi-star favourite-star" data-track-id="{{ track.id }}"></i> + {% endif %} + </span> + {% endif %} + </h1> {% if show_edit_link %} <div class="btn-group" role="group"> <a class="btn btn-success" href="{{ request.route_path('edit', track_id=track.id) }}"><i class="bi-pencil-square"></i> {{ _("page.details.edit") }}</a> |