summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-09-16 23:43:26 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-09-16 23:43:26 +0000
commit5fa3aeb02ae4a86f3cb69d91f50571d6f7840f3f (patch)
treefea1cbcf4cea2db6d2e0d81de1f23e814583fbd3 /app
parentfe3692ac1a2ce222e41c9d2f34d80ab8d727830d (diff)
parent0ffacb8e7fe7fe59648452cc19c05b4c5055a217 (diff)
downloadgitlab-ce-5fa3aeb02ae4a86f3cb69d91f50571d6f7840f3f.tar.gz
Merge branch 'search-commit-ui-fix' into 'master'
Fixed commit search UI ## What does this MR do? Fixes the UI for commits in search. If the scope of the search is commits then it renders the list in a `ul` to match the same styling as that on the commits UI. ## Screenshots (if relevant) ![Screen_Shot_2016-09-05_at_15.30.12](/uploads/f567a224be44d5a9b015ac5d1c399bd7/Screen_Shot_2016-09-05_at_15.30.12.png) ## What are the relevant issue numbers? Closes #21868 See merge request !6205
Diffstat (limited to 'app')
-rw-r--r--app/views/search/_results.html.haml16
-rw-r--r--app/views/search/results/_commit.html.haml3
2 files changed, 11 insertions, 8 deletions
diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml
index 252c37532e1..7fe2bce3e7c 100644
--- a/app/views/search/_results.html.haml
+++ b/app/views/search/_results.html.haml
@@ -10,12 +10,16 @@
in group #{link_to @group.name, @group}
.results.prepend-top-10
- .search-results
- - if @scope == 'projects'
- .term
- = render 'shared/projects/list', projects: @search_objects
- - else
- = render partial: "search/results/#{@scope.singularize}", collection: @search_objects
+ - if @scope == 'commits'
+ %ul.list-unstyled
+ = render partial: "search/results/commit", collection: @search_objects
+ - else
+ .search-results
+ - if @scope == 'projects'
+ .term
+ = render 'shared/projects/list', projects: @search_objects
+ - else
+ = render partial: "search/results/#{@scope.singularize}", collection: @search_objects
- if @scope != 'projects'
= paginate(@search_objects, theme: 'gitlab')
diff --git a/app/views/search/results/_commit.html.haml b/app/views/search/results/_commit.html.haml
index 4e6c3965dc6..5b2d83d6b92 100644
--- a/app/views/search/results/_commit.html.haml
+++ b/app/views/search/results/_commit.html.haml
@@ -1,2 +1 @@
-.search-result-row
- = render 'projects/commits/commit', project: @project, commit: commit
+= render 'projects/commits/commit', project: @project, commit: commit