Commit c8e6752414010fadeb4516a3d860719666ac7212
Committed by
skv
1 parent
476cd0f7
Exists in
spb-stable
and in
2 other branches
fix link to notes in merge request diff
http://localhost:3000/gitlabhq/gitlab-ci/merge_requests/1/diffs#note_316 scroll in such links doesn't work. It happens because on page there are 2 elements with id="note_316" in changes and discussion. Browser takes first for scroll. This solution works because changes loads without diffs so tag with id="note_316" just one. Diffs loads with discussions, but in this case diff tag would be first. It is dirty but working solution.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/views/projects/merge_requests/_show.html.haml
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | - if @merge_request.closed? |
27 | 27 | = link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-grouped btn-reopen reopen-mr-link", title: "Close merge request" |
28 | 28 | |
29 | - .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } | |
30 | - = render "projects/notes/notes_with_form" | |
31 | 29 | .diffs.tab-content |
32 | 30 | - if current_page?(action: 'diffs') |
33 | 31 | = render "projects/merge_requests/show/diffs" |
32 | + .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } | |
33 | + = render "projects/notes/notes_with_form" | |
34 | 34 | .status |
35 | 35 | |
36 | 36 | :javascript | ... | ... |