Commit 667edcdd7534206761fc9524e6eaa17f1c27b815
1 parent
88974b50
Exists in
master
and in
4 other branches
Dashboard issues/mr pages improved
Showing
4 changed files
with
43 additions
and
7 deletions
Show diff stats
app/assets/stylesheets/common.scss
@@ -406,6 +406,9 @@ img.lil_av { | @@ -406,6 +406,9 @@ img.lil_av { | ||
406 | border-bottom: 1px solid #eee; | 406 | border-bottom: 1px solid #eee; |
407 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); | 407 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); |
408 | cursor:pointer; | 408 | cursor:pointer; |
409 | + &.smoke { | ||
410 | + background-color:#f5f5f5; | ||
411 | + } | ||
409 | &:hover { | 412 | &:hover { |
410 | background:$hover; | 413 | background:$hover; |
411 | } | 414 | } |
app/controllers/dashboard_controller.rb
@@ -19,15 +19,14 @@ class DashboardController < ApplicationController | @@ -19,15 +19,14 @@ class DashboardController < ApplicationController | ||
19 | # Get authored or assigned open merge requests | 19 | # Get authored or assigned open merge requests |
20 | def merge_requests | 20 | def merge_requests |
21 | @projects = current_user.projects.all | 21 | @projects = current_user.projects.all |
22 | - @merge_requests = current_user.cared_merge_requests.order("created_at DESC").limit(40) | 22 | + @merge_requests = current_user.cared_merge_requests.order("created_at DESC").page(params[:page]).per(20) |
23 | end | 23 | end |
24 | 24 | ||
25 | # Get only assigned issues | 25 | # Get only assigned issues |
26 | def issues | 26 | def issues |
27 | @projects = current_user.projects.all | 27 | @projects = current_user.projects.all |
28 | @user = current_user | 28 | @user = current_user |
29 | - @issues = current_user.assigned_issues.opened.order("created_at DESC").limit(40) | ||
30 | - | 29 | + @issues = current_user.assigned_issues.opened.order("created_at DESC").page(params[:page]).per(20) |
31 | @issues = @issues.includes(:author, :project) | 30 | @issues = @issues.includes(:author, :project) |
32 | 31 | ||
33 | respond_to do |format| | 32 | respond_to do |format| |
app/views/dashboard/issues.html.haml
@@ -3,5 +3,22 @@ | @@ -3,5 +3,22 @@ | ||
3 | %small (assigned to you) | 3 | %small (assigned to you) |
4 | 4 | ||
5 | %br | 5 | %br |
6 | -- if @issues.any? | ||
7 | - .ui-box= render "dashboard/issues_feed" | 6 | +%div#issues-table-holder.ui-box |
7 | + %title | ||
8 | + %ul#issues-table.unstyled | ||
9 | + - if @issues.any? | ||
10 | + - @issues.group_by(&:project).each do |group| | ||
11 | + %li.wll.smoke | ||
12 | + - project = group[0] | ||
13 | + = project.name | ||
14 | + - group[1].each do |issue| | ||
15 | + = render(:partial => 'issues/show', :locals => {:issue => issue}) | ||
16 | + %li.bottom | ||
17 | + .row | ||
18 | + .span10= paginate @issues, :theme => "gitlab" | ||
19 | + .span4.right | ||
20 | + %span.cgray.right #{@issues.total_count} issues | ||
21 | + | ||
22 | + - else | ||
23 | + %li | ||
24 | + %p.padded Nothing to show here |
app/views/dashboard/merge_requests.html.haml
@@ -3,5 +3,22 @@ | @@ -3,5 +3,22 @@ | ||
3 | %small (authored or assigned to you) | 3 | %small (authored or assigned to you) |
4 | 4 | ||
5 | %br | 5 | %br |
6 | -- if @merge_requests.any? | ||
7 | - .ui-box= render "dashboard/merge_requests_feed" | 6 | +%div#merge_requests-table-holder.ui-box |
7 | + %title | ||
8 | + %ul#merge_requests-table.unstyled | ||
9 | + - if @merge_requests.any? | ||
10 | + - @merge_requests.group_by(&:project).each do |group| | ||
11 | + %li.wll.smoke | ||
12 | + - project = group[0] | ||
13 | + = project.name | ||
14 | + - group[1].each do |merge_request| | ||
15 | + = render(:partial => 'merge_requests/merge_request', :locals => {:merge_request => merge_request}) | ||
16 | + %li.bottom | ||
17 | + .row | ||
18 | + .span10= paginate @merge_requests, :theme => "gitlab" | ||
19 | + .span4.right | ||
20 | + %span.cgray.right #{@merge_requests.total_count} merge requests | ||
21 | + | ||
22 | + - else | ||
23 | + %li | ||
24 | + %p.padded Nothing to show here |