summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/notify/pipeline_failed_email.html.haml10
-rw-r--r--app/views/notify/pipeline_success_email.html.haml10
2 files changed, 8 insertions, 12 deletions
diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml
index e76411755e7..7c95ea699a2 100644
--- a/app/views/notify/pipeline_failed_email.html.haml
+++ b/app/views/notify/pipeline_failed_email.html.haml
@@ -76,12 +76,10 @@
%tr
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;"} Project
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;"}
- - if @project.group
- %a.muted{href: group_url(@project.group), style: "color:#333333;text-decoration:none;"}
- = @project.group.name
- - else
- %a.muted{href: user_url(@project.namespace.owner), style: "color:#333333;text-decoration:none;"}
- = @project.namespace.owner.name
+ - namespace_name = @project.group ? @project.group.name : @project.namespace.owner.name
+ - namespace_url = @project.group ? group_url(@project.group) : user_url(@project.namespace.owner)
+ %a.muted{href: namespace_url, style: "color:#333333;text-decoration:none;"}
+ = namespace_name
\/
%a.muted{href: project_url(@project), style: "color:#333333;text-decoration:none;"}
= @project.name
diff --git a/app/views/notify/pipeline_success_email.html.haml b/app/views/notify/pipeline_success_email.html.haml
index 4696726b75e..23b4f645d78 100644
--- a/app/views/notify/pipeline_success_email.html.haml
+++ b/app/views/notify/pipeline_success_email.html.haml
@@ -76,12 +76,10 @@
%tr
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;"} Project
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;"}
- - if @project.group
- %a.muted{href: group_url(@project.group), style: "color:#333333;text-decoration:none;"}
- = @project.group.name
- - else
- %a.muted{href: user_url(@project.namespace.owner), style: "color:#333333;text-decoration:none;"}
- = @project.namespace.owner.name
+ - namespace_name = @project.group ? @project.group.name : @project.namespace.owner.name
+ - namespace_url = @project.group ? group_url(@project.group) : user_url(@project.namespace.owner)
+ %a.muted{href: namespace_url, style: "color:#333333;text-decoration:none;"}
+ = namespace_name
\/
%a.muted{href: project_url(@project), style: "color:#333333;text-decoration:none;"}
= @project.name