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
93bc1ff1
Commit
93bc1ff1
authored
Oct 02, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into fix-messages-for-deleted-things
parents
2022ae69
0187ae4e
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
103 additions
and
114 deletions
+103
-114
app/assets/stylesheets/gitlab_bootstrap/lists.scss
app/assets/stylesheets/gitlab_bootstrap/lists.scss
+4
-1
app/assets/stylesheets/sections/events.scss
app/assets/stylesheets/sections/events.scss
+0
-9
app/assets/stylesheets/sections/tree.scss
app/assets/stylesheets/sections/tree.scss
+4
-19
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+36
-0
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+1
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+4
-0
app/models/event.rb
app/models/event.rb
+4
-0
app/views/events/_event.html.haml
app/views/events/_event.html.haml
+7
-10
app/views/events/_event_issue.html.haml
app/views/events/_event_issue.html.haml
+0
-8
app/views/events/_event_membership_changed.html.haml
app/views/events/_event_membership_changed.html.haml
+0
-9
app/views/events/_event_merge_request.html.haml
app/views/events/_event_merge_request.html.haml
+0
-16
app/views/events/_event_push.html.haml
app/views/events/_event_push.html.haml
+0
-30
app/views/events/event/_common.html.haml
app/views/events/event/_common.html.haml
+7
-0
app/views/events/event/_push.html.haml
app/views/events/event/_push.html.haml
+25
-0
app/views/notes/_common_form.html.haml
app/views/notes/_common_form.html.haml
+1
-1
app/views/tree/_tree.html.haml
app/views/tree/_tree.html.haml
+2
-2
app/views/tree/show.html.haml
app/views/tree/show.html.haml
+2
-1
doc/installation.md
doc/installation.md
+0
-1
features/dashboard/dashboard.feature
features/dashboard/dashboard.feature
+2
-2
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+4
-4
No files found.
app/assets/stylesheets/gitlab_bootstrap/lists.scss
View file @
93bc1ff1
...
@@ -13,7 +13,10 @@ ul {
...
@@ -13,7 +13,10 @@ ul {
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.05
);
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.05
);
&
.smoke
{
background-color
:
#f5f5f5
;
}
&
.smoke
{
background-color
:
#f5f5f5
;
}
&
:hover
{
background
:
$hover
;
}
&
:hover
{
background
:
$hover
;
border-bottom
:
1px
solid
#ADF
;
}
&
:last-child
{
border
:none
}
&
:last-child
{
border
:none
}
.author
{
color
:
#999
;
}
.author
{
color
:
#999
;
}
...
...
app/assets/stylesheets/sections/events.scss
View file @
93bc1ff1
...
@@ -5,32 +5,23 @@
...
@@ -5,32 +5,23 @@
.event_label
{
.event_label
{
&
.pushed
{
&
.pushed
{
padding
:
0
2px
;
padding
:
0
2px
;
@extend
.alert
;
@extend
.alert-info
;
}
}
&
.opened
{
&
.opened
{
padding
:
0
2px
;
padding
:
0
2px
;
@extend
.alert
;
@extend
.alert-success
;
}
}
&
.closed
{
&
.closed
{
padding
:
0
2px
;
padding
:
0
2px
;
@extend
.alert
;
@extend
.alert-error
;
}
}
&
.merged
{
&
.merged
{
padding
:
0
2px
;
padding
:
0
2px
;
@extend
.alert
;
@extend
.alert-success
;
}
}
&
.left
,
&
.left
,
&
.joined
{
&
.joined
{
padding
:
0
2px
;
padding
:
0
2px
;
@extend
.alert
;
float
:none
;
float
:none
;
}
}
}
}
...
...
app/assets/stylesheets/sections/tree.scss
View file @
93bc1ff1
#
tree-holder
{
.
tree-holder
{
#
tree-content-holder
{
.
tree-content-holder
{
float
:left
;
float
:left
;
width
:
100%
;
width
:
100%
;
}
}
#tree-readme-holder
{
float
:left
;
width
:
100%
;
.readme
{
border
:
1px
solid
#ccc
;
padding
:
12px
;
background
:
#F7F7F7
;
pre
{
overflow
:
auto
;
}
}
}
.tree_progress
{
.tree_progress
{
display
:none
;
display
:none
;
...
@@ -25,7 +12,7 @@
...
@@ -25,7 +12,7 @@
}
}
}
}
#tree-slider
{
.tree-table
{
@include
border-radius
(
0
);
@include
border-radius
(
0
);
.tree-item
{
.tree-item
{
&
:hover
{
&
:hover
{
...
@@ -55,8 +42,7 @@
...
@@ -55,8 +42,7 @@
}
}
}
}
.tree-table
{
#tree-slider
{
td
{
td
{
background
:
#fafafa
;
background
:
#fafafa
;
}
}
...
@@ -72,5 +58,4 @@
...
@@ -72,5 +58,4 @@
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
}
}
app/helpers/events_helper.rb
0 → 100644
View file @
93bc1ff1
module
EventsHelper
def
link_to_author
(
event
)
project
=
event
.
project
tm
=
project
.
team_member_by_id
(
event
.
author_id
)
if
tm
link_to
event
.
author_name
,
project_team_member_path
(
project
,
tm
)
else
event
.
author_name
end
end
def
event_action_name
(
event
)
target
=
if
event
.
target_type
event
.
target_type
.
titleize
.
downcase
else
'project'
end
[
event
.
action_name
,
target
].
join
(
" "
)
end
def
event_image
event
event_image_path
=
if
event
.
push?
"event_push.png"
elsif
event
.
merged?
"event_mr_merged.png"
end
return
nil
unless
event_image_path
content_tag
:div
,
class:
'event_icon'
do
image_tag
event_image_path
end
end
end
app/helpers/issues_helper.rb
View file @
93bc1ff1
app/helpers/projects_helper.rb
View file @
93bc1ff1
...
@@ -6,5 +6,9 @@ module ProjectsHelper
...
@@ -6,5 +6,9 @@ module ProjectsHelper
def
remove_from_team_message
(
project
,
member
)
def
remove_from_team_message
(
project
,
member
)
"You are going to remove
#{
member
.
user_name
}
from
#{
project
.
name
}
. Are you sure?"
"You are going to remove
#{
member
.
user_name
}
from
#{
project
.
name
}
. Are you sure?"
end
end
def
link_to_project
project
link_to
project
.
name
,
project
end
end
end
app/models/event.rb
View file @
93bc1ff1
...
@@ -58,6 +58,10 @@ class Event < ActiveRecord::Base
...
@@ -58,6 +58,10 @@ class Event < ActiveRecord::Base
end
end
end
end
def
target_title
target
.
try
:title
end
def
push?
def
push?
action
==
self
.
class
::
Pushed
&&
valid_push?
action
==
self
.
class
::
Pushed
&&
valid_push?
end
end
...
...
app/views/events/_event.html.haml
View file @
93bc1ff1
-
if
event
.
allowed?
-
if
event
.
allowed?
%div
.event-item
%div
.event-item
-
if
event
.
issue?
=
event_image
(
event
)
=
render
"events/event_issue"
,
event:
event
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
-
elsif
event
.
merge_request?
-
if
event
.
push?
=
render
"events/event_merge_request"
,
event:
event
=
render
"events/event/push"
,
event:
event
-
else
-
elsif
event
.
push?
=
render
"events/event/common"
,
event:
event
=
render
"events/event_push"
,
event:
event
-
elsif
event
.
membership_changed?
=
render
"events/event_membership_changed"
,
event:
event
.clearfix
%span
.cgray.right
%span
.cgray.right
=
time_ago_in_words
(
event
.
created_at
)
=
time_ago_in_words
(
event
.
created_at
)
ago.
ago.
...
...
app/views/events/_event_issue.html.haml
deleted
100644 → 0
View file @
2022ae69
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
.event-title
%strong
.author_name
#{
event
.
author_name
}
%span
.event_label
{
class:
event
.
action_name
}
#{
event
.
action_name
}
issue
=
link_to
project_issue_path
(
event
.
project
,
event
.
issue
)
do
%strong
=
truncate
event
.
issue_title
at
%strong
=
link_to
event
.
project
.
name
,
event
.
project
app/views/events/_event_membership_changed.html.haml
deleted
100644 → 0
View file @
2022ae69
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
.event-title
%strong
.author_name
#{
event
.
author_name
}
%span
.event_label
{
class:
event
.
action_name
}
#{
event
.
action_name
}
project
%strong
=
link_to
event
.
project_name
,
event
.
project
%span
.cgray
=
time_ago_in_words
(
event
.
created_at
)
ago.
app/views/events/_event_merge_request.html.haml
deleted
100644 → 0
View file @
2022ae69
-
if
event
.
action_name
==
"merged"
.event_icon
=
image_tag
"event_mr_merged.png"
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
.event-title
%strong
.author_name
#{
event
.
author_name
}
%span
.event_label
{
class:
event
.
action_name
}
#{
event
.
action_name
}
merge request
=
link_to
project_merge_request_path
(
event
.
project
,
event
.
merge_request
)
do
%strong
=
truncate
event
.
merge_request_title
at
%strong
=
link_to
event
.
project
.
name
,
event
.
project
.event-body
.event-info
%span
=
event
.
merge_request
.
source_branch
→
%span
=
event
.
merge_request
.
target_branch
app/views/events/_event_push.html.haml
deleted
100644 → 0
View file @
2022ae69
%div
.event_icon
=
image_tag
"event_push.png"
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
.event-title
%strong
.author_name
#{
event
.
author_name
}
%span
.event_label.pushed
#{
event
.
push_action_name
}
#{
event
.
ref_type
}
-
if
event
.
rm_ref?
%strong
=
event
.
ref_name
-
else
=
link_to
project_commits_path
(
event
.
project
,
event
.
ref_name
)
do
%strong
=
event
.
ref_name
at
%strong
=
link_to
event
.
project
.
name
,
event
.
project
-
if
event
.
push_with_commits?
-
project
=
event
.
project
.event-body
%ul
.unstyled.event_commits
-
few_commits
=
event
.
commits
[
0
...
2
]
-
few_commits
.
each
do
|
commit
|
=
render
"events/commit"
,
commit:
commit
,
project:
project
-
if
event
.
commits_count
>
1
%li
.commits-stat
-
if
event
.
commits_count
>
2
%span
... and
#{
event
.
commits_count
-
2
}
more commits.
=
link_to
project_compare_path
(
event
.
project
,
from:
event
.
parent_commit
.
id
,
to:
event
.
last_commit
.
id
)
do
%strong
Compare
→
#{
event
.
parent_commit
.
id
[
0
..
7
]
}
...
#{
event
.
last_commit
.
id
[
0
..
7
]
}
.clearfix
app/views/events/event/_common.html.haml
0 → 100644
View file @
93bc1ff1
.event-title
%span
.author_name
=
link_to_author
event
%span
.event_label
{
class:
event
.
action_name
}=
event_action_name
(
event
)
=
link_to
[
event
.
project
,
event
.
target
]
do
%strong
=
truncate
event
.
target_title
at
=
link_to_project
event
.
project
app/views/events/event/_push.html.haml
0 → 100644
View file @
93bc1ff1
.event-title
%span
.author_name
=
link_to_author
event
%span
.event_label.pushed
#{
event
.
push_action_name
}
#{
event
.
ref_type
}
-
if
event
.
rm_ref?
%strong
=
event
.
ref_name
-
else
=
link_to
project_commits_path
(
event
.
project
,
event
.
ref_name
)
do
%strong
=
event
.
ref_name
at
%strong
=
link_to
event
.
project
.
name
,
event
.
project
-
if
event
.
push_with_commits?
-
project
=
event
.
project
.event-body
%ul
.unstyled.event_commits
-
few_commits
=
event
.
commits
[
0
...
2
]
-
few_commits
.
each
do
|
commit
|
=
render
"events/commit"
,
commit:
commit
,
project:
project
-
if
event
.
commits_count
>
1
%li
.commits-stat
-
if
event
.
commits_count
>
2
%span
... and
#{
event
.
commits_count
-
2
}
more commits.
=
link_to
project_compare_path
(
event
.
project
,
from:
event
.
parent_commit
.
id
,
to:
event
.
last_commit
.
id
)
do
%strong
Compare
→
#{
event
.
parent_commit
.
id
[
0
..
7
]
}
...
#{
event
.
last_commit
.
id
[
0
..
7
]
}
app/views/notes/_common_form.html.haml
View file @
93bc1ff1
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
$
(
function
(){
$
(
function
(){
var
names
=
#{
@project
.
users
.
pluck
(
:name
)
}
,
emoji
=
[
'
+1
'
,
'
-1
'
];
var
names
=
#{
@project
.
users
.
pluck
(
:name
)
}
,
emoji
=
[
'
+1
'
,
'
-1
'
];
var
emoji
=
$
.
map
(
emoji
,
function
(
value
,
i
)
{
return
{
key
:
value
+
'
:
'
,
name
:
value
}});
var
emoji
=
$
.
map
(
emoji
,
function
(
value
,
i
)
{
return
{
key
:
value
+
'
:
'
,
name
:
value
}});
$
(
'
#note_note
'
).
$
(
'
#note_note
, .per_line_form .line-note-text
'
).
atWho
(
'
@
'
,
{
data
:
names
}).
atWho
(
'
@
'
,
{
data
:
names
}).
atWho
(
'
:
'
,
{
atWho
(
'
:
'
,
{
data
:
emoji
,
data
:
emoji
,
...
...
app/views/tree/_tree.html.haml
View file @
93bc1ff1
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
%li
=
link
%li
=
link
.clear
.clear
%div
.tree_progress
%div
.tree_progress
#
tree-content-holder
%div
#tree-content-holder
.
tree-content-holder
-
if
tree
.
is_blob?
-
if
tree
.
is_blob?
=
render
partial:
"tree/tree_file"
,
locals:
{
name:
tree
.
name
,
content:
tree
.
data
,
file:
tree
}
=
render
partial:
"tree/tree_file"
,
locals:
{
name:
tree
.
name
,
content:
tree
.
data
,
file:
tree
}
-
else
-
else
-
contents
=
tree
.
contents
-
contents
=
tree
.
contents
%table
#tree-slider
{
class:
"table_#{@hex_path}"
}
%table
#tree-slider
{
class:
"table_#{@hex_path}
tree-table
"
}
%thead
%thead
%th
Name
%th
Name
%th
Last Update
%th
Last Update
...
...
app/views/tree/show.html.haml
View file @
93bc1ff1
=
render
"head"
=
render
"head"
#tree-holder
=
render
partial:
"tree"
,
locals:
{
commit:
@commit
,
tree:
@tree
}
%div
#tree-holder
.tree-holder
=
render
"tree"
,
commit:
@commit
,
tree:
@tree
:javascript
:javascript
$
(
function
()
{
$
(
function
()
{
...
...
doc/installation.md
View file @
93bc1ff1
...
@@ -112,7 +112,6 @@ Generate key:
...
@@ -112,7 +112,6 @@ Generate key:
Clone GitLab's fork of the Gitolite source code:
Clone GitLab's fork of the Gitolite source code:
cd /home/git
sudo -H -u git git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
sudo -H -u git git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
Setup:
Setup:
...
...
features/dashboard/dashboard.feature
View file @
93bc1ff1
...
@@ -18,10 +18,10 @@ Feature: Dashboard
...
@@ -18,10 +18,10 @@ Feature: Dashboard
Scenario
:
I
should see User joined Project event
Scenario
:
I
should see User joined Project event
Given
user with name
"John Doe"
joined project
"Shop"
Given
user with name
"John Doe"
joined project
"Shop"
When
I visit dashboard page
When
I visit dashboard page
Then
I should see
"John Doe joined project Shop"
event
Then
I should see
"John Doe joined project
at
Shop"
event
Scenario
:
I
should see User left Project event
Scenario
:
I
should see User left Project event
Given
user with name
"John Doe"
joined project
"Shop"
Given
user with name
"John Doe"
joined project
"Shop"
And
user with name
"John Doe"
left project
"Shop"
And
user with name
"John Doe"
left project
"Shop"
When
I visit dashboard page
When
I visit dashboard page
Then
I should see
"John Doe left project Shop"
event
Then
I should see
"John Doe left project
at
Shop"
event
features/steps/dashboard/dashboard.rb
View file @
93bc1ff1
...
@@ -41,8 +41,8 @@ class Dashboard < Spinach::FeatureSteps
...
@@ -41,8 +41,8 @@ class Dashboard < Spinach::FeatureSteps
)
)
end
end
Then
'I should see "John Doe joined project Shop" event'
do
Then
'I should see "John Doe joined project
at
Shop" event'
do
page
.
should
have_content
"John Doe joined project Shop"
page
.
should
have_content
"John Doe joined project
at
Shop"
end
end
And
'user with name "John Doe" left project "Shop"'
do
And
'user with name "John Doe" left project "Shop"'
do
...
@@ -55,8 +55,8 @@ class Dashboard < Spinach::FeatureSteps
...
@@ -55,8 +55,8 @@ class Dashboard < Spinach::FeatureSteps
)
)
end
end
Then
'I should see "John Doe left project Shop" event'
do
Then
'I should see "John Doe left project
at
Shop" event'
do
page
.
should
have_content
"John Doe left project Shop"
page
.
should
have_content
"John Doe left project
at
Shop"
end
end
And
'I own project "Shop"'
do
And
'I own project "Shop"'
do
...
...
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