Commit 39cc9a01 authored by Sean McGivern's avatar Sean McGivern

Merge branch...

Merge branch '1639-show-project-names-for-commit-search-result-with-elasticsearch-global-search' into 'master'

Shows project names for commit elastic search global search

Closes #1639

See merge request !2434
parents e7656dd9 58fc52e1
...@@ -178,6 +178,10 @@ ...@@ -178,6 +178,10 @@
.merge-request-branches & { .merge-request-branches & {
flex-direction: column; flex-direction: column;
} }
.project_namespace {
color: $gl-text-color-secondary;
}
} }
.commit-content { .commit-content {
......
- ref = local_assigns.fetch(:ref) - ref = local_assigns.fetch(:ref)
- show_project_name = local_assigns.fetch(:show_project_name, false)
- if @note_counts - if @note_counts
- note_count = @note_counts.fetch(commit.id, 0) - note_count = @note_counts.fetch(commit.id, 0)
- else - else
...@@ -34,6 +35,9 @@ ...@@ -34,6 +35,9 @@
- commit_timeago = time_ago_with_tooltip(commit.committed_date) - commit_timeago = time_ago_with_tooltip(commit.committed_date)
- commit_text = _('%{commit_author_link} committed %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago } - commit_text = _('%{commit_author_link} committed %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago }
#{ commit_text.html_safe } #{ commit_text.html_safe }
- if show_project_name
%span.project_namespace
= project.name_with_namespace
.commit-actions.flex-row.hidden-xs .commit-actions.flex-row.hidden-xs
......
= render 'projects/commits/commit', project: commit.project, commit: commit, ref: nil = render 'projects/commits/commit', project: commit.project, commit: commit, ref: nil, show_project_name: true
---
title: Shows project names for commits in elasticsearch global search
merge_request: 2434
author:
...@@ -93,6 +93,7 @@ feature 'Global elastic search', feature: true do ...@@ -93,6 +93,7 @@ feature 'Global elastic search', feature: true do
select_filter("Commits") select_filter("Commits")
expect(page).to have_selector('.commit-row-description') expect(page).to have_selector('.commit-row-description')
expect(page).to have_selector('.project_namespace')
end end
end end
end end
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