diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/dashboard/_filter.html.haml | 32 | ||||
-rw-r--r-- | app/views/dashboard/issues.html.haml | 32 | ||||
-rw-r--r-- | app/views/dashboard/merge_requests.html.haml | 28 |
3 files changed, 66 insertions, 26 deletions
diff --git a/app/views/dashboard/_filter.html.haml b/app/views/dashboard/_filter.html.haml new file mode 100644 index 00000000000..98961b3f373 --- /dev/null +++ b/app/views/dashboard/_filter.html.haml @@ -0,0 +1,32 @@ += form_tag dashboard_filter_path(entity), method: 'get' do + %fieldset.dashboard-search-filter + = search_field_tag "search", nil, { placeholder: 'Search', class: 'search-text-input' } + = button_tag type: 'submit', class: 'btn' do + %i.icon-search + + %fieldset + %legend Status: + %ul.nav.nav-pills.nav-stacked + %li{class: ("active" if !params[:status])} + = link_to dashboard_filter_path(entity) do + Open + %li{class: ("active" if params[:status] == 'closed')} + = link_to dashboard_filter_path(entity, status: 'closed') do + Closed + %li{class: ("active" if params[:status] == 'all')} + = link_to dashboard_filter_path(entity, status: 'all') do + All + + %fieldset + %legend Projects: + %ul.nav.nav-pills.nav-stacked + - @projects.each do |project| + %li{class: ("active" if params[:project_id] == project.id.to_s)} + = link_to dashboard_filter_path(entity, project_id: project.id) do + = project.name_with_namespace + %small.right= project.items_for(entity).where(assignee_id: current_user.id).count + + %fieldset + %hr + = link_to "Reset", dashboard_filter_path(entity), class: 'btn right' + diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index cc488d57e9e..e038582078d 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -3,17 +3,21 @@ %small (assigned to you) %small.right #{@issues.total_count} issues -%br -.clearfix -- if @issues.any? - - @issues.group_by(&:project).each do |group| - %div.ui-box - - @project = group[0] - %h5= @project.name - %ul.unstyled.issues_table - - group[1].each do |issue| - = render(partial: 'issues/show', locals: {issue: issue}) - %hr - = paginate @issues, theme: "gitlab" -- else - %h3.nothing_here_message Nothing to show here +%hr + +.row + .span3 + = render 'filter', entity: 'issue' + .span9 + - if @issues.any? + - @issues.group_by(&:project).each do |group| + %div.ui-box + - @project = group[0] + %h5= @project.name + %ul.unstyled.issues_table + - group[1].each do |issue| + = render(partial: 'issues/show', locals: {issue: issue}) + %hr + = paginate @issues, theme: "gitlab" + - else + %p.nothing_here_message Nothing to show here diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index 23a7e7222d7..8454cfdc120 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -3,16 +3,20 @@ %small (authored by or assigned to you) %small.right #{@merge_requests.total_count} merge requests -%br -- if @merge_requests.any? - - @merge_requests.group_by(&:project).each do |group| - %ul.unstyled.ui-box - - @project = group[0] - %h5= @project.name - - group[1].each do |merge_request| - = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request}) - %hr - = paginate @merge_requests, theme: "gitlab" +%hr +.row + .span3 + = render 'filter', entity: 'merge_request' + .span9 + - if @merge_requests.any? + - @merge_requests.group_by(&:project).each do |group| + %ul.unstyled.ui-box + - @project = group[0] + %h5= @project.name + - group[1].each do |merge_request| + = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request}) + %hr + = paginate @merge_requests, theme: "gitlab" -- else - %h3.nothing_here_message Nothing to show here + - else + %h3.nothing_here_message Nothing to show here |