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
8786aff2
Commit
8786aff2
authored
Nov 12, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project avtivity page
parent
4dd5d9c8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
67 deletions
+45
-67
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+21
-1
app/views/projects/_feed.html.haml
app/views/projects/_feed.html.haml
+15
-0
app/views/projects/_recent_commits.html.haml
app/views/projects/_recent_commits.html.haml
+0
-34
app/views/projects/_recent_messages.html.haml
app/views/projects/_recent_messages.html.haml
+0
-27
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+8
-4
spec/requests/projects_spec.rb
spec/requests/projects_spec.rb
+1
-1
No files found.
app/assets/stylesheets/projects.css.scss
View file @
8786aff2
...
@@ -344,12 +344,32 @@ body.project-page table .commit {
...
@@ -344,12 +344,32 @@ body.project-page table .commit {
background
:
#2c5c66
;
background
:
#2c5c66
;
color
:white
;
color
:white
;
}
}
&
.note
{
background
:
#2c5c66
;
color
:white
;
}
&
.issue
{
&
.issue
{
background
:
#D12F19
;
background
:
#D12F19
;
color
:white
;
color
:white
;
}
}
&
.commit
{
&
.commit
{
background
:
#
2c5c66
;
background
:
#
44aacc
;
color
:white
;
color
:white
;
}
}
}
}
/* Project Dashboard Page */
html
,
body
{
height
:
100%
;
}
body
.dashboard.project-page
.news-feed
h2
{
float
:
left
;}
body
.dashboard.project-page
.news-feed
.project-updates
{
margin-bottom
:
20px
;
display
:
block
;
width
:
100%
;}
body
.dashboard.project-page
.news-feed
.project-updates
.data
{
padding
:
0
}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
{
padding
:
10px
;
border-bottom
:
1px
solid
#eee
;
overflow
:
hidden
;
display
:
block
;}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
:last-child
{
border-bottom
:
0
}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
img
{
float
:
left
;
margin-right
:
10px
;}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
span
.update-title
,
.dashboard-page
.news-feed
.project-updates
li
a
span
.update-author
{
display
:
block
;}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
span
.update-title
{
margin-bottom
:
10px
}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
span
.update-author
{
color
:
#999
;
font-weight
:
normal
;
font-style
:
italic
;}
body
.dashboard.project-page
.news-feed
.project-updates
a
.project-update
span
.update-author
strong
{
font-weight
:
bold
;
font-style
:
normal
;}
/* eo Dashboard Page */
app/views/projects/_feed.html.haml
0 → 100644
View file @
8786aff2
%a
.project-update
{
:href
=>
dashboard_feed_path
(
project
,
update
)}
=
image_tag
gravatar_icon
(
update
.
author_email
),
:class
=>
"left"
,
:width
=>
40
%span
.update-title
=
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
-
if
update
.
kind_of?
(
Grit
::
Commit
)
%span
.tag.commit
=
update
.
head
.
name
app/views/projects/_recent_commits.html.haml
deleted
100644 → 0
View file @
4dd5d9c8
%table
%thead
%th
Commits
.filter.right
=
form_tag
project_path
(
@project
),
:method
=>
:get
,
:class
=>
"right"
do
.left
=
radio_button_tag
:view
,
"recent"
,
(
params
[
:view
]
||
"recent"
)
==
"recent"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"recent_view"
=
label_tag
"recent_view"
,
"Recent"
.left
=
radio_button_tag
:view
,
"day"
,
params
[
:view
]
==
"day"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"day_view"
=
label_tag
"day_view"
,
"Today"
.left
=
radio_button_tag
:view
,
"week"
,
params
[
:view
]
==
"week"
,
:onclick
=>
"this.form.submit()"
,
:id
=>
"week_view"
=
label_tag
"week_view"
,
"Week"
-
@commits
.
each
do
|
commit
|
%tr
%td
%div
.commit
-
if
commit
.
author
.
email
=
image_tag
gravatar_icon
(
commit
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
-
else
=
image_tag
"no_avatar.png"
,
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
.title
%p
%span
.tag.commit
=
commit
.
head
.
name
=
link_to
truncate
(
commit
.
safe_message
,
:length
=>
40
),
project_commit_path
(
@project
,
:id
=>
commit
.
id
)
%span
%span
.author
%strong
=
commit
.
author
.
name
.
force_encoding
(
"UTF-8"
)
%cite
.cgray
=
time_ago_in_words
(
commit
.
committed_date
)
ago
app/views/projects/_recent_messages.html.haml
deleted
100644 → 0
View file @
4dd5d9c8
-
@messages
.
group_by
{
|
x
|
[
x
.
noteable_id
,
x
.
noteable_type
]}.
each
do
|
item
,
notes
|
-
id
,
type
=
item
[
0
],
item
[
1
]
-
parent
=
load_note_parent
(
id
,
type
,
@project
)
-
next
unless
parent
%table
%thead
%th
%div
{
:class
=>
"recent_message_parent"
}
=
link_to
(
truncate
(
dashboard_feed_title
(
parent
),
:length
=>
40
),
dashboard_feed_path
(
@project
,
parent
))
-
notes
.
sort
{
|
x
,
y
|
y
.
updated_at
<=>
x
.
updated_at
}.
each
do
|
note
|
%tr
%td
%div
.message
=
image_tag
gravatar_icon
(
note
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%div
.title
=
link_to
markdown
(
truncate
(
note
.
note
,
:length
=>
40
)),
dashboard_feed_path
(
@project
,
parent
)
+
"#note_
#{
note
.
id
}
"
-
if
note
.
attachment
.
url
%br
Attachment:
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
%div
.author
%strong
=
note
.
author_name
%cite
.cgray
=
time_ago_in_words
(
note
.
updated_at
)
ago
%br
app/views/projects/show.html.haml
View file @
8786aff2
.left.width-49p
-
content_for
(
:body_class
,
"project-page dashboard"
)
=
render
"projects/recent_commits"
.right.width-49p
#news-feed
.news-feed
=
render
"projects/recent_messages"
%h2
.icon
%span
>
Activities
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
-
@project
.
updates
(
20
).
each
do
|
update
|
=
render
"projects/feed"
,
:update
=>
update
,
:project
=>
@project
:javascript
:javascript
function
updateDashboard
(){
function
updateDashboard
(){
...
...
spec/requests/projects_spec.rb
View file @
8786aff2
...
@@ -73,7 +73,7 @@ describe "Projects" do
...
@@ -73,7 +73,7 @@ describe "Projects" do
end
end
it
"should beahave like activities page"
do
it
"should beahave like activities page"
do
within
".
commit
"
do
within
".
project-update
"
do
page
.
should
have_content
(
"master"
)
page
.
should
have_content
(
"master"
)
page
.
should
have_content
(
@project
.
commit
.
author
.
name
)
page
.
should
have_content
(
@project
.
commit
.
author
.
name
)
page
.
should
have_content
(
@project
.
commit
.
safe_message
)
page
.
should
have_content
(
@project
.
commit
.
safe_message
)
...
...
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