format frontend code

This commit is contained in:
2024-09-03 22:09:42 +03:00
parent 0689e75626
commit 242f4ee266
2 changed files with 26 additions and 22 deletions

View File

@ -24,14 +24,14 @@ function setChoiceByLabel(choicesInstance, label) {
{% for planned_trip in planned_trips | sort(attribute='planned_starting_time') %}
<div class="pt-2 px-3 {% if not loop.first %}border-t{% endif %} text-primary-900 dark:text-white flex justify-between items-center">
<strong class="block">
{% set amount_members = planned_trip.rower | length + 1 %}
{% set amount_members = planned_trip.rower | length + 1 %}
{{ planned_trip.cox_name }} ({{ amount_members }}&nbsp;Person{{ amount_members | pluralize(singular="", plural="en") }})
<small class="block">{{ planned_trip.planned_starting_time }}</small>
</strong><button class="btn btn-primary ml-3"
onclick="choiceObjects['newrower'].removeActiveItems(-2);choiceObjects['newrower'].setChoiceByValue('{{ planned_trip.cox_id }}'); {% for rower in planned_trip.rower %}setChoiceByLabel(choiceObjects['newrower'], '{{ rower.name }}');{% endfor %}window.scrollTo(0,0); ">
👥
</button>
</strong>
<button class="btn btn-primary ml-3"
onclick="choiceObjects['newrower'].removeActiveItems(-2);choiceObjects['newrower'].setChoiceByValue('{{ planned_trip.cox_id }}'); {% for rower in planned_trip.rower %}setChoiceByLabel(choiceObjects['newrower'], '{{ rower.name }}');{% endfor %}window.scrollTo(0,0); ">
👥
</button>
</div>
{% endfor %}
</div>