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
Boxiang Sun
gitlab-ce
Commits
42c46f37
Commit
42c46f37
authored
Dec 15, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard tabs restyle, messages if no issue or merge request
parent
ed3f3a0d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
44 deletions
+65
-44
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+12
-3
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+3
-1
app/views/dashboard/_issues_feed.html.haml
app/views/dashboard/_issues_feed.html.haml
+24
-18
app/views/dashboard/_menu.html.haml
app/views/dashboard/_menu.html.haml
+3
-3
app/views/dashboard/_merge_requests_feed.html.haml
app/views/dashboard/_merge_requests_feed.html.haml
+23
-19
No files found.
app/assets/stylesheets/projects.css.scss
View file @
42c46f37
...
@@ -496,14 +496,23 @@ h4.dash-tabs {
...
@@ -496,14 +496,23 @@ h4.dash-tabs {
font-weight
:
bold
;
text-transform
:
uppercase
;
font-weight
:
bold
;
text-transform
:
uppercase
;
background
:
#F7F7F7
;
background
:
#F7F7F7
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
height
:
13px
;
}
}
.dash-button
{
.dash-button
{
margin-right
:
5px
;
border-right
:
1px
solid
#ddd
;
@include
round-borders-all
(
4px
);
border
:
1px
solid
#ddd
;
background
:none
;
background
:none
;
padding
:
10px
15px
;
float
:left
;
position
:relative
;
top
:
-10px
;
left
:
0px
;
height
:
13px
;
&
:first-child
{
border-left
:
1px
solid
#ddd
;
}
&
.active
{
&
.active
{
background
:
#eaeaea
;
background
:
#eaeaea
;
}
}
...
...
app/controllers/dashboard_controller.rb
View file @
42c46f37
...
@@ -11,9 +11,10 @@ class DashboardController < ApplicationController
...
@@ -11,9 +11,10 @@ class DashboardController < ApplicationController
end
end
end
end
# Get authored or assigned open merge requests
def
merge_requests
def
merge_requests
@projects
=
current_user
.
projects
.
all
@projects
=
current_user
.
projects
.
all
@merge_requests
=
current_user
.
assigned_merge_requests
.
order
(
"created_at DESC"
).
limit
(
40
)
@merge_requests
=
MergeRequest
.
where
(
"author_id = :id or assignee_id = :id"
,
:id
=>
current_user
.
id
).
opened
.
order
(
"created_at DESC"
).
limit
(
40
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
...
@@ -21,6 +22,7 @@ class DashboardController < ApplicationController
...
@@ -21,6 +22,7 @@ class DashboardController < ApplicationController
end
end
end
end
# Get only assigned issues
def
issues
def
issues
@projects
=
current_user
.
projects
.
all
@projects
=
current_user
.
projects
.
all
@user
=
current_user
@user
=
current_user
...
...
app/views/dashboard/_issues_feed.html.haml
View file @
42c46f37
#feeds_content_holder
#feeds_content_holder
-
unless
@issues
.
empty?
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.data
.data
-
@issues
.
each
do
|
update
|
-
@issues
.
each
do
|
update
|
%a
.project-update
{
:href
=>
dashboard_feed_path
(
update
.
project
,
update
)}
%a
.project-update
{
:href
=>
dashboard_feed_path
(
update
.
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%strong
.issue-number
=
"#
#{
update
.
id
}
"
%span
.update-title
%span
.update-title
=
truncate
update
.
title
,
:length
=>
50
=
truncate
update
.
title
,
:length
=>
35
.right
=
update
.
project
.
name
.right
=
truncate
update
.
project
.
name
%span
.update-author
%span
.update-author
%strong
=
update
.
author_name
%strong
=
update
.
author_name
authored
authored
...
@@ -18,3 +19,8 @@
...
@@ -18,3 +19,8 @@
-
if
update
.
today?
-
if
update
.
today?
%span
.tag.today
today
%span
.tag.today
today
-
else
%h2
No assigned
%span
.tag.open
open
issues
app/views/dashboard/_menu.html.haml
View file @
42c46f37
%h4
.dash-tabs
%h4
.dash-tabs
=
link_to
"Activities"
,
dashboard_path
,
:remote
=>
true
,
:class
=>
"
button-small
dash-button
#{
"active"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
,
:id
=>
"activities_slide"
=
link_to
"Activities"
,
dashboard_path
,
:remote
=>
true
,
:class
=>
"dash-button
#{
"active"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
,
:id
=>
"activities_slide"
=
link_to
"Issues"
,
dashboard_issues_path
,
:remote
=>
true
,
:class
=>
"
button-small
dash-button
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Issues"
,
dashboard_issues_path
,
:remote
=>
true
,
:class
=>
"dash-button
#{
"active"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Merge Requests"
,
dashboard_merge_requests_path
,
:remote
=>
true
,
:class
=>
"
button-small
dash-button
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
link_to
"Merge Requests"
,
dashboard_merge_requests_path
,
:remote
=>
true
,
:class
=>
"dash-button
#{
"active"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
image_tag
"ajax-loader-facebook.gif"
,
:class
=>
"dashboard-loader"
=
image_tag
"ajax-loader-facebook.gif"
,
:class
=>
"dashboard-loader"
:javascript
:javascript
...
...
app/views/dashboard/_merge_requests_feed.html.haml
View file @
42c46f37
#feeds_content_holder
#feeds_content_holder
-
unless
@merge_requests
.
empty?
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
.data
.data
-
@merge_requests
.
each
do
|
update
|
-
@merge_requests
.
each
do
|
update
|
%a
.project-update
{
:href
=>
project_merge_request_path
(
update
.
project
,
update
)}
%a
.project-update
{
:href
=>
project_merge_request_path
(
update
.
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%span
.update-title
%span
.update-title
-
state
=
update
.
closed
?
'closed'
:
'open'
=
truncate
update
.
title
,
:length
=>
35
%span
.tag
{
:class
=>
state
}
#{
state
.
capitalize
}
.right
=
truncate
update
.
project
.
name
=
truncate
update
.
title
,
:length
=>
70
.right
=
update
.
project
.
name
%span
.update-author
%span
.update-author
%strong
=
update
.
author_name
%strong
=
update
.
author_name
authored
authored
...
@@ -18,3 +17,8 @@
...
@@ -18,3 +17,8 @@
%span
.tag.commit
=
update
.
source_branch
%span
.tag.commit
=
update
.
source_branch
→
→
%span
.tag.commit
=
update
.
target_branch
%span
.tag.commit
=
update
.
target_branch
-
else
%h2
No authored or assigned
%span
.tag.open
open
merge requests
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