22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
-user= User.where(email: creator_email).first || User.new(email: creator_email) if defined?(creator_email)
|
|
- name_with_owner = "#{project_owner}/#{project_name}"
|
|
.top
|
|
.image= link_to(image_tag(avatar_url(user, :small), alt: 'avatar'), user_path(user)) if user.try(:persisted?)
|
|
.text
|
|
%span
|
|
-_user_link = defined?(creator_email) ? user_link(user, defined?(creator_name) ? creator_name : creator_email) : nil
|
|
= raw t("notifications.bodies.#{change_type}_branch", {branch_name: branch_name, user_link: _user_link})
|
|
= raw t("notifications.bodies.project", project_link: link_to(name_with_owner, project_path(name_with_owner)) )
|
|
.both
|
|
= datetime_moment activity_feed.created_at, tag: :span, class: 'date'
|
|
.both
|
|
%span.subject
|
|
- last_commits.each do |commit|
|
|
= link_to shortest_hash_id(commit[0]), commit_path(name_with_owner, commit[0])
|
|
= commit[1]
|
|
%br
|
|
- if defined? other_commits
|
|
%br
|
|
=link_to t('notifications.bodies.more_commits', count: other_commits_count, commits: commits_pluralize(other_commits_count)),
|
|
diff_path(name_with_owner, diff: other_commits)
|