Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
7f76d6cf
Commit
7f76d6cf
authored
Mar 16, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
counters for dashboard panel
parent
5d2bd5ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+12
-0
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-1
app/models/user.rb
app/models/user.rb
+4
-0
app/views/layouts/_app_menu.html.haml
app/views/layouts/_app_menu.html.haml
+6
-2
No files found.
app/assets/stylesheets/common.scss
View file @
7f76d6cf
...
...
@@ -43,6 +43,18 @@ a:focus {
background-color
:
#474D57
;
}
.pretty_label
{
@include
round-borders-all
(
4px
);
padding
:
2px
4px
;
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
26
,
color-stop
(
0
.076
,
#fefefe
)
,
to
(
#F6F7F8
));
background-image
:
-webkit-linear-gradient
(
#fefefe
7
.6%
,
#F6F7F8
);
background-image
:
-moz-linear-gradient
(
#fefefe
7
.6%
,
#F6F7F8
);
background-image
:
-o-linear-gradient
(
#fefefe
7
.6%
,
#F6F7F8
);
color
:
#777
;
border
:
1px
solid
#DEDFE1
;
}
.tabs
>
li
>
a
,
.pills
>
li
>
a
{
color
:
$style_color
;
}
...
...
app/controllers/dashboard_controller.rb
View file @
7f76d6cf
...
...
@@ -18,7 +18,7 @@ class DashboardController < ApplicationController
# Get authored or assigned open merge requests
def
merge_requests
@projects
=
current_user
.
projects
.
all
@merge_requests
=
MergeRequest
.
where
(
"author_id = :id or assignee_id = :id"
,
:id
=>
current_user
.
id
).
opened
.
order
(
"created_at DESC"
).
limit
(
40
)
@merge_requests
=
current_user
.
cared_merge_requests
.
order
(
"created_at DESC"
).
limit
(
40
)
end
# Get only assigned issues
...
...
app/models/user.rb
View file @
7f76d6cf
...
...
@@ -86,6 +86,10 @@ class User < ActiveRecord::Base
)
end
end
def
cared_merge_requests
MergeRequest
.
where
(
"author_id = :id or assignee_id = :id"
,
:id
=>
self
.
id
).
opened
end
end
# == Schema Information
#
...
...
app/views/layouts/_app_menu.html.haml
View file @
7f76d6cf
...
...
@@ -2,6 +2,10 @@
=
render
"layouts/const_menu_links"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"current"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Search"
,
search_path
,
:class
=>
"
#{
"current"
if
current_page?
(
search_path
)
}
"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
link_to
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
=
link_to
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
do
Requests
%span
.count
=
current_user
.
cared_merge_requests
.
count
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"current"
if
controller
.
controller_name
==
"help"
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment