summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-07-31 00:07:40 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2014-08-11 11:34:45 +0200
commitf361be9eca790c444c9a95c98fe8e5f95e1d7f95 (patch)
tree79e77f0ac0ff12f2f2dce6959cd0312f17e7cddb
parentda7e14c864eb039ffe1c06409681721892917b71 (diff)
downloadgitlab-ce-f361be9eca790c444c9a95c98fe8e5f95e1d7f95.tar.gz
Restyle search page
Use ruby 1.9 syntax
-rw-r--r--app/assets/stylesheets/generic/common.scss15
-rw-r--r--app/views/search/_project_results.html.haml13
-rw-r--r--app/views/search/results/_empty.html.haml4
3 files changed, 27 insertions, 5 deletions
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index 991561cd503..9d3c9f372a9 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -341,3 +341,18 @@ table {
.footer-links a {
margin-right: 15px;
}
+
+.search_box {
+ position: relative;
+ padding: 30px;
+ text-align: center;
+ background-color: #F9F9F9;
+ border: 1px solid #DDDDDD;
+ border-radius: 0px;
+}
+
+.search_glyph {
+ color: #555;
+ font-size: 42px;
+}
+
diff --git a/app/views/search/_project_results.html.haml b/app/views/search/_project_results.html.haml
index 1fc1bf19560..751824dce4a 100644
--- a/app/views/search/_project_results.html.haml
+++ b/app/views/search/_project_results.html.haml
@@ -13,9 +13,12 @@
= render partial: "search/results/blob", collection: @search_results[:blobs]
= paginate @search_results[:blobs], theme: 'gitlab'
- else
- %span We couldn't find any matching code
+ = render partial: "search/results/empty", :locals => { message: "We couldn't find any matching code" }
- else
- %ul.bordered-list
- = render partial: "search/results/merge_request", collection: @search_results[:merge_requests]
- = render partial: "search/results/issue", collection: @search_results[:issues]
- = render partial: "search/results/note", collection: @search_results[:notes]
+ - if (@search_results[:merge_requests] || @search_results[:issues] || @search_results[:notes]).length > 0
+ %ul.bordered-list
+ = render partial: "search/results/merge_request", collection: @search_results[:merge_requests]
+ = render partial: "search/results/issue", collection: @search_results[:issues]
+ = render partial: "search/results/note", collection: @search_results[:notes]
+ - else
+ = render partial: "search/results/empty", :locals => { message: "We couldn't find any issues, merge requests or notes" }
diff --git a/app/views/search/results/_empty.html.haml b/app/views/search/results/_empty.html.haml
new file mode 100644
index 00000000000..3615f6ae52a
--- /dev/null
+++ b/app/views/search/results/_empty.html.haml
@@ -0,0 +1,4 @@
+.search_box
+ .search_glyph
+ %span.icon-search
+ %h4 #{message}