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
b4868a89
Commit
b4868a89
authored
Nov 06, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved commit author detection
parent
f87f0201
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
app/models/project.rb
app/models/project.rb
+5
-0
app/views/projects/_tree_item.html.haml
app/views/projects/_tree_item.html.haml
+3
-3
No files found.
app/models/project.rb
View file @
b4868a89
...
...
@@ -50,6 +50,11 @@ class Project < ActiveRecord::Base
code
end
def
team_member_by_name_or_email
(
email
=
nil
,
name
=
nil
)
user
=
users
.
where
(
"email like ? or name like ?"
,
email
,
name
).
first
users_projects
.
find_by_user_id
(
user
.
id
)
if
user
end
def
common_notes
notes
.
where
(
:noteable_type
=>
[
""
,
nil
])
end
...
...
app/views/projects/_tree_item.html.haml
View file @
b4868a89
...
...
@@ -13,6 +13,6 @@
ago
%td
.commit
=
link_to
truncate
(
content_commit
.
safe_message
,
:length
=>
fixed_mode?
?
40
:
80
),
project_commit_path
(
@project
,
content_commit
),
:class
=>
"tree-commit-link"
-
user
=
@project
.
users
.
find_by_email
(
content_commit
.
author_email
)
-
if
user
=
link_to
"[
#{
user
.
name
}
]"
,
project_team_member_path
(
@project
,
@project
.
users_projects
.
find_by_user_id
(
user
.
id
)
)
-
tm
=
@project
.
team_member_by_name_or_email
(
content_commit
.
author_email
,
content_commit
.
author_name
)
-
if
tm
=
link_to
"[
#{
tm
.
user_name
}
]"
,
project_team_member_path
(
@project
,
tm
)
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