diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-13 01:43:23 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-13 01:45:46 +0800 |
commit | 16e6431c83af0a3c862a0e306f1810774033a6bb (patch) | |
tree | dc047cb61829f0ac19e3a7543a6772122c513065 /app/views/notify | |
parent | c33e2f0ae923a5f84218a47ef111a1bc87cbb27f (diff) | |
download | gitlab-ce-16e6431c83af0a3c862a0e306f1810774033a6bb.tar.gz |
Use helpers from GitlabRoutingHelper, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16832930
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16832936
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16833033
Diffstat (limited to 'app/views/notify')
4 files changed, 8 insertions, 8 deletions
diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index 89cbcba67e5..e76411755e7 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -83,7 +83,7 @@ %a.muted{href: user_url(@project.namespace.owner), style: "color:#333333;text-decoration:none;"} = @project.namespace.owner.name \/ - %a.muted{href: namespace_project_url(@project.namespace, @project), style: "color:#333333;text-decoration:none;"} + %a.muted{href: project_url(@project), style: "color:#333333;text-decoration:none;"} = @project.name %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;border-top:1px solid #ededed;"} Branch @@ -109,7 +109,7 @@ = @pipeline.short_sha - if @merge_request in - %a{href: namespace_project_merge_request_url(@project.namespace, @project, @merge_request), style: "color:#3084bb;text-decoration:none;"} + %a{href: merge_request_url(@merge_request), style: "color:#3084bb;text-decoration:none;"} = @merge_request.to_reference .commit{style: "color:#5c5c5c;font-weight:300;"} = @pipeline.git_commit_message.truncate(50) diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index 56379411be4..b632d94facc 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -1,9 +1,9 @@ Your pipeline has failed. -Project: <%= @project.name %> ( <%= namespace_project_url(@project.namespace, @project) %> ) +Project: <%= @project.name %> ( <%= project_url(@project) %> ) Branch: <%= @pipeline.ref %> ( <%= namespace_project_commits_url(@project.namespace, @project, @pipeline.ref) %> ) <% if @merge_request -%> -Merge Request: <%= @merge_request.to_reference %> ( <%= namespace_project_merge_request_url(@project.namespace, @project, @merge_request) %> ) +Merge Request: <%= @merge_request.to_reference %> ( <%= merge_request_url(@merge_request) %> ) <% end -%> Commit: <%= @pipeline.short_sha %> ( <%= namespace_project_commit_url(@project.namespace, @project, @pipeline.sha) %> ) diff --git a/app/views/notify/pipeline_success_email.html.haml b/app/views/notify/pipeline_success_email.html.haml index 4e96a95147a..4696726b75e 100644 --- a/app/views/notify/pipeline_success_email.html.haml +++ b/app/views/notify/pipeline_success_email.html.haml @@ -83,7 +83,7 @@ %a.muted{href: user_url(@project.namespace.owner), style: "color:#333333;text-decoration:none;"} = @project.namespace.owner.name \/ - %a.muted{href: namespace_project_url(@project.namespace, @project), style: "color:#333333;text-decoration:none;"} + %a.muted{href: project_url(@project), style: "color:#333333;text-decoration:none;"} = @project.name %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;border-top:1px solid #ededed;"} Branch @@ -109,7 +109,7 @@ = @pipeline.short_sha - if @merge_request in - %a{href: namespace_project_merge_request_url(@project.namespace, @project, @merge_request), style: "color:#3084bb;text-decoration:none;"} + %a{href: merge_request_url(@merge_request), style: "color:#3084bb;text-decoration:none;"} = @merge_request.to_reference .commit{style: "color:#5c5c5c;font-weight:300;"} = @pipeline.git_commit_message.truncate(50) diff --git a/app/views/notify/pipeline_success_email.text.erb b/app/views/notify/pipeline_success_email.text.erb index 29b290d9704..15f22905bc6 100644 --- a/app/views/notify/pipeline_success_email.text.erb +++ b/app/views/notify/pipeline_success_email.text.erb @@ -1,9 +1,9 @@ Your pipeline has passed. -Project: <%= @project.name %> ( <%= namespace_project_url(@project.namespace, @project) %> ) +Project: <%= @project.name %> ( <%= project_url(@project) %> ) Branch: <%= @pipeline.ref %> ( <%= namespace_project_commits_url(@project.namespace, @project, @pipeline.ref) %> ) <% if @merge_request -%> -Merge Request: <%= @merge_request.to_reference %> ( <%= namespace_project_merge_request_url(@project.namespace, @project, @merge_request) %> ) +Merge Request: <%= @merge_request.to_reference %> ( <%= merge_request_url(@merge_request) %> ) <% end -%> Commit: <%= @pipeline.short_sha %> ( <%= namespace_project_commit_url(@project.namespace, @project, @pipeline.sha) %> ) |