summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-04-06 18:18:53 -0500
committerDouwe Maan <douwe@selenight.nl>2017-04-08 14:37:46 -0500
commita8339fe1aa95d489e00cb0b79a20557d711639ec (patch)
tree941fafaa5709c333a06981b5068f151fa0c56eb0
parentf112f81d3d463a81c8b5e9225d5e9bb40e82abe8 (diff)
downloadgitlab-ce-a8339fe1aa95d489e00cb0b79a20557d711639ec.tar.gz
Fix views after rebase
-rw-r--r--app/helpers/notes_helper.rb6
-rw-r--r--app/views/discussions/_discussion.html.haml2
2 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 6f4ba79b80b..c831f89dc19 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -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
diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml
index 0ee27b6ff20..f48dc575661 100644
--- a/app/views/discussions/_discussion.html.haml
+++ b/app/views/discussions/_discussion.html.haml
@@ -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