summaryrefslogtreecommitdiff
path: root/app/views/search
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-09 11:46:32 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-09 11:47:09 +0300
commit6e1ee1fea6400c3621005f1b79e1b8dab43cd000 (patch)
tree73cf78caa2e2eb31ff2003b4c2f3285b54c7aac3 /app/views/search
parentf1126f494cf4fb2b27c43ac3d3bd69fea9c4afe4 (diff)
downloadgitlab-ce-6e1ee1fea6400c3621005f1b79e1b8dab43cd000.tar.gz
made some ui enhancement for search page
Diffstat (limited to 'app/views/search')
-rw-r--r--app/views/search/_filter.html.haml49
-rw-r--r--app/views/search/show.html.haml14
2 files changed, 40 insertions, 23 deletions
diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml
index a523fa254df..f7a00b23480 100644
--- a/app/views/search/_filter.html.haml
+++ b/app/views/search/_filter.html.haml
@@ -1,16 +1,35 @@
-%fieldset
- %legend Groups:
- .clearfix
- = select_tag 'group_id', options_from_collection_for_select(current_user.authorized_groups, :id, :name, params[:group_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
-
-
-%fieldset
- %legend Teams:
- .clearfix
- = select_tag 'team_id', options_from_collection_for_select(current_user.authorized_teams, :id, :name, params[:team_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
-
-%fieldset
- %legend Projects:
- .clearfix
- = select_tag 'project_id', options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace, params[:project_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
+.dropdown.inline
+ %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %i.icon-tags
+ %span.light Group:
+ - if @group.present?
+ %strong= @group.name
+ - else
+ Any
+ %b.caret
+ %ul.dropdown-menu
+ %li
+ = link_to search_path(group_id: nil) do
+ Any
+ - current_user.authorized_groups.sort_by(&:name).each do |group|
+ %li
+ = link_to search_path(group_id: group.id, search: params[:search]) do
+ = group.name
+.dropdown.inline.prepend-left-10
+ %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %i.icon-tags
+ %span.light Project:
+ - if @project.present?
+ %strong= @project.name_with_namespace
+ - else
+ Any
+ %b.caret
+ %ul.dropdown-menu
+ %li
+ = link_to search_path(project_id: nil) do
+ Any
+ - current_user.authorized_projects.sort_by(&:name_with_namespace).each do |project|
+ %li
+ = link_to search_path(project_id: project.id, search: params[:search]) do
+ = project.name_with_namespace
diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml
index c057459a746..6e343b216da 100644
--- a/app/views/search/show.html.haml
+++ b/app/views/search/show.html.haml
@@ -6,11 +6,9 @@
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
= hidden_field_tag :search_code, params[:search_code]
= submit_tag 'Search', class: "btn btn-primary wide"
- .clearfix
- .row
- .span3
- = render 'filter', f: f
- .span9
- .results
- - if params[:search].present?
- = render 'search/result'
+ .prepend-top-10
+ = render 'filter', f: f
+
+ .results.prepend-top-10
+ - if params[:search].present?
+ = render 'search/result'