BigW Consortium Gitlab

Commit a8339fe1 by Douwe Maan

Fix views after rebase

parent f112f81d
...@@ -61,7 +61,7 @@ module NotesHelper ...@@ -61,7 +61,7 @@ module NotesHelper
end end
def discussion_diff_path(discussion) def discussion_diff_path(discussion)
if discussion.for_merge_request? if discussion.for_merge_request? && discussion.diff_discussion?
if discussion.active? if discussion.active?
# Without a diff ID, the link always points to the latest diff version # Without a diff ID, the link always points to the latest diff version
diff_id = nil diff_id = nil
...@@ -75,7 +75,9 @@ module NotesHelper ...@@ -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) 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? 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 end
end end
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
= link_to commit.short_id, url, class: 'monospace' = link_to commit.short_id, url, class: 'monospace'
- else - else
a deleted commit a deleted commit
- else - elsif discussion.diff_discussion?
= conditional_link_to url.present?, url do = conditional_link_to url.present?, url do
- if discussion.active? - if discussion.active?
the diff the diff
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment