Stop disabling jump_to_next buttons, when not on latest MR diff.

This commit is contained in:
Bryce Johnson 2016-09-21 16:01:16 +02:00
parent 8e4b849974
commit f4f6f92ce8

View file

@ -1,4 +1,3 @@
- diff_notes_disabled = (@merge_request_diff.latest? && !!@start_sha) if @merge_request_diff
- discussion = local_assigns.fetch(:discussion, nil)
- if current_user
%jump-to-discussion{ "inline-template" => true, ":discussion-id" => "'#{discussion.try(:id)}'" }
@ -6,6 +5,5 @@
%button.btn.btn-default.discussion-next-btn.has-tooltip{ "@click" => "jumpToNextUnresolvedDiscussion",
title: "Jump to next unresolved discussion",
"aria-label" => "Jump to next unresolved discussion",
data: { container: "body" },
disabled: diff_notes_disabled }
data: { container: "body" }}
= custom_icon("next_discussion")