Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-01 17:15:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-01 17:15:38 +0300
commit28b374eea4e2890514067ac7875b4c1d252c5cdd (patch)
tree9fe30ae35df4b83cee000e1a0880b390d88d80f0 /app/views
parentc8fd9c521b89b98797cfd6e3a51cae6955129c20 (diff)
Add latest changes from gitlab-org/gitlab@15-3-stable-ee
Diffstat (limited to 'app/views')
-rw-r--r--app/views/events/event/_common.html.haml2
-rw-r--r--app/views/shared/_file_highlight.html.haml11
2 files changed, 5 insertions, 8 deletions
diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml
index 93c6efc9083..1f6ac29bffc 100644
--- a/app/views/events/event/_common.html.haml
+++ b/app/views/events/event/_common.html.haml
@@ -8,7 +8,7 @@
%span.event-type.d-inline-block.gl-mr-2{ class: event.action_name }
= event.action_name
%span.event-target-type.gl-mr-2= event.target_type_name
- = link_to event.target_link_options, class: 'has-tooltip event-target-link gl-mr-2', title: event.target_title do
+ = link_to event_target_path(event), class: 'has-tooltip event-target-link gl-mr-2', title: event.target_title do
= event.target.reference_link_text
- unless event.milestone?
%span.event-target-title.gl-text-overflow-ellipsis.gl-overflow-hidden.gl-mr-2{ dir: "auto" }
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml
index 23a17c07ea8..130e73a069f 100644
--- a/app/views/shared/_file_highlight.html.haml
+++ b/app/views/shared/_file_highlight.html.haml
@@ -1,17 +1,14 @@
#blob-content.file-content.code.js-syntax-highlight
- offset = defined?(first_line_number) ? first_line_number : 1
- .line-numbers{ class: "gl-p-0\!" }
+ - blame_path = project_blame_path(@project, tree_join(@ref, blob.path))
+ .line-numbers{ class: "gl-px-0!", data: { blame_path: blame_path } }
- if blob.data.present?
- link = blob_link if defined?(blob_link)
- - blame_link = project_blame_path(@project, tree_join(@ref, blob.path))
- blob.data.each_line.each_with_index do |_, index|
- i = index + offset
-# We're not using `link_to` because it is too slow once we get to thousands of lines.
- .line-links.diff-line-num
- - if Feature.enabled?(:file_line_blame)
- %a.file-line-blame{ href: "#{blame_link}#L#{i}" }
- %a.file-line-num{ href: "#{link}#L#{i}", id: "L#{i}", 'data-line-number' => i }
- = i
+ %a.file-line-num.diff-line-num{ class: ("js-line-links" if Feature.enabled?(:file_line_blame)), href: "#{link}#L#{i}", id: "L#{i}", 'data-line-number' => i }
+ = i
- highlight = defined?(highlight_line) && highlight_line ? highlight_line - offset : nil
.blob-content{ data: { blob_id: blob.id, path: blob.path, highlight_line: highlight, qa_selector: 'file_content' } }
%pre.code.highlight