Commit ffdfdc27 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Expand abbreviations in merge request version path helper

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent a449124a
...@@ -101,7 +101,7 @@ module MergeRequestsHelper ...@@ -101,7 +101,7 @@ module MergeRequestsHelper
return 'hidden' if merge_request.closed? == closed || (merge_request.merged? == closed && !merge_request.closed?) || merge_request.closed_without_fork? return 'hidden' if merge_request.closed? == closed || (merge_request.merged? == closed && !merge_request.closed?) || merge_request.closed_without_fork?
end end
def mr_version_path(project, merge_request, merge_request_diff, start_sha = nil) def merge_request_version_path(project, merge_request, merge_request_diff, start_sha = nil)
diffs_namespace_project_merge_request_path( diffs_namespace_project_merge_request_path(
project.namespace, project, merge_request, project.namespace, project, merge_request,
diff_id: merge_request_diff.id, start_sha: start_sha) diff_id: merge_request_diff.id, start_sha: start_sha)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
%ul.dropdown-menu.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-selectable
- @merge_request_diffs.each_with_index do |merge_request_diff, i| - @merge_request_diffs.each_with_index do |merge_request_diff, i|
%li %li
= link_to mr_version_path(@project, @merge_request, merge_request_diff), class: ('is-active' if merge_request_diff == @merge_request_diff) do = link_to merge_request_version_path(@project, @merge_request, merge_request_diff), class: ('is-active' if merge_request_diff == @merge_request_diff) do
%strong.monospace %strong.monospace
- if i.zero? - if i.zero?
Latest: Latest:
...@@ -38,14 +38,14 @@ ...@@ -38,14 +38,14 @@
%ul.dropdown-menu.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-selectable
- @comparable_diffs.each_with_index do |merge_request_diff, i| - @comparable_diffs.each_with_index do |merge_request_diff, i|
%li %li
= link_to mr_version_path(@project, @merge_request, @merge_request_diff, merge_request_diff.head_commit_sha), class: ('is-active' if merge_request_diff.head_commit_sha == @start_sha) do = link_to merge_request_version_path(@project, @merge_request, @merge_request_diff, merge_request_diff.head_commit_sha), class: ('is-active' if merge_request_diff.head_commit_sha == @start_sha) do
%strong.monospace %strong.monospace
#{@comparable_diffs.size - i}. #{short_sha(merge_request_diff.head_commit_sha)} #{@comparable_diffs.size - i}. #{short_sha(merge_request_diff.head_commit_sha)}
%br %br
%small %small
= time_ago_with_tooltip(merge_request_diff.created_at) = time_ago_with_tooltip(merge_request_diff.created_at)
%li %li
= link_to mr_version_path(@project, @merge_request, @merge_request_diff), class: ('is-active' unless @start_sha) do = link_to merge_request_version_path(@project, @merge_request, @merge_request_diff), class: ('is-active' unless @start_sha) do
%strong.monospace %strong.monospace
Base: #{short_sha(@merge_request_diff.base_commit_sha)} Base: #{short_sha(@merge_request_diff.base_commit_sha)}
......
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