Add favorites count to favorite button

This commit is contained in:
rubenwardy
2024-03-30 17:27:08 +00:00
parent 64414a3731
commit e9193aefb8
2 changed files with 10 additions and 2 deletions

View File

@@ -385,8 +385,12 @@
<div class="d-flex mt-3 mb-4">
<form method="POST" action="{{ package.get_url('collections.package_toggle_favorite') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<button type="submit" class="btn {% if is_favorited %}text-info{% endif %} btn-secondary me-2" aria-label="{{ _('Favorite') }}">
<button type="submit" class="btn {% if is_favorited %}text-info{% endif %} btn-secondary me-2"
aria-label="{{ _('Favorite') }}" title="{{ _('Favorite') }}">
<i class="fas fa-star"></i>
<span class="ms-1">
{{ favorites_count }}
</span>
</button>
</form>
<div class="flex-grow-1">