Merge pull request #949 from warpc/946-wrong_links
[refs #946] fixed wrong user links in activity feed
This commit is contained in:
commit
f0a1fac070
|
@ -10,4 +10,8 @@ module ActivityFeedsHelper
|
|||
# removes multiple whitespaces in a row and strip it:
|
||||
feed_title = feed_title.gsub(/\s{2,}/, ' ').strip
|
||||
end
|
||||
|
||||
def user_link user, user_name
|
||||
user.persisted? ? link_to(user_name, user_path(user)) : user_name
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
-user= User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
||||
.top
|
||||
- if defined?(user_email)
|
||||
.image
|
||||
= image_tag(avatar_url_by_email(user_email, :small), :alt => 'avatar')
|
||||
.image= link_to(image_tag(avatar_url(user, :small), :alt => 'avatar'), user_path(user)) if user.persisted?
|
||||
.text
|
||||
%span
|
||||
= raw t("notifications.bodies.#{change_type}_branch", {:branch_name => branch_name, :user_link => defined?(user_name) ? link_to(user_name, user_path(user_id)) : user_email})
|
||||
= raw t("notifications.bodies.#{change_type}_branch", {:branch_name => branch_name, :user_link => user_link(user, user_name)})
|
||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
||||
.both
|
||||
%span.date= activity_feed.created_at
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-user= User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
||||
.top
|
||||
.image
|
||||
= image_tag(avatar_url_by_email(user_email, :small), :alt => 'avatar')
|
||||
.image= link_to(image_tag(avatar_url(user, :small), :alt => 'avatar'), user_path(user)) if user.persisted?
|
||||
.text
|
||||
%span
|
||||
= raw t("notifications.bodies.new_comment_notification.title", :user_link => link_to(user_name, user_path(user_id)) )
|
||||
= raw t("notifications.bodies.new_comment_notification.title", :user_link => user_link(user, user_name))
|
||||
= raw t("notifications.bodies.new_comment_notification.commit_content", {:commit_link => link_to(commit_message, commit_path(project_owner, project_name, commit_id) + "#comment#{comment_id}")})
|
||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
||||
.both
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-user= User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
||||
.top
|
||||
.image
|
||||
= image_tag(avatar_url_by_email(user_email, :small), :alt => 'avatar')
|
||||
.image= link_to(image_tag(avatar_url(user, :small), :alt => 'avatar'), user_path(user)) if user.persisted?
|
||||
.text
|
||||
%span
|
||||
= raw t("notifications.bodies.new_comment_notification.title", {:user_link => link_to(user_name, user_path(user_id))})
|
||||
= raw t("notifications.bodies.new_comment_notification.title", {:user_link => user_link(user, user_name)})
|
||||
= raw t("notifications.bodies.new_comment_notification.content", {:issue_link => link_to(issue_title, project_issue_path(project_owner, project_name, issue_serial_id) + "#comment#{comment_id}")})
|
||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
||||
.both
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-user= User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
||||
.top
|
||||
.image
|
||||
= image_tag(avatar_url_by_email(user_email, :small), :alt => 'avatar')
|
||||
.image= link_to(image_tag(avatar_url(user, :small), :alt => 'avatar'), user_path(user)) if user.persisted?
|
||||
.text
|
||||
%span
|
||||
= raw t("notifications.bodies.new_issue_notification", { :user_link => link_to(user_name, user_path(user_id)), :issue_link => project_issue_path(project_owner, project_name, issue_serial_id)})
|
||||
= raw t("notifications.bodies.new_issue_notification", { :user_link => user_link(user, user_name), :issue_link => project_issue_path(project_owner, project_name, issue_serial_id)})
|
||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
||||
.both
|
||||
%span.date= activity_feed.created_at
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-user= User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
||||
.top
|
||||
.image
|
||||
= image_tag(avatar_url_by_email(user_email, :small), :alt => 'avatar')
|
||||
.image= link_to(image_tag(avatar_url(user, :small), :alt => 'avatar'), user_path(user)) if user.persisted?
|
||||
.text
|
||||
%span
|
||||
= raw t("notifications.bodies.wiki_new_commit_notification", {:user_link => user_name, :history_link => link_to("wiki", history_project_wiki_index_path(project_owner, project_name))})
|
||||
= raw t("notifications.bodies.wiki_new_commit_notification", {:user_link => user_link(user, user_name), :history_link => link_to("wiki", history_project_wiki_index_path(project_owner, project_name))})
|
||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
||||
.both
|
||||
%span.date= activity_feed.created_at
|
||||
|
|
Loading…
Reference in New Issue