Commit 3b660be6ee79d75ab3e287411a0cdb01bf63c722

Authored by Dmitriy Zaporozhets
1 parent 7406494a

REmove duplicating search on dashboard issues/mr

app/controllers/dashboard_controller.rb
@@ -35,8 +35,6 @@ class DashboardController < ApplicationController @@ -35,8 +35,6 @@ class DashboardController < ApplicationController
35 current_user.authorized_projects 35 current_user.authorized_projects
36 end.sorted_by_activity 36 end.sorted_by_activity
37 37
38 - @projects = @projects.search(params[:search]) if params[:search].present?  
39 -  
40 @labels = current_user.authorized_projects.tags_on(:labels) 38 @labels = current_user.authorized_projects.tags_on(:labels)
41 39
42 @projects = @projects.tagged_with(params[:label]) if params[:label].present? 40 @projects = @projects.tagged_with(params[:label]) if params[:label].present?
app/views/dashboard/_filter.html.haml
1 = form_tag dashboard_filter_path(entity), method: 'get' do 1 = form_tag dashboard_filter_path(entity), method: 'get' do
2 - %fieldset.dashboard-search-filter  
3 - = search_field_tag "search", params[:search], { id: 'filter_search', placeholder: 'Search', class: 'search-text-input' }  
4 - = button_tag type: 'submit', class: 'btn' do  
5 - %i.icon-search  
6 -  
7 %fieldset 2 %fieldset
8 - %legend Status:  
9 %ul.nav.nav-pills.nav-stacked 3 %ul.nav.nav-pills.nav-stacked
10 %li{class: ("active" if !params[:status])} 4 %li{class: ("active" if !params[:status])}
11 = link_to dashboard_filter_path(entity, status: nil) do 5 = link_to dashboard_filter_path(entity, status: nil) do
app/views/dashboard/issues.html.haml
1 %h3.page_title 1 %h3.page_title
2 Issues 2 Issues
3 - %small (assigned to you)  
4 - %small.pull-right #{@issues.total_count} issues 3 + %span.light
  4 + –
  5 + Assigned to you
  6 + %span.pull-right #{@issues.total_count} issues
5 7
6 -%hr 8 +%br
7 9
8 .row 10 .row
9 .span3 11 .span3
app/views/dashboard/merge_requests.html.haml
1 %h3.page_title 1 %h3.page_title
2 Merge Requests 2 Merge Requests
3 - %small (authored by or assigned to you)  
4 - %small.pull-right #{@merge_requests.total_count} merge requests 3 + %span.light
  4 + –
  5 + Authored by or assigned to you
  6 + %span.pull-right #{@merge_requests.total_count} merge requests
5 7
6 -%hr 8 +%br
7 .row 9 .row
8 .span3 10 .span3
9 = render 'filter', entity: 'merge_request' 11 = render 'filter', entity: 'merge_request'