fix: Use smaller buttons for NomCom feedback and color the count bubble

This commit is contained in:
Lars Eggert 2023-10-13 16:14:59 +03:00
parent fa00abf9de
commit ba66d25372
No known key found for this signature in database
GPG key ID: 54B5C309BF70C157

View file

@ -36,13 +36,13 @@
<h3 class="navskip mt-3">{{ p.name }}</h3> <h3 class="navskip mt-3">{{ p.name }}</h3>
<div class="d-grid gap-3"> <div class="d-grid gap-3">
{% for np in p.nomineeposition_set.accepted.not_duplicated %} {% for np in p.nomineeposition_set.accepted.not_duplicated %}
<a class="btn btn-primary position-relative" <a class="btn btn-primary btn-sm position-relative"
{% if nomcom.group.state_id != 'conclude' %}href="?nominee={{ np.nominee.id }}&amp;position={{ np.position.id }}"{% endif %} {% if nomcom.group.state_id != 'conclude' %}href="?nominee={{ np.nominee.id }}&amp;position={{ np.position.id }}"{% endif %}
{% with count=counts|lookup:np.position.id|lookup:np.nominee.id %} {% with count=counts|lookup:np.position.id|lookup:np.nominee.id|default:0 %}
title="{% if count %}{{ count }} earlier comment{{ count|pluralize }} from you {% else %}You have not yet provided feedback {% endif %} on {{ np.nominee.email.address }} as {{ np.position }}"> title="{% if count %}{{ count }} earlier comment{{ count|pluralize }} from you {% else %}You have not yet provided feedback {% endif %} on {{ np.nominee.email.address }} as {{ np.position }}">
{{ np.nominee.name }} {{ np.nominee.name }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill text-bg-danger"> <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill {% if count %}text-bg-success{% else %}text-bg-danger{% endif %}">
{{ count | default:"0" }} {{ count }}
</span> </span>
{% endwith %} {% endwith %}
</a> </a>
@ -55,13 +55,13 @@
<h2 class="navskip mt-4">Topics</h2> <h2 class="navskip mt-4">Topics</h2>
<div class="d-grid gap-3"> <div class="d-grid gap-3">
{% for t in topics %} {% for t in topics %}
<a class="btn btn-primary position-relative" <a class="btn btn-primary btn-sm position-relative"
{% if nomcom.group.state_id != 'conclude' %}href="?topic={{ t.id }}"{% endif %} {% if nomcom.group.state_id != 'conclude' %}href="?topic={{ t.id }}"{% endif %}
title="{% if count %}{{ count }} earlier comment{{ count|pluralize }} from you {% else %}You have not yet provided feedback {% endif %} on {{ t.subject }}"> title="{% if count %}{{ count }} earlier comment{{ count|pluralize }} from you {% else %}You have not yet provided feedback {% endif %} on {{ t.subject }}">
{{ t.subject }} {{ t.subject }}
{% with count=topic_counts|lookup:t.id %} {% with count=topic_counts|lookup:t.id|default:0 %}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill text-bg-danger"> <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill {% if count %}text-bg-success{% else %}text-bg-danger{% endif %}">
{{ count | default:"0" }} {{ count }}
</span> </span>
{% endwith %} {% endwith %}
</a> </a>
@ -109,4 +109,4 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}