#328: updated urls in email
This commit is contained in:
parent
17b3ac4c23
commit
b4a524575d
|
@ -11,7 +11,7 @@ module ActivityFeedsHelper
|
||||||
feed_title = feed_title.gsub(/\s{2,}/, ' ').strip
|
feed_title = feed_title.gsub(/\s{2,}/, ' ').strip
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_link user, user_name
|
def user_link(user, user_name, full_url = false)
|
||||||
user.persisted? ? link_to(user_name, user_path(user)) : user_name
|
user.persisted? ? link_to(user_name, full_url ? user_url(user) : user_path(user)) : user_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- user = User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
- user = User.where(:email => user_email).first || User.new(:email => user_email) if defined?(user_email)
|
||||||
|
|
||||||
%p
|
%p
|
||||||
- _user_link = defined?(user_email) ? user_link(user, defined?(user_name) ? user_name : user_email) : nil
|
- _user_link = defined?(user_email) ? user_link(user, defined?(user_name) ? user_name : user_email, true) : nil
|
||||||
= t('notifications.bodies.delete_branch', :branch_name => branch_name, :user_link => _user_link).html_safe
|
= t('notifications.bodies.delete_branch', :branch_name => branch_name, :user_link => _user_link).html_safe
|
||||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_url(project_owner, project_name)) )
|
||||||
|
|
||||||
= render 'footer'
|
= render 'footer'
|
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
|
|
||||||
%p
|
%p
|
||||||
- _user_link = defined?(user_email) ? user_link(user, defined?(user_name) ? user_name : user_email) : nil
|
- _user_link = defined?(user_email) ? user_link(user, defined?(user_name) ? user_name : user_email, true) : nil
|
||||||
= raw t("notifications.bodies.#{change_type}_branch", {:branch_name => branch_name, :user_link => _user_link})
|
= raw t("notifications.bodies.#{change_type}_branch", {:branch_name => branch_name, :user_link => _user_link})
|
||||||
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
|
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_url(project_owner, project_name)) )
|
||||||
|
|
||||||
|
|
||||||
%p
|
%p
|
||||||
- last_commits.each do |commit|
|
- last_commits.each do |commit|
|
||||||
= link_to shortest_hash_id(commit[0]), commit_path(project_owner, project_name, commit[0])
|
= link_to shortest_hash_id(commit[0]), commit_url(project_owner, project_name, commit[0])
|
||||||
= commit[1]
|
= commit[1]
|
||||||
%br
|
%br
|
||||||
- if defined? other_commits
|
- if defined? other_commits
|
||||||
%br
|
%br
|
||||||
=link_to t('notifications.bodies.more_commits', :count => other_commits_count, :commits => commits_pluralize(other_commits_count)),
|
=link_to t('notifications.bodies.more_commits', :count => other_commits_count, :commits => commits_pluralize(other_commits_count)),
|
||||||
diff_path(project_owner, project_name, :diff => other_commits)
|
diff_url(project_owner, project_name, :diff => other_commits)
|
||||||
|
|
||||||
= render 'footer'
|
= render 'footer'
|
Loading…
Reference in New Issue