Commit 529feb4b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add comment title to rss feed

parent 96f3a88c
...@@ -45,13 +45,15 @@ module EventsHelper ...@@ -45,13 +45,15 @@ module EventsHelper
def event_feed_title(event) def event_feed_title(event)
if event.issue? if event.issue?
"#{event.author_name} #{event.action_name} issue ##{event.target_id}: #{event.issue_title} at #{event.project.name}" "#{event.author_name} #{event.action_name} issue ##{event.target_id}: #{event.issue_title} at #{event.project_name}"
elsif event.merge_request? elsif event.merge_request?
"#{event.author_name} #{event.action_name} MR ##{event.target_id}: #{event.merge_request_title} at #{event.project.name}" "#{event.author_name} #{event.action_name} MR ##{event.target_id}: #{event.merge_request_title} at #{event.project_name}"
elsif event.push? elsif event.push?
"#{event.author_name} #{event.push_action_name} #{event.ref_type} #{event.ref_name} at #{event.project.name}" "#{event.author_name} #{event.push_action_name} #{event.ref_type} #{event.ref_name} at #{event.project_name}"
elsif event.membership_changed? elsif event.membership_changed?
"#{event.author_name} #{event.action_name} #{event.project.name}" "#{event.author_name} #{event.action_name} #{event.project_name}"
elsif event.note?
"#{event.author_name} commented on #{event.note_target_type} ##{truncate event.note_target_id} at #{event.project_name}"
else else
"" ""
end end
......
...@@ -68,7 +68,7 @@ class Event < ActiveRecord::Base ...@@ -68,7 +68,7 @@ class Event < ActiveRecord::Base
def project_name def project_name
if project if project
project.name project.name_with_namespace
else else
"(deleted project)" "(deleted project)"
end end
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= link_to "javascript:;", class: "js-details-target turn-off js-toggler-target" do = link_to "javascript:;", class: "js-details-target turn-off js-toggler-target" do
%i.icon-eye-open %i.icon-eye-open
Show discussion Show discussion
= image_tag gravatar_icon(note.author.email), class: "avatar s32" = image_tag gravatar_icon(note.author_email), class: "avatar s32"
%div %div
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
- if note.for_merge_request? - if note.for_merge_request?
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
= 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 = 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 %i.icon-trash.cred
= image_tag gravatar_icon(note.author.email), class: "avatar s32" = image_tag gravatar_icon(note.author_email), class: "avatar s32"
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
%span.note-last-update %span.note-last-update
= time_ago_in_words(note.updated_at) = time_ago_in_words(note.updated_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