Skip to content

Commit 6a2d2c5

Browse files
committed
add button to thread view that allows you to jump to the first unread message directly
Signed-off-by: Kai Wagner <kai.wagner@percona.com>
1 parent 3524149 commit 6a2d2c5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/views/topics/show.html.slim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@
200200
- if user_signed_in?
201201
button.button.button-secondary.button-small data-action="click->thread-actions#markAllRead" Mark all messages read
202202
= link_to "Jump to latest", "#message-#{last_message.id}", class: "button button-secondary button-small", title: "Jump to latest message", "aria-label": "Jump to latest message"
203+
- if user_signed_in?
204+
= link_to "Jump to unread", "#first-unread", class: "button button-secondary button-small", title: "Jump to first unread message", "aria-label": "Jump to first unread message"
203205

204206
- first_unread_found = false
205207
- @messages.each do |message|

0 commit comments

Comments
 (0)