Commit 5058c4fd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix wall notes event trying to render target

parent 59241299
...@@ -18,4 +18,16 @@ module NoteEvent ...@@ -18,4 +18,16 @@ module NoteEvent
def note_target_id def note_target_id
target.noteable_id target.noteable_id
end end
def wall_note?
target.noteable_type.blank?
end
def note_target_type
if target.noteable_type.present?
target.noteable_type.titleize
else
"Wall"
end.downcase
end
end end
.event-title .event-title
%span.author_name= link_to_author event %span.author_name= link_to_author event
%span.event_label commented on #{event.target.noteable_type_name} %span.event_label commented on #{event.note_target_type}
- if event.target and event.note_target - if event.note_target
- if event.note_commit? - if event.note_commit?
= link_to event.note_short_commit_id, project_commit_path(event.project, event.note_commit_id), class: "commit_short_id" = link_to event.note_short_commit_id, project_commit_path(event.project, event.note_commit_id), class: "commit_short_id"
- else - else
= link_to [event.project, event.note_target] do = link_to [event.project, event.note_target] do
%strong= truncate event.note_target_id %strong= truncate event.note_target_id
- elsif event.wall_note?
-# nothing here
- else - else
%strong (deleted) %strong (deleted)
at at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment