fix: Don't show ADs as part of "bethere" contraints. (#4540)

Also tweak some minor UI stuff while I'm here.
This commit is contained in:
Lars Eggert 2022-10-08 00:02:29 +03:00 committed by GitHub
parent 0bdfb25c47
commit 43e4a26ca0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 10 deletions

View file

@ -65,18 +65,17 @@
{% if schedule.is_official_record %}This is the official schedule for a meeting in the past.{% endif %}
Make a
<a href="{% url "ietf.meeting.views.new_meeting_schedule" num=meeting.number owner=schedule.owner_email name=schedule.name %}">
new agenda from this
</a>.
new agenda from this</a>.
</div>
{% endif %}
{% if timeslot_groups|length == 0 %}
<p>
<p class="alert alert-info my-3">
No timeslots exist for this meeting yet.
</p>
<p>
<a href="{% url "ietf.meeting.views.edit_timeslots" num=meeting.number %}">
Edit timeslots.
<a class="btn btn-primary" href="{% url "ietf.meeting.views.edit_timeslots" num=meeting.number %}">
Edit timeslots
</a>
</p>
{% else %}
@ -193,6 +192,7 @@
</div>
</div>
<div class="preferences">
<div class="my-3">
<label class="sort-unassigned">
Sort unassigned:
<select name="sort_unassigned" class="form-select">
@ -210,7 +210,8 @@
</option>
</select>
</label>
<span class="toggle-inputs session-parent-toggles">
</div>
<div class="my-3 toggle-inputs session-parent-toggles">
Show:
{% for p in session_parents %}
<label class="parent-{{ p.acronym }}">
@ -221,7 +222,8 @@
{{ p.acronym }}
</label>
{% endfor %}
</span>
</div>
<div class="my-3">
{% if session_purposes|length > 1 %}
<button id="session-toggle-modal-open"
class="btn btn-primary"
@ -248,6 +250,7 @@
<i class="bi bi-check-square"></i>
Timeslot Types
</button>
</div>
</div>
</div>
<div class="session-info-container"></div>

View file

@ -1,4 +1,4 @@
{% load person_filters editor_tags %}
{% load person_filters editor_tags ietf_filters textfilters %}
<!-- [html-validate-disable-block no-inline-style -- FIXME: should style this better] -->
<div id="session{{ session.pk }}"
class="session {% if not session.group.parent.scheduling_color %}untoggleable-by-parent{% endif %} {% if session.parent_acronym %}parent-{{ session.parent_acronym }}{% endif %} purpose-{{ session.purpose.slug }} {% if session.readonly %}readonly{% endif %} {% if not session.on_agenda %}off-agenda{% endif %}"
@ -47,7 +47,7 @@
{% if not session.on_agenda %}&middot; <i>off agenda</i>{% endif %}
</div>
{% endif %}
{% if session.comments %}<div class="comments">{{ session.comments|linebreaksbr }}</div>{% endif %}
{% if session.comments %}<div class="comments">{{ session.comments|urlize_ietf_docs|linkify|linebreaksbr }}</div>{% endif %}
{% if session.requested_by_person %}
<div class="row">
<div class="col-1">
@ -71,11 +71,23 @@
{% endif %}
{% if session.formatted_constraints %}
<div class="formatted-constraints">
{% with ad=session.group.ads|first %}
{% for constraint_name, values in session.formatted_constraints.items %}
<div class="row">
<div class="col-1" title="{{ constraint_name.name }}">{% constraint_icon_for constraint_name %}</div><div class="col">{{ values|join:", " }}</div>
<div class="col-1" title="{{ constraint_name.name }}">{% constraint_icon_for constraint_name %}</div><div class="col">
{% if constraint_name.slug != 'bethere' or not ad %}
{{ values|join:", " }}
{% else %}
{% for val in values %}
{% if val != ad.person.plain_name %}
{{ val }}{% if forloop.revcounter > 2 or forloop.revcounter > 1 and values|last != ad.person.plain_name %}, {% endif %}
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}
{% endwith %}
</div>
{% endif %}
{% for s in session.other_sessions %}