diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-01 03:10:53 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-04-08 22:37:46 +0300 |
commit | d65d245e06fbe45455e130e2d4ca0ca1d066a8c6 (patch) | |
tree | 37582457af03e9fbc5ac0ea9df2819640e1de365 /app/views | |
parent | 2c0de7aaafd5fb842618bb7fa218e11255363bc8 (diff) |
Add link to diff header too
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/discussions/_discussion.html.haml | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml index f12778be305..47739809108 100644 --- a/app/views/discussions/_discussion.html.haml +++ b/app/views/discussions/_discussion.html.haml @@ -20,24 +20,19 @@ = discussion.author.to_reference started a discussion + - url = discussion_diff_path(discussion) - if discussion.for_commit? && @noteable != discussion.noteable on - commit = discussion.noteable - if commit commit - - anchor = discussion.line_code if discussion.diff_discussion? - = link_to commit.short_id, namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: anchor), class: 'monospace' + = link_to commit.short_id, discussion_diff_path(discussion), class: 'monospace' - else a deleted commit - - elsif discussion.diff_discussion? - on - - if discussion.active? - = link_to 'the diff', discussion_diff_path(discussion) - - else - - merge_request_diff = discussion.latest_merge_request_diff - - if merge_request_diff - = link_to diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, diff_id: merge_request_diff, anchor: discussion.line_code) do - an outdated diff + - else + = conditional_link_to url.present?, url do + - if discussion.active? + the diff - else an outdated diff |