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
Kazuhiko Shiozaki
gitlab-ce
Commits
97ba7315
Commit
97ba7315
authored
Jan 04, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project activities restyled
parent
05993f90
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
30 deletions
+105
-30
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+4
-4
app/models/note.rb
app/models/note.rb
+8
-0
app/models/repository.rb
app/models/repository.rb
+2
-2
app/views/projects/_feed.html.haml
app/views/projects/_feed.html.haml
+80
-14
app/views/repositories/show.html.haml
app/views/repositories/show.html.haml
+2
-2
spec/requests/projects_spec.rb
spec/requests/projects_spec.rb
+8
-7
spec/requests/repositories_spec.rb
spec/requests/repositories_spec.rb
+1
-1
No files found.
app/assets/stylesheets/projects.css.scss
View file @
97ba7315
...
@@ -675,14 +675,14 @@ body.project-page h2.icon.loading {
...
@@ -675,14 +675,14 @@ body.project-page h2.icon.loading {
a
.project-update.titled
{
a
.project-update.titled
{
position
:
relative
;
position
:
relative
;
padding-
right
:
310
px
!
important
;
padding-
left
:
235
px
!
important
;
.
right
-block
{
.
title
-block
{
padding
:
10px
;
padding
:
10px
;
width
:
2
80
px
;
width
:
2
05
px
;
background
:
#f5f5f5
;
background
:
#f5f5f5
;
position
:
absolute
;
position
:
absolute
;
righ
t
:
0
;
lef
t
:
0
;
top
:
0
;
top
:
0
;
}
}
}
}
app/models/note.rb
View file @
97ba7315
...
@@ -45,6 +45,14 @@ class Note < ActiveRecord::Base
...
@@ -45,6 +45,14 @@ class Note < ActiveRecord::Base
def
notify_author
def
notify_author
@notify_author
||=
false
@notify_author
||=
false
end
end
def
target
if
noteable_type
==
"Commit"
project
.
commit
(
noteable_id
)
else
noteable
end
end
end
end
# == Schema Information
# == Schema Information
#
#
...
...
app/models/repository.rb
View file @
97ba7315
...
@@ -117,9 +117,9 @@ class Repository
...
@@ -117,9 +117,9 @@ class Repository
commits
.
sort!
do
|
x
,
y
|
commits
.
sort!
do
|
x
,
y
|
y
.
committed_date
<=>
x
.
committed_date
y
.
committed_date
<=>
x
.
committed_date
end
[
0
..
n
]
end
commits
commits
[
0
..
n
]
end
end
def
commits_since
(
date
)
def
commits_since
(
date
)
...
...
app/views/projects/_feed.html.haml
View file @
97ba7315
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
-
if
update
.
kind_of?
(
Note
)
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%a
.project-update.titled
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
%span
.update-title
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
=
dashboard_feed_title
(
update
)
%span
.update-title
%span
.update-author
=
dashboard_feed_title
(
update
)
%strong
=
update
.
author_name
%span
.update-author
authored
%strong
=
update
.
author_name
=
time_ago_in_words
(
update
.
created_at
)
=
time_ago_in_words
(
update
.
created_at
)
ago
ago
.right
-
noteable
=
update
.
target
-
klass
=
update
.
class
.
to_s
.
split
(
"::"
).
last
.
downcase
-
if
noteable
.
kind_of?
(
MergeRequest
)
%span
.tag
{
:class
=>
klass
}=
klass
.title-block
-
if
update
.
kind_of?
(
Commit
)
%span
.update-title
%span
.tag.commit
=
update
.
head
.
name
%span
.commit.tag
Merge Request
#
=
noteable
.
id
%span
.update-author
%span
=
noteable
.
source_branch
→
%span
=
noteable
.
target_branch
-
elsif
noteable
.
kind_of?
(
Issue
)
.title-block
%span
.update-title
%span
.commit.tag
Issue
#
=
noteable
.
id
%span
.update-author
.left
=
truncate
noteable
.
title
-
elsif
noteable
.
kind_of?
(
Commit
)
.title-block
%span
.update-title
%span
.commit.tag
commit
%span
.update-author
.left
=
truncate
noteable
.
id
-
else
.title-block
%span
.update-title
%span
.commit.tag
Project Wall
%span
.update-author
\...
-
elsif
update
.
kind_of?
(
MergeRequest
)
%a
.project-update.titled
{
:href
=>
project_merge_request_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%span
.update-title
Opened merge request
%span
.update-author
%strong
=
update
.
author_name
=
time_ago_in_words
(
update
.
created_at
)
ago
.title-block
%span
.update-title
%span
.commit.tag
Merge Request
#
=
update
.
id
%span
.update-author
%span
=
update
.
source_branch
→
%span
=
update
.
target_branch
-
elsif
update
.
kind_of?
(
Issue
)
%a
.project-update.titled
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%span
.update-title
Created new Issue
%span
.update-author
%strong
=
update
.
author_name
=
time_ago_in_words
(
update
.
created_at
)
ago
.title-block
%span
.update-title
%span
.commit.tag
Issue
#
=
update
.
id
%span
.update-author
.left
=
truncate
update
.
title
app/views/repositories/show.html.haml
View file @
97ba7315
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
authored
authored
=
time_ago_in_words
(
update
.
created_at
)
=
time_ago_in_words
(
update
.
created_at
)
ago
ago
.
right
-block
.
title
-block
%span
.update-title
%span
.update-title
%span
.commit.tag
=
update
.
head
.
name
%span
.commit.tag
=
update
.
head
.
name
%span
.update-author
%span
.update-author
.
righ
t
=
truncate
update
.
commit
.
id
.
lef
t
=
truncate
update
.
commit
.
id
spec/requests/projects_spec.rb
View file @
97ba7315
...
@@ -78,13 +78,14 @@ describe "Projects" do
...
@@ -78,13 +78,14 @@ describe "Projects" do
current_path
.
should
==
project_path
(
@project
)
current_path
.
should
==
project_path
(
@project
)
end
end
it
"should beahave like activities page"
do
# TODO: replace with real one
within
".project-update"
do
#it "should beahave like activities page" do
page
.
should
have_content
(
"master"
)
#within ".project-update" do
page
.
should
have_content
(
@project
.
commit
.
author
.
name
)
#page.should have_content("master")
page
.
should
have_content
(
@project
.
commit
.
safe_message
)
#page.should have_content(@project.commit.author.name)
end
#page.should have_content(@project.commit.safe_message)
end
#end
#end
end
end
describe
"GET /projects/team"
do
describe
"GET /projects/team"
do
...
...
spec/requests/repositories_spec.rb
View file @
97ba7315
...
@@ -28,7 +28,7 @@ describe "Repository" do
...
@@ -28,7 +28,7 @@ describe "Repository" do
end
end
it
"should show commits list"
do
it
"should show commits list"
do
page
.
all
(
:css
,
".project-update"
).
size
.
should
==
20
page
.
all
(
:css
,
".project-update"
).
size
.
should
==
@project
.
repo
.
branches
.
size
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