BigW Consortium Gitlab

Commit 667edcdd by Dmitriy Zaporozhets

Dashboard issues/mr pages improved

parent 88974b50
......@@ -406,6 +406,9 @@ img.lil_av {
border-bottom: 1px solid #eee;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
cursor:pointer;
&.smoke {
background-color:#f5f5f5;
}
&:hover {
background:$hover;
}
......
......@@ -19,15 +19,14 @@ class DashboardController < ApplicationController
# Get authored or assigned open merge requests
def merge_requests
@projects = current_user.projects.all
@merge_requests = current_user.cared_merge_requests.order("created_at DESC").limit(40)
@merge_requests = current_user.cared_merge_requests.order("created_at DESC").page(params[:page]).per(20)
end
# Get only assigned issues
def issues
@projects = current_user.projects.all
@user = current_user
@issues = current_user.assigned_issues.opened.order("created_at DESC").limit(40)
@issues = current_user.assigned_issues.opened.order("created_at DESC").page(params[:page]).per(20)
@issues = @issues.includes(:author, :project)
respond_to do |format|
......
......@@ -3,5 +3,22 @@
%small (assigned to you)
%br
- if @issues.any?
.ui-box= render "dashboard/issues_feed"
%div#issues-table-holder.ui-box
%title
%ul#issues-table.unstyled
- if @issues.any?
- @issues.group_by(&:project).each do |group|
%li.wll.smoke
- project = group[0]
= project.name
- group[1].each do |issue|
= render(:partial => 'issues/show', :locals => {:issue => issue})
%li.bottom
.row
.span10= paginate @issues, :theme => "gitlab"
.span4.right
%span.cgray.right #{@issues.total_count} issues
- else
%li
%p.padded Nothing to show here
......@@ -3,5 +3,22 @@
%small (authored or assigned to you)
%br
- if @merge_requests.any?
.ui-box= render "dashboard/merge_requests_feed"
%div#merge_requests-table-holder.ui-box
%title
%ul#merge_requests-table.unstyled
- if @merge_requests.any?
- @merge_requests.group_by(&:project).each do |group|
%li.wll.smoke
- project = group[0]
= project.name
- group[1].each do |merge_request|
= render(:partial => 'merge_requests/merge_request', :locals => {:merge_request => merge_request})
%li.bottom
.row
.span10= paginate @merge_requests, :theme => "gitlab"
.span4.right
%span.cgray.right #{@merge_requests.total_count} merge requests
- else
%li
%p.padded Nothing to show here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment