Improve search page UX

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-01-09 12:51:20 +02:00
parent b49ebf5737
commit fc60c391ae
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
2 changed files with 10 additions and 6 deletions

View file

@ -1,10 +1,10 @@
%ul.nav.nav-pills.append-bottom-20
%ul.nav.nav-tabs.append-bottom-10
%li{class: ("active" if params[:search_code].present?)}
= link_to search_path(params.merge(search_code: true)) do
Repository Code
%li{class: ("active" if params[:search_code].blank?)}
= link_to search_path(params.merge(search_code: nil)) do
Everything else
Issues and Merge requests
.search_results
- if params[:search_code].present?

View file

@ -1,7 +1,11 @@
%fieldset
%legend
Search results
%span.cgray (#{@search_results[:total_results]})
%h4
#{@search_results[:total_results]} results found
- if @project
for #{link_to @project.name_with_namespace, @project}
- elsif @group
for #{link_to @group.name, @group}
%hr
- if @project
= render "project_results"