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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
724ea16c
Commit
724ea16c
authored
Mar 19, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Activities page added. Dashboard few specs. Preparing for 2.3
parent
d87abbe9
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
121 additions
and
72 deletions
+121
-72
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+22
-4
app/assets/stylesheets/main.scss
app/assets/stylesheets/main.scss
+1
-1
app/assets/stylesheets/ui_basic.scss
app/assets/stylesheets/ui_basic.scss
+1
-1
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+5
-0
app/views/dashboard/_events_feed.html.haml
app/views/dashboard/_events_feed.html.haml
+0
-2
app/views/dashboard/_issues_feed.html.haml
app/views/dashboard/_issues_feed.html.haml
+3
-1
app/views/dashboard/_merge_requests_feed.html.haml
app/views/dashboard/_merge_requests_feed.html.haml
+4
-3
app/views/dashboard/_projects_feed.html.haml
app/views/dashboard/_projects_feed.html.haml
+3
-1
app/views/dashboard/activities.html.haml
app/views/dashboard/activities.html.haml
+10
-0
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+4
-1
app/views/layouts/_app_menu.html.haml
app/views/layouts/_app_menu.html.haml
+2
-1
app/views/profile/password.html.haml
app/views/profile/password.html.haml
+43
-39
app/views/projects/_show.html.haml
app/views/projects/_show.html.haml
+1
-1
app/views/projects/empty.html.haml
app/views/projects/empty.html.haml
+1
-1
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+6
-2
config/routes.rb
config/routes.rb
+1
-0
spec/requests/dashboard_spec.rb
spec/requests/dashboard_spec.rb
+14
-14
No files found.
app/assets/stylesheets/common.scss
View file @
724ea16c
...
@@ -3,7 +3,7 @@ a {
...
@@ -3,7 +3,7 @@ a {
color
:
$link_color
;
color
:
$link_color
;
&
:hover
{
&
:hover
{
text-decoration
:none
;
text-decoration
:none
;
color
:
$
style_color
;
color
:
$
blue_link
;
}
}
&
.btn
{
&
.btn
{
...
@@ -838,12 +838,19 @@ p.time {
...
@@ -838,12 +838,19 @@ p.time {
width
:
840px
;
width
:
840px
;
margin
:auto
;
margin
:auto
;
.wll
{
.dash_project_item
{
padding
:
5px
;
margin-bottom
:
10px
;
margin-top
:
5px
;
border
:none
;
border
:none
;
&
:hover
{
&
:hover
{
background
:none
;
background
:none
;
h4
{
color
:
#2FA0BB
;
.arrow
{
background
:
#2FA0BB
;
color
:
#fff
;
}
}
}
}
h4
{
h4
{
...
@@ -988,3 +995,14 @@ p.time {
...
@@ -988,3 +995,14 @@ p.time {
.merge_request_status_holder
{
.merge_request_status_holder
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.arrow
{
float
:
right
;
background
:
#E3E5EA
;
padding
:
10px
;
border-radius
:
5px
;
text-shadow
:
none
;
color
:
#999
;
line-height
:
16px
;
font-weight
:bold
;
}
app/assets/stylesheets/main.scss
View file @
724ea16c
...
@@ -15,7 +15,7 @@ $app_padding:20px;
...
@@ -15,7 +15,7 @@ $app_padding:20px;
$bg_color
:
#FFF
;
$bg_color
:
#FFF
;
$styled_border_color
:
#2FA0BB
;
$styled_border_color
:
#2FA0BB
;
$color
:
"#4BB8D2"
;
$color
:
"#4BB8D2"
;
$blue_link
:
"#2fa0bb"
;
$blue_link
:
#2fa0bb
;
/** Style colors **/
/** Style colors **/
...
...
app/assets/stylesheets/ui_basic.scss
View file @
724ea16c
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
color
:
$link_color
;
color
:
$link_color
;
&
:hover
{
&
:hover
{
text-decoration
:none
;
text-decoration
:none
;
color
:
$
style_color
;
color
:
$
blue_link
;
}
}
}
}
...
...
app/controllers/dashboard_controller.rb
View file @
724ea16c
...
@@ -34,4 +34,9 @@ class DashboardController < ApplicationController
...
@@ -34,4 +34,9 @@ class DashboardController < ApplicationController
format
.
atom
{
render
:layout
=>
false
}
format
.
atom
{
render
:layout
=>
false
}
end
end
end
end
def
activities
@projects
=
current_user
.
projects
.
all
@events
=
Event
.
where
(
:project_id
=>
@projects
.
map
(
&
:id
)).
recent
.
limit
(
40
)
end
end
end
app/views/dashboard/_events_feed.html.haml
deleted
100644 → 0
View file @
d87abbe9
=
render
@events
app/views/dashboard/_issues_feed.html.haml
View file @
724ea16c
...
@@ -3,8 +3,10 @@
...
@@ -3,8 +3,10 @@
=
link_to
[
issue
.
project
,
issue
]
do
=
link_to
[
issue
.
project
,
issue
]
do
%p
%p
%strong
%strong
%span
.label
=
issue
.
project
.
name
%span
.
pretty_
label
=
issue
.
project
.
name
–
–
Issue
#
Issue
#
=
issue
.
id
=
issue
.
id
=
truncate
issue
.
title
,
:length
=>
50
=
truncate
issue
.
title
,
:length
=>
50
%span
.right.cgray
=
issue
.
updated_at
.
stamp
(
"Aug 21, 2011"
)
app/views/dashboard/_merge_requests_feed.html.haml
View file @
724ea16c
...
@@ -3,8 +3,9 @@
...
@@ -3,8 +3,9 @@
=
link_to
[
merge_request
.
project
,
merge_request
]
do
=
link_to
[
merge_request
.
project
,
merge_request
]
do
%p
%p
%strong
%strong
%span
.label
=
merge_request
.
project
.
name
%span
.
pretty_
label
=
merge_request
.
project
.
name
–
–
Merge Request
#
Merge Request ##{merge_request.id}
=
merge_request
.
id
=
truncate
merge_request
.
title
,
:length
=>
50
=
truncate
merge_request
.
title
,
:length
=>
50
%span
.right.cgray
=
merge_request
.
updated_at
.
stamp
(
"Aug 21, 2011"
)
app/views/dashboard/_projects_feed.html.haml
View file @
724ea16c
-
projects
.
first
(
5
).
each
do
|
project
|
-
projects
.
first
(
5
).
each
do
|
project
|
.wll
%div
.dash_project_item
=
link_to
project
do
=
link_to
project
do
%h4
%h4
%span
.ico.project
%span
.ico.project
...
@@ -7,3 +7,5 @@
...
@@ -7,3 +7,5 @@
%small
%small
last activity at
last activity at
=
project
.
last_activity_date
.
stamp
(
"Aug 25, 2011"
)
=
project
.
last_activity_date
.
stamp
(
"Aug 25, 2011"
)
%span
.right.arrow
→
app/views/dashboard/activities.html.haml
0 → 100644
View file @
724ea16c
-
if
@events
.
any?
%div
.dashboard_category
%h3
%span
.ico.activities
=
link_to
"Activities"
,
"#activities"
,
:id
=>
"activities"
%hr
=
render
@events
-
else
%h3
Nothing here
app/views/dashboard/index.html.haml
View file @
724ea16c
...
@@ -62,7 +62,10 @@
...
@@ -62,7 +62,10 @@
%h3
%h3
%span
.ico.activities
%span
.ico.activities
=
link_to
"Activities"
,
"#activities"
,
:id
=>
"activities"
=
link_to
"Activities"
,
"#activities"
,
:id
=>
"activities"
%strong
.right
=
link_to
dashboard_activities_path
do
Visit activities page
→
%hr
%hr
.row
.row
.dashboard_block
=
render
"dashboard/events_feed"
.dashboard_block
=
render
@events
app/views/layouts/_app_menu.html.haml
View file @
724ea16c
%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
)
}
"
=
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
"
Activities"
,
dashboard_activities_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_activities
_path
)
}
"
=
link_to
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
do
=
link_to
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
do
Issues
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
%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
=
link_to
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
do
Requests
Requests
%span
.count
=
current_user
.
cared_merge_requests
.
count
%span
.count
=
current_user
.
cared_merge_requests
.
count
=
link_to
"Search"
,
search_path
,
:class
=>
"
#{
"current"
if
current_page?
(
search_path
)
}
"
=
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/profile/password.html.haml
View file @
724ea16c
%h3
Password
.row
%hr
.span8
=
form_for
@user
,
:url
=>
profile_password_path
,
:method
=>
:put
do
|
f
|
%h3
Password
.data
%hr
.alert-message.block-message.warning
=
form_for
@user
,
:url
=>
profile_password_path
,
:method
=>
:put
do
|
f
|
%p
After successfull password update you will be redirected to login page where you should login with new password
.data
-
if
@user
.
errors
.
any?
.alert-message.block-message.warning
.alert-message.block-message.error
%p
After successfull password update you will be redirected to login page where you should login with new password
%ul
-
if
@user
.
errors
.
any?
-
@user
.
errors
.
full_messages
.
each
do
|
msg
|
.alert-message.block-message.error
%li
=
msg
%ul
-
@user
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
.clearfix
=
f
.
label
:password
.input
=
f
.
password_field
:password
.clearfix
=
f
.
label
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
.actions
=
f
.
submit
'Save'
,
:class
=>
"btn"
.clearfix
.span7.right
=
f
.
label
:password
%h3
.input
=
f
.
password_field
:password
Private token
.clearfix
%span
.cred.right
=
f
.
label
:password_confirmation
keep it in secret!
.input
=
f
.
password_field
:password_confirmation
.actions
=
f
.
submit
'Save'
,
:class
=>
"btn"
%h3
Private token
%span
.cred.right
keep it in secret!
%hr
=
form_for
@user
,
:url
=>
profile_reset_private_token_path
,
:method
=>
:put
do
|
f
|
.data
%p
Private token used to access application resources without authentication.
%p
For example its required to access commits feed.
%hr
%hr
%p
.cgray
=
form_for
@user
,
:url
=>
profile_reset_private_token_path
,
:method
=>
:put
do
|
f
|
-
if
current_user
.
private_token
.data
=
text_field_tag
"token"
,
current_user
.
private_token
.alert-message.block-message.warning
-
else
%p
Private token used to access application resources without authentication.
You don`t have one yet. Click generate to fix it.
%hr
.actions
%p
* required for rss feed
-
if
current_user
.
private_token
%p
.cgray
=
f
.
submit
'Reset'
,
:confirm
=>
"Are you sure?"
,
:class
=>
"btn"
-
if
current_user
.
private_token
-
else
=
text_field_tag
"token"
,
current_user
.
private_token
=
f
.
submit
'Generate'
,
:class
=>
"btn"
-
else
You don`t have one yet. Click generate to fix it.
.actions
-
if
current_user
.
private_token
=
f
.
submit
'Reset'
,
:confirm
=>
"Are you sure?"
,
:class
=>
"btn"
-
else
=
f
.
submit
'Generate'
,
:class
=>
"btn"
app/views/projects/_show.html.haml
View file @
724ea16c
%h
4
.title
%h
5
.title
=
@project
.
name
=
@project
.
name
%br
%br
%div
%div
...
...
app/views/projects/empty.html.haml
View file @
724ea16c
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
%li
Visit profile
→
keys and add public key of every machine you want to use for work with gitlabhq.
%li
Visit profile
→
keys and add public key of every machine you want to use for work with gitlabhq.
.alert-message.block-message.error
.alert-message.block-message.error
%ul
.alert_holder
%ul
.
unstyled.
alert_holder
%li
You should push repository to proceed.
%li
You should push repository to proceed.
%li
After push you will be able to browse code, commits etc.
%li
After push you will be able to browse code, commits etc.
...
...
app/views/projects/show.html.haml
View file @
724ea16c
...
@@ -21,9 +21,13 @@
...
@@ -21,9 +21,13 @@
=
text_field_tag
:project_clone
,
@project
.
url_to_repo
,
:class
=>
"xlarge one_click_select git_clone_url"
=
text_field_tag
:project_clone
,
@project
.
url_to_repo
,
:class
=>
"xlarge one_click_select git_clone_url"
-
if
@project
.
description
.
present?
-
if
@project
.
description
.
present?
=
markdown
@project
.
description
.prettyprint
=
markdown
@project
.
description
-
unless
@events
.
blank?
-
unless
@events
.
blank?
%h5
.cgray
Recent Activity
%br
%h5
.cgray
%span
.ico.activities
Recent Activity
%hr
.content_list
=
render
@events
.content_list
=
render
@events
config/routes.rb
View file @
724ea16c
...
@@ -40,6 +40,7 @@ Gitlab::Application.routes.draw do
...
@@ -40,6 +40,7 @@ Gitlab::Application.routes.draw do
get
"dashboard"
,
:to
=>
"dashboard#index"
get
"dashboard"
,
:to
=>
"dashboard#index"
get
"dashboard/issues"
,
:to
=>
"dashboard#issues"
get
"dashboard/issues"
,
:to
=>
"dashboard#issues"
get
"dashboard/merge_requests"
,
:to
=>
"dashboard#merge_requests"
get
"dashboard/merge_requests"
,
:to
=>
"dashboard#merge_requests"
get
"dashboard/activities"
,
:to
=>
"dashboard#activities"
#get "profile/:id", :to => "profile#show"
#get "profile/:id", :to => "profile#show"
...
...
spec/requests/dashboard_spec.rb
View file @
724ea16c
require
'spec_helper'
require
'spec_helper'
__END__
# Disabled for now
describe
"Dashboard"
do
describe
"Dashboard"
do
before
do
before
do
@project
=
Factory
:project
@project
=
Factory
:project
...
@@ -22,19 +20,21 @@ describe "Dashboard" do
...
@@ -22,19 +20,21 @@ describe "Dashboard" do
end
end
it
"should have projects panel"
do
it
"should have projects panel"
do
within ".project-list" do
page
.
should
have_content
(
@project
.
name
)
page.should have_content(@project.name)
end
end
end
end
# Temporary disabled cause of travis
describe
"GET /dashboard/activities"
do
# TODO: fix or rewrite
before
do
#it "should have news feed" do
visit
dashboard_activities_path
#within "#news-feed" do
end
#page.should have_content("commit")
#page.should have_content(@project.commit.author.name)
it
"should be on dashboard page"
do
#page.should have_content(@project.commit.safe_message)
current_path
.
should
==
dashboard_activities_path
#end
end
#end
it
"should have projects panel"
do
page
.
should
have_content
(
@project
.
name
)
end
end
end
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