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
Jérome Perrin
gitlab-ce
Commits
c90f1d5c
Commit
c90f1d5c
authored
Feb 05, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue, mr crash if assignee/author removed from team
parent
5a12bee3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
14 deletions
+49
-14
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+22
-0
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+21
-0
app/views/issues/_show.html.haml
app/views/issues/_show.html.haml
+1
-3
app/views/issues/show.html.haml
app/views/issues/show.html.haml
+2
-4
app/views/merge_requests/_merge_request.html.haml
app/views/merge_requests/_merge_request.html.haml
+1
-3
app/views/merge_requests/show.html.haml
app/views/merge_requests/show.html.haml
+2
-4
No files found.
app/helpers/issues_helper.rb
View file @
c90f1d5c
...
...
@@ -9,4 +9,26 @@ module IssuesHelper
params
[
:f
]
||=
cookies
[
'issue_filter'
]
project_issues_path
project
,
params
end
def
link_to_issue_assignee
(
issue
)
project
=
issue
.
project
tm
=
project
.
team_member_by_id
(
issue
.
assignee_id
)
if
tm
link_to
issue
.
assignee_name
,
project_team_member_path
(
project
,
tm
),
:class
=>
"author_link"
else
issue
.
assignee_name
end
end
def
link_to_issue_author
(
issue
)
project
=
issue
.
project
tm
=
project
.
team_member_by_id
(
issue
.
author_id
)
if
tm
link_to
issue
.
author_name
,
project_team_member_path
(
project
,
tm
),
:class
=>
"author_link"
else
issue
.
author_name
end
end
end
app/helpers/merge_requests_helper.rb
View file @
c90f1d5c
module
MergeRequestsHelper
def
link_to_merge_request_assignee
(
merge_request
)
project
=
merge_request
.
project
tm
=
project
.
team_member_by_id
(
merge_request
.
assignee_id
)
if
tm
link_to
merge_request
.
assignee_name
,
project_team_member_path
(
project
,
tm
),
:class
=>
"author_link"
else
merge_request
.
assignee_name
end
end
def
link_to_merge_request_author
(
merge_request
)
project
=
merge_request
.
project
tm
=
project
.
team_member_by_id
(
merge_request
.
author_id
)
if
tm
link_to
merge_request
.
author_name
,
project_team_member_path
(
project
,
tm
),
:class
=>
"author_link"
else
merge_request
.
author_name
end
end
end
app/views/issues/_show.html.haml
View file @
c90f1d5c
...
...
@@ -2,9 +2,7 @@
=
image_tag
gravatar_icon
(
issue
.
assignee_email
),
:class
=>
"avatar"
%span
.update-author
assigned to
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
issue
.
author_id
)),
:class
=>
"author_link"
do
=
issue
.
assignee_name
%strong
=
link_to_issue_assignee
(
issue
)
-
if
issue
.
critical
%span
.label.important
critical
-
if
issue
.
today?
...
...
app/views/issues/show.html.haml
View file @
c90f1d5c
...
...
@@ -25,13 +25,11 @@
%div
%cite
.cgray
Created by
=
image_tag
gravatar_icon
(
@issue
.
author_email
),
:width
=>
16
,
:class
=>
"lil_av"
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@issue
.
author
.
id
))
do
%strong
.author
=
@issue
.
author_name
%strong
.author
=
link_to_issue_author
(
@issue
)
%cite
.cgray
and currently assigned to
=
image_tag
gravatar_icon
(
@issue
.
assignee_email
),
:width
=>
16
,
:class
=>
"lil_av"
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@issue
.
assignee
.
id
))
do
%strong
.author
=
@issue
.
assignee_name
%strong
.author
=
link_to_issue_assignee
(
@issue
)
%hr
...
...
app/views/merge_requests/_merge_request.html.haml
View file @
c90f1d5c
%li
.wll
=
image_tag
gravatar_icon
(
merge_request
.
author_email
),
:class
=>
"avatar"
%span
.update-author
%strong
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
merge_request
.
author_id
)),
:class
=>
"author_link"
do
=
merge_request
.
author_name
%strong
=
link_to_merge_request_author
(
merge_request
)
authored
=
time_ago_in_words
(
merge_request
.
created_at
)
ago
...
...
app/views/merge_requests/show.html.haml
View file @
c90f1d5c
...
...
@@ -30,13 +30,11 @@
%div
%cite
.cgray
Created by
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
:width
=>
16
,
:class
=>
"lil_av"
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
author
.
id
))
do
%strong
.author
=
@merge_request
.
author_name
%strong
.author
=
link_to_merge_request_author
(
@merge_request
)
%cite
.cgray
and currently assigned to
=
image_tag
gravatar_icon
(
@merge_request
.
assignee_email
),
:width
=>
16
,
:class
=>
"lil_av"
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
assignee
.
id
))
do
%strong
.author
=
@merge_request
.
assignee_name
%strong
.author
=
link_to_merge_request_assignee
(
@merge_request
)
%hr
...
...
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