moviewyrm/bookwyrm/templates/snippets/goal_progress.html
2021-02-27 18:48:10 -08:00

12 lines
713 B
HTML

{% load i18n %}
{% load humanize %}
<p>
{% if goal.progress_percent >= 100 %}
{% trans "Success!" %}
{% elif goal.progress_percent %}
{% blocktrans with percent=goal.percent %}{{ percent }}% complete!{% endblocktrans %}
{% endif %}
{% if goal.user == request.user %}You've{% else %}{{ goal.user.display_name }} has{% endif %} read {% if request.path != goal.local_path %}<a href="{{ goal.local_path }}">{% endif %}{{ goal.book_count }} of {{ goal.goal | intcomma }} books{% if request.path != goal.local_path %}</a>{% endif %}.
</p>
<progress class="progress is-large" value="{{ goal.book_count }}" max="{{ goal.goal }}" aria-hidden="true">{{ goal.progress_percent }}%</progress>