Skip to content

Commit 7b2d4c0

Browse files
Make speaker name clickable to filter by name
Clicking a speaker's name in the proposal row now sets the speaker name filter input and triggers filtering, scrolling the filter into view. Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
1 parent 93788e0 commit 7b2d4c0

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

backend/reviews/templates/proposals-recap.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,16 @@
162162
margin-left: 10px;
163163
}
164164

165+
.speaker-name-link {
166+
cursor: pointer;
167+
text-decoration: underline;
168+
color: var(--link-fg, #417690);
169+
}
170+
171+
.speaker-name-link:hover {
172+
color: var(--link-hover-color, #036);
173+
}
174+
165175
tr:nth-of-type(odd) {
166176
background-color: var(--body-bg);
167177
}
@@ -357,6 +367,14 @@
357367
);
358368
};
359369

370+
// Filter by speaker name (called when clicking a speaker name link)
371+
const filterBySpeakerName = (name) => {
372+
const input = document.querySelector('#filter-by-speaker');
373+
input.value = name;
374+
input.dispatchEvent(new Event('input'));
375+
input.scrollIntoView({ behavior: 'smooth', block: 'center' });
376+
};
377+
360378
// Toggle bottom bar visibility
361379
const toggleBottomBar = () => {
362380
const bottomBar = document.querySelector('.reviews-bottom-bar');
@@ -503,7 +521,7 @@ <h3>Show proposals of type:</h3>
503521
{% with speaker_id=item.speaker_id|stringformat:"i" %}
504522
<li>
505523
<strong>Speaker Name</strong>
506-
<span>{{ item.speaker.fullname }}</span>
524+
<span class="speaker-name-link" onclick="filterBySpeakerName('{{ item.speaker.fullname|escapejs }}')">{{ item.speaker.fullname }}</span>
507525
</li>
508526
<li>
509527
<strong>Speaker Country</strong>

0 commit comments

Comments
 (0)