Commit 529feb4b40bacf2a35cd76501ec1b56788bc9b14
1 parent
96f3a88c
Exists in
master
and in
4 other branches
Add comment title to rss feed
Showing
4 changed files
with
9 additions
and
7 deletions
Show diff stats
app/helpers/events_helper.rb
... | ... | @@ -45,13 +45,15 @@ module EventsHelper |
45 | 45 | |
46 | 46 | def event_feed_title(event) |
47 | 47 | if event.issue? |
48 | - "#{event.author_name} #{event.action_name} issue ##{event.target_id}: #{event.issue_title} at #{event.project.name}" | |
48 | + "#{event.author_name} #{event.action_name} issue ##{event.target_id}: #{event.issue_title} at #{event.project_name}" | |
49 | 49 | elsif event.merge_request? |
50 | - "#{event.author_name} #{event.action_name} MR ##{event.target_id}: #{event.merge_request_title} at #{event.project.name}" | |
50 | + "#{event.author_name} #{event.action_name} MR ##{event.target_id}: #{event.merge_request_title} at #{event.project_name}" | |
51 | 51 | elsif event.push? |
52 | - "#{event.author_name} #{event.push_action_name} #{event.ref_type} #{event.ref_name} at #{event.project.name}" | |
52 | + "#{event.author_name} #{event.push_action_name} #{event.ref_type} #{event.ref_name} at #{event.project_name}" | |
53 | 53 | elsif event.membership_changed? |
54 | - "#{event.author_name} #{event.action_name} #{event.project.name}" | |
54 | + "#{event.author_name} #{event.action_name} #{event.project_name}" | |
55 | + elsif event.note? | |
56 | + "#{event.author_name} commented on #{event.note_target_type} ##{truncate event.note_target_id} at #{event.project_name}" | |
55 | 57 | else |
56 | 58 | "" |
57 | 59 | end | ... | ... |
app/models/event.rb
app/views/notes/_discussion.html.haml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | = link_to "javascript:;", class: "js-details-target turn-off js-toggler-target" do |
9 | 9 | %i.icon-eye-open |
10 | 10 | Show discussion |
11 | - = image_tag gravatar_icon(note.author.email), class: "avatar s32" | |
11 | + = image_tag gravatar_icon(note.author_email), class: "avatar s32" | |
12 | 12 | %div |
13 | 13 | = link_to_member(@project, note.author, avatar: false) |
14 | 14 | - if note.for_merge_request? | ... | ... |
app/views/notes/_note.html.haml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) |
9 | 9 | = 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 |
10 | 10 | %i.icon-trash.cred |
11 | - = image_tag gravatar_icon(note.author.email), class: "avatar s32" | |
11 | + = image_tag gravatar_icon(note.author_email), class: "avatar s32" | |
12 | 12 | = link_to_member(@project, note.author, avatar: false) |
13 | 13 | %span.note-last-update |
14 | 14 | = time_ago_in_words(note.updated_at) | ... | ... |