Fix views after rebase
This commit is contained in:
parent
f112f81d3d
commit
a8339fe1aa
2 changed files with 5 additions and 3 deletions
|
@ -61,7 +61,7 @@ module NotesHelper
|
|||
end
|
||||
|
||||
def discussion_diff_path(discussion)
|
||||
if discussion.for_merge_request?
|
||||
if discussion.for_merge_request? && discussion.diff_discussion?
|
||||
if discussion.active?
|
||||
# Without a diff ID, the link always points to the latest diff version
|
||||
diff_id = nil
|
||||
|
@ -75,7 +75,9 @@ module NotesHelper
|
|||
|
||||
diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, diff_id: diff_id, anchor: discussion.line_code)
|
||||
elsif discussion.for_commit?
|
||||
namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code)
|
||||
anchor = discussion.line_code if discussion.diff_discussion?
|
||||
|
||||
namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: anchor)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
= link_to commit.short_id, url, class: 'monospace'
|
||||
- else
|
||||
a deleted commit
|
||||
- else
|
||||
- elsif discussion.diff_discussion?
|
||||
= conditional_link_to url.present?, url do
|
||||
- if discussion.active?
|
||||
the diff
|
||||
|
|
Loading…
Reference in a new issue