2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-02-11 16:24:20 +00:00
|
|
|
{% load humanize %}
|
2021-05-23 00:33:10 +00:00
|
|
|
|
|
|
|
{% with goal.progress as progress %}
|
2021-01-16 19:34:19 +00:00
|
|
|
<p>
|
2021-05-23 00:33:10 +00:00
|
|
|
{% if progress.percent >= 100 %}
|
2022-03-16 23:13:15 +00:00
|
|
|
{% trans "Success!" context "Goal successfully completed" %}
|
2021-05-23 00:33:10 +00:00
|
|
|
{% elif progress.percent %}
|
|
|
|
{% blocktrans with percent=progress.percent %}{{ percent }}% complete!{% endblocktrans %}
|
2021-03-01 01:10:30 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if goal.user == request.user %}
|
2021-05-23 00:33:10 +00:00
|
|
|
{% blocktrans with read_count=progress.count|intcomma goal_count=goal.goal|intcomma path=goal.local_path %}You've read <a href="{{ path }}">{{ read_count }} of {{ goal_count}} books</a>.{% endblocktrans %}
|
2021-03-01 01:10:30 +00:00
|
|
|
{% else %}
|
2021-05-23 00:33:10 +00:00
|
|
|
{% blocktrans with username=goal.user.display_name read_count=progress.count|intcomma goal_count=goal.goal|intcomma path=goal.local_path %}{{ username }} has read <a href="{{ path }}">{{ read_count }} of {{ goal_count}} books</a>.{% endblocktrans %}
|
2021-01-16 19:34:19 +00:00
|
|
|
{% endif %}
|
|
|
|
</p>
|
2022-03-26 18:38:00 +00:00
|
|
|
<progress
|
|
|
|
class="progress is-large is-primary"
|
|
|
|
value="{{ progress.count }}"
|
|
|
|
max="{{ goal.goal }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
>{{ progress.percent }}%</progress>
|
2021-01-16 19:34:19 +00:00
|
|
|
|
2021-05-23 00:33:10 +00:00
|
|
|
{% endwith %}
|