summaryrefslogtreecommitdiff
path: root/app/views/notes
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-17 22:35:45 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-17 22:35:45 +0200
commit2e9c0e2b47ab1813a96af7afa08f4449eb4e2c2d (patch)
tree3e2e78c64f42060b7fc586f0c612ddbc807d5765 /app/views/notes
parent843ea5bf2239be273e684de4f4d99077c5fa5e0e (diff)
downloadgitlab-ce-2e9c0e2b47ab1813a96af7afa08f4449eb4e2c2d.tar.gz
switch to use link_to_member to prevent 500 if user is a project owner but does not have membership and leave comment
Diffstat (limited to 'app/views/notes')
-rw-r--r--app/views/notes/_discussion.html.haml4
-rw-r--r--app/views/notes/_note.html.haml2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/notes/_discussion.html.haml b/app/views/notes/_discussion.html.haml
index 093775f0d88..a9a11fc2d7e 100644
--- a/app/views/notes/_discussion.html.haml
+++ b/app/views/notes/_discussion.html.haml
@@ -10,7 +10,7 @@
Show discussion
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
%div
- = link_to note.author_name, project_team_member_path(@project, @project.team_member_by_id(note.author)), class: "note-author"
+ = link_to_member(@project, note.author, avatar: false)
- if note.for_merge_request?
- if note.diff
started a discussion on this merge request diff
@@ -30,7 +30,7 @@
%div
- last_note = discussion_notes.last
last updated by
- = link_to last_note.author_name, project_team_member_path(@project, @project.team_member_by_id(last_note.author)), class: "note-author"
+ = link_to_member(@project, last_note.author, avatar: false)
%span.discussion-last-update
= time_ago_in_words(last_note.updated_at)
ago
diff --git a/app/views/notes/_note.html.haml b/app/views/notes/_note.html.haml
index dd5d7c1ba8c..9efeb563e0a 100644
--- a/app/views/notes/_note.html.haml
+++ b/app/views/notes/_note.html.haml
@@ -9,7 +9,7 @@
= link_to project_note_path(@project, note), title: "Remove comment", method: :delete, confirm: 'Are you sure you want to remove comment?', remote: true, class: "danger js-note-delete" do
%i.icon-trash.cred
= image_tag gravatar_icon(note.author.email), class: "avatar s32"
- = link_to note.author_name, project_team_member_path(@project, @project.team_member_by_id(note.author)), class: "note-author"
+ = link_to_member(@project, note.author, avatar: false)
%span.note-last-update
= time_ago_in_words(note.updated_at)
ago