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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
376bec26
Commit
376bec26
authored
Feb 28, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added dashboard page. Projects page not root from now
parent
34e15801
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
141 additions
and
39 deletions
+141
-39
app/assets/images/Gear-UI.PNG
app/assets/images/Gear-UI.PNG
+0
-0
app/assets/images/admin.PNG
app/assets/images/admin.PNG
+0
-0
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+28
-2
app/assets/stylesheets/ui_basic.scss
app/assets/stylesheets/ui_basic.scss
+24
-5
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+7
-0
app/views/dashboard/_projects_feed.html.haml
app/views/dashboard/_projects_feed.html.haml
+8
-17
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+56
-3
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+2
-2
app/views/dashboard/merge_requests.html.haml
app/views/dashboard/merge_requests.html.haml
+2
-2
app/views/layouts/_app_menu.html.haml
app/views/layouts/_app_menu.html.haml
+1
-1
app/views/layouts/_const_menu_links.html.haml
app/views/layouts/_const_menu_links.html.haml
+1
-1
app/views/layouts/_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+5
-1
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-3
app/views/projects/_tile.html.haml
app/views/projects/_tile.html.haml
+1
-1
app/views/projects/index.html.haml
app/views/projects/index.html.haml
+4
-0
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/assets/images/Gear-UI.PNG
deleted
100644 → 0
View file @
34e15801
940 Bytes
app/assets/images/admin.PNG
0 → 100644
View file @
376bec26
556 Bytes
app/assets/stylesheets/common.scss
View file @
376bec26
...
@@ -40,6 +40,7 @@ a {
...
@@ -40,6 +40,7 @@ a {
.cred
{
color
:
#D12F19
;
}
.cred
{
color
:
#D12F19
;
}
.cgreen
{
color
:
#44aa22
;
}
.cgreen
{
color
:
#44aa22
;
}
.cblack
{
color
:
#111
;
}
.cblack
{
color
:
#111
;
}
.cwhite
{
color
:
#fff
!
important
}
/** COMMON STYLES **/
/** COMMON STYLES **/
.left
{
.left
{
...
@@ -75,6 +76,10 @@ a {
...
@@ -75,6 +76,10 @@ a {
.no-borders
{
.no-borders
{
border
:none
;
border
:none
;
}
}
table
.no-borders
{
border
:none
;
tr
,
td
{
border
:none
}
}
.no-padding
{
.no-padding
{
padding
:
0
!
important
;
padding
:
0
!
important
;
}
}
...
@@ -433,7 +438,7 @@ input.git_clone_url {
...
@@ -433,7 +438,7 @@ input.git_clone_url {
}
}
.project_list_url
{
.project_list_url
{
width
:
2
7
0px
;
width
:
2
5
0px
;
background
:
#fff
!
important
;
background
:
#fff
!
important
;
}
}
...
@@ -441,7 +446,7 @@ input.git_clone_url {
...
@@ -441,7 +446,7 @@ input.git_clone_url {
@include
shade
;
@include
shade
;
@include
round-borders-all
(
4px
);
@include
round-borders-all
(
4px
);
margin-bottom
:
20px
;
margin-bottom
:
20px
;
width
:
33
8px
;
width
:
29
8px
;
float
:left
;
float
:left
;
margin-left
:
20px
;
margin-left
:
20px
;
border
:
1px
solid
#DDD
;
border
:
1px
solid
#DDD
;
...
@@ -600,3 +605,24 @@ p.time {
...
@@ -600,3 +605,24 @@ p.time {
font-size
:
90%
;
font-size
:
90%
;
margin
:
30px
3px
3px
2px
;
margin
:
30px
3px
3px
2px
;
}
}
.dashboard_category
{
margin-bottom
:
30px
;
.dashboard_block
{
width
:
700px
;
margin
:auto
;
.wll
{
border
:none
;
&
:hover
{
background
:none
;
}
h4
{
color
:
#666
;
}
}
}
}
app/assets/stylesheets/ui_basic.scss
View file @
376bec26
...
@@ -57,11 +57,30 @@
...
@@ -57,11 +57,30 @@
text-shadow
:
0
1px
1px
#FFF
;
text-shadow
:
0
1px
1px
#FFF
;
}
}
&
.home
{
img
{
img
{
float
:
left
;
float
:
left
;
position
:
relative
;
position
:
relative
;
top
:
-9px
;
top
:
-9px
;
width
:
46px
;
width
:
46px
;
}
}
&
.admin_link
{
width
:
16px
;
height
:
16px
;
padding
:
5px
;
border
:
1px
solid
#ccc
;
border-radius
:
4px
;
margin
:
0px
;
background
:
#eee
;
margin-left
:
20px
;
&
:hover
{
background
:
#f7f7f7
;
}
img
{
width
:
16px
;
}
}
}
}
}
}
}
...
...
app/controllers/dashboard_controller.rb
View file @
376bec26
...
@@ -3,7 +3,14 @@ class DashboardController < ApplicationController
...
@@ -3,7 +3,14 @@ class DashboardController < ApplicationController
def
index
def
index
@projects
=
current_user
.
projects
.
all
@projects
=
current_user
.
projects
.
all
@active_projects
=
@projects
.
select
(
&
:repo_exists?
).
select
(
&
:last_activity_date_cached
).
sort_by
(
&
:last_activity_date_cached
).
reverse
@active_projects
=
@projects
.
select
(
&
:repo_exists?
).
select
(
&
:last_activity_date_cached
).
sort_by
(
&
:last_activity_date_cached
).
reverse
@merge_requests
=
MergeRequest
.
where
(
"author_id = :id or assignee_id = :id"
,
:id
=>
current_user
.
id
).
opened
.
order
(
"created_at DESC"
).
limit
(
10
)
@user
=
current_user
@issues
=
current_user
.
assigned_issues
.
opened
.
order
(
"created_at DESC"
).
limit
(
10
)
@issues
=
@issues
.
includes
(
:author
,
:project
)
end
end
# Get authored or assigned open merge requests
# Get authored or assigned open merge requests
...
...
app/views/dashboard/_projects_feed.html.haml
View file @
376bec26
-
@active_projects
.
first
(
3
).
each
do
|
project
|
-
@active_projects
.
first
(
10
).
each
do
|
project
|
.wll
=
link_to
project
do
=
link_to
project
do
%h4
=
project
.
name
%h4
-
project
.
updates
(
3
).
each
do
|
update
|
=
project
.
name
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
%small
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"avatar"
,
:width
=>
32
last activity at
%div
=
project
.
last_activity_date_cached
.
stamp
(
"Aug 25, 2011"
)
=
dashboard_feed_title
(
update
)
%span
.update-author
%strong
=
update
.
author_name
authored
=
time_ago_in_words
(
update
.
created_at
)
ago
.right
-
klass
=
update
.
class
.
to_s
.
split
(
"::"
).
last
.
downcase
%span
.tag
{
:class
=>
klass
}=
klass
app/views/dashboard/index.html.haml
View file @
376bec26
%h3
Activities
-
if
current_user
.
require_ssh_key?
%hr
.alert-message.warning
.news-feed
=
render
"dashboard/projects_feed"
%p
You wont be able to pull/push project code unless you
=
link_to
new_key_path
,
:class
=>
"vlink"
do
add new key
to your profile
%div
.dashboard_category
%h3
Projects
%small
( most recent )
%strong
.right
=
link_to
projects_path
do
Projects list
→
%hr
.row
.dashboard_block
.row
.span9
=
render
"dashboard/projects_feed"
.span3.right
-
if
current_user
.
can_create_project?
.alert-message.block-message.warning
You can create up to
=
current_user
.
projects_limit
projects. Click on link below to add a new one
.link_holder
=
link_to
new_project_path
,
:class
=>
""
do
New Project »
-
unless
@merge_requests
.
blank?
%div
.dashboard_category
%h3
Merge Requests
%small
( authored or assigned to you )
%strong
.right
=
link_to
dashboard_merge_requests_path
do
Vist merge requests page
→
%hr
.row
.dashboard_block
=
render
"dashboard/merge_requests_feed"
-
unless
@issues
.
blank?
%div
.dashboard_category
%h3
Issues
%small
( assigned to you )
%strong
.right
=
link_to
dashboard_merge_requests_path
do
Vist issues page
→
%hr
.row
.dashboard_block
=
render
"dashboard/issues_feed"
app/views/dashboard/issues.html.haml
View file @
376bec26
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
Issues
Issues
%small
( assigned to you )
%small
( assigned to you )
%
h
r
%
b
r
=
render
"dashboard/issues_feed"
.ui-box
=
render
"dashboard/issues_feed"
app/views/dashboard/merge_requests.html.haml
View file @
376bec26
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
Merge Requests
Merge Requests
%small
( authored or assigned to you )
%small
( authored or assigned to you )
%
h
r
%
b
r
=
render
"dashboard/merge_requests_feed"
.ui-box
=
render
"dashboard/merge_requests_feed"
app/views/layouts/_app_menu.html.haml
View file @
376bec26
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
render
"layouts/const_menu_links"
-#= link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path) || current_page?(root
_path)}"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"current"
if
current_page?
(
projects
_path
)
}
"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
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
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"current"
if
controller
.
controller_name
==
"help"
}
"
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"current"
if
controller
.
controller_name
==
"help"
}
"
app/views/layouts/_const_menu_links.html.haml
View file @
376bec26
=
link_to
"Home"
,
root_path
,
:class
=>
"home
#{
"current"
if
current_page?
(
projects
_path
)
||
current_page?
(
root_path
)
}
"
,
:title
=>
"Home"
=
link_to
"Home"
,
root_path
,
:class
=>
"home
#{
"current"
if
current_page?
(
dashboard
_path
)
||
current_page?
(
root_path
)
}
"
,
:title
=>
"Home"
app/views/layouts/_head_panel.html.haml
View file @
376bec26
...
@@ -5,7 +5,11 @@
...
@@ -5,7 +5,11 @@
%div
.app_logo
%div
.app_logo
=
link_to
root_path
,
:class
=>
"home"
,
:title
=>
"Home"
do
=
link_to
root_path
,
:class
=>
"home"
,
:title
=>
"Home"
do
=
image_tag
"logo_tr.png"
,
:width
=>
50
=
image_tag
"logo_tr.png"
,
:width
=>
50
%h1
GITLAB
%h1
GITLAB
=
link_to
admin_projects_path
,
:class
=>
"admin_link"
,
:title
=>
"Admin area"
do
=
image_tag
"admin.PNG"
,
:width
=>
16
%h1
.project_name
=
title
%h1
.project_name
=
title
.search
=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
.search
=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
...
...
app/views/layouts/application.html.haml
View file @
376bec26
...
@@ -7,6 +7,4 @@
...
@@ -7,6 +7,4 @@
.container
.container
=
render
:partial
=>
"layouts/app_menu"
=
render
:partial
=>
"layouts/app_menu"
.content
.content
.row
=
yield
.span12
=
yield
.sidebar
=
render
"layouts/projects_side"
app/views/projects/_tile.html.haml
View file @
376bec26
-
@projects
.
in_groups_of
(
2
,
false
)
do
|
projects
|
-
@projects
.
in_groups_of
(
3
,
false
)
do
|
projects
|
.row
.row
-
projects
.
each_with_index
do
|
project
,
i
|
-
projects
.
each_with_index
do
|
project
,
i
|
%div
.project_tile
%div
.project_tile
...
...
app/views/projects/index.html.haml
View file @
376bec26
%h3
%h3
Projects
Projects
%small
=
"(
#{
current_user
.
projects
.
count
}
)"
%small
=
"(
#{
current_user
.
projects
.
count
}
)"
-
if
current_user
.
can_create_project?
%span
.right
=
link_to
new_project_path
,
:class
=>
"btn small"
do
New Project
%hr
%hr
-
unless
@projects
.
empty?
-
unless
@projects
.
empty?
%div
.content_list
=
render
"tile"
%div
.content_list
=
render
"tile"
...
...
config/routes.rb
View file @
376bec26
...
@@ -123,5 +123,5 @@ Gitlab::Application.routes.draw do
...
@@ -123,5 +123,5 @@ Gitlab::Application.routes.draw do
end
end
resources
:notes
,
:only
=>
[
:index
,
:create
,
:destroy
]
resources
:notes
,
:only
=>
[
:index
,
:create
,
:destroy
]
end
end
root
:to
=>
"
projects
#index"
root
:to
=>
"
dashboard
#index"
end
end
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