diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 21:06:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 21:06:30 +0000 |
commit | 6e3880e2bb5a404467c64edc916d9edf7556d09d (patch) | |
tree | 95cfb0de65623b7015b9d1a8c9ebb559a9358033 /app/views | |
parent | 6d31b8f052d30b7e55128d17b66bceed8c6065a9 (diff) | |
download | gitlab-ce-6e3880e2bb5a404467c64edc916d9edf7556d09d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/_mailer.html.haml | 72 | ||||
-rw-r--r-- | app/views/notify/member_access_denied_email.html.haml | 11 | ||||
-rw-r--r-- | app/views/notify/member_access_granted_email.html.haml | 16 | ||||
-rw-r--r-- | app/views/notify/member_access_requested_email.html.haml | 9 | ||||
-rw-r--r-- | app/views/notify/member_invite_accepted_email.html.haml | 13 | ||||
-rw-r--r-- | app/views/notify/member_invite_declined_email.html.haml | 11 | ||||
-rw-r--r-- | app/views/notify/member_invited_email.html.haml | 27 | ||||
-rw-r--r-- | app/views/projects/blob/_header.html.haml | 13 |
8 files changed, 80 insertions, 92 deletions
diff --git a/app/views/layouts/_mailer.html.haml b/app/views/layouts/_mailer.html.haml index 6e8294d6adc..24b8138078d 100644 --- a/app/views/layouts/_mailer.html.haml +++ b/app/views/layouts/_mailer.html.haml @@ -1,80 +1,48 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> %html{ lang: "en" } %head %meta{ content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type" }/ %meta{ content: "width=device-width, initial-scale=1", name: "viewport" }/ %meta{ content: "IE=edge", "http-equiv" => "X-UA-Compatible" }/ %title= message.subject - :css - /* CLIENT-SPECIFIC STYLES */ - body, table, td, a { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } - table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; } - img { -ms-interpolation-mode: bicubic; } - .hidden { - display: none !important; - visibility: hidden !important; - } - /* iOS BLUE LINKS */ - a[x-apple-data-detectors] { - color: inherit !important; - text-decoration: none !important; - font-size: inherit !important; - font-family: inherit !important; - font-weight: inherit !important; - line-height: inherit !important; - } + -# Avoid premailer processing of client-specific styles (@media tag not supported) + -# We need to inline the contents here because mail clients (e.g. iOS Mail, Outlook) + -# do not support linked stylesheets. + %style{ type: 'text/css', 'data-premailer': 'ignore' } + = asset_to_string('mailer_client_specific.css').html_safe - /* ANDROID MARGIN HACK */ - body { margin:0 !important; } - div[style*="margin: 16px 0"] { margin:0 !important; } - - @media only screen and (max-width: 639px) { - body, #body { - min-width: 320px !important; - } - table.wrapper { - width: 100% !important; - min-width: 320px !important; - } - table.wrapper > tbody > tr > td { - border-left: 0 !important; - border-right: 0 !important; - border-radius: 0 !important; - padding-left: 10px !important; - padding-right: 10px !important; - } - } - %body{ style: "background-color:#fafafa;margin:0;padding:0;text-align:center;min-width:640px;width:100%;height:100%;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" } - %table#body{ border: "0", cellpadding: "0", cellspacing: "0", style: "background-color:#fafafa;margin:0;padding:0;text-align:center;min-width:640px;width:100%;" } + = stylesheet_link_tag 'mailer.css' + %body + %table#body{ border: "0", cellpadding: "0", cellspacing: "0" } %tbody %tr.line - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" } + %td %tr.header - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" } + %td = html_header_message = header_logo %tr - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" } - %table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" } + %td + %table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0" } %tbody %tr - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#ffffff;text-align:left;padding:18px 25px;border:1px solid #ededed;border-radius:3px;overflow:hidden;" } - %table.content{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:100%;border-collapse:separate;border-spacing:0;" } + %td.wrapper-cell + %table.content{ border: "0", cellpadding: "0", cellspacing: "0" } %tbody = yield = render_if_exists 'layouts/mailer/additional_text' %tr.footer - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" } - %img{ alt: "GitLab", height: "33", src: image_url('mailers/gitlab_footer_logo.gif'), style: "display:block;margin:0 auto 1em;", width: "90" }/ + %td + %img{ alt: "GitLab", height: "33", width: "90", src: image_url('mailers/gitlab_footer_logo.gif') } %div - - manage_notifications_link = link_to(_("Manage all notifications"), profile_notifications_url, style: "color:#3777b0;text-decoration:none;") - - help_link = link_to(_("Help"), help_url, style: "color:#3777b0;text-decoration:none;") + - manage_notifications_link = link_to(_("Manage all notifications"), profile_notifications_url, class: 'mng-notif-link') + - help_link = link_to(_("Help"), help_url, class: 'help-link') = _("You're receiving this email because of your account on %{host}. %{manage_notifications_link} · %{help_link}").html_safe % { host: Gitlab.config.gitlab.host, manage_notifications_link: manage_notifications_link, help_link: help_link } = yield :additional_footer %tr - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" } + %td.footer-message = html_footer_message diff --git a/app/views/notify/member_access_denied_email.html.haml b/app/views/notify/member_access_denied_email.html.haml index 71c9c50071a..11661a423dd 100644 --- a/app/views/notify/member_access_denied_email.html.haml +++ b/app/views/notify/member_access_denied_email.html.haml @@ -1,4 +1,7 @@ -%p - Your request to join the - #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular} - has been denied. +%tr + %td.text-content + %p + Your request to join the + #{link_to member_source.human_name, member_source.web_url, class: :highlight} #{member_source.model_name.singular} + has been #{content_tag :span, 'denied', class: :highlight}. + diff --git a/app/views/notify/member_access_granted_email.html.haml b/app/views/notify/member_access_granted_email.html.haml index 1c50dba9c97..e28a10a243f 100644 --- a/app/views/notify/member_access_granted_email.html.haml +++ b/app/views/notify/member_access_granted_email.html.haml @@ -1,10 +1,14 @@ - link_end = '</a>'.html_safe - source_type = member_source.model_name.singular - leave_link = polymorphic_url([member_source], leave: 1) -- source_link = link_to(member_source.human_name, member_source.web_url, target: '_blank', rel: 'noopener noreferrer') +- source_link = link_to(member_source.human_name, member_source.web_url, target: '_blank', rel: 'noopener noreferrer', class: :highlight) +- access_level = content_tag(:span, member.human_access, class: :highlight) + +%tr + %td.text-content + %p + = _('You have been granted %{access_level} access to the %{source_link} %{source_type}.').html_safe % { access_level: access_level, source_link: source_link, source_type: source_type } + %p + - leave_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: leave_link } + = _('If this was a mistake you can %{leave_link_start}leave the %{source_type}%{link_end}.').html_safe % { source_type: source_type, leave_link_start: leave_link_start, link_end: link_end } -%p - = _('You have been granted %{access_level} access to the %{source_link} %{source_type}.').html_safe % { access_level: member.human_access, source_link: source_link, source_type: source_type } -%p - - leave_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: leave_link } - = _('If this was a mistake you can %{leave_link_start}leave the %{source_type}%{link_end}.').html_safe % { source_type: source_type, leave_link_start: leave_link_start, link_end: link_end } diff --git a/app/views/notify/member_access_requested_email.html.haml b/app/views/notify/member_access_requested_email.html.haml index 76f1f08a0cb..43f25af3dba 100644 --- a/app/views/notify/member_access_requested_email.html.haml +++ b/app/views/notify/member_access_requested_email.html.haml @@ -1,3 +1,6 @@ -%p - #{link_to member.user.name, member.user} requested #{member.human_access} - access to the #{link_to member_source.human_name, polymorphic_url([member_source, :members])} #{member_source.model_name.singular}. +%tr + %td.text-content + %p + #{link_to member.user.name, member.user, class: :highlight} requested #{content_tag :span, member.human_access, class: :highlight} + access to the #{link_to member_source.human_name, polymorphic_url([member_source, :members]), class: :highlight} #{member_source.model_name.singular}. + diff --git a/app/views/notify/member_invite_accepted_email.html.haml b/app/views/notify/member_invite_accepted_email.html.haml index 2d1d40881eb..0abb79000e0 100644 --- a/app/views/notify/member_invite_accepted_email.html.haml +++ b/app/views/notify/member_invite_accepted_email.html.haml @@ -1,5 +1,8 @@ -%p - #{member.invite_email}, now known as - #{link_to member.user.name, user_url(member.user)}, - has accepted your invitation to join the - #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular}. +%tr + %td.text-content + %p + #{content_tag :span, member.invite_email, class: :highlight}, now known as + #{link_to member.user.name, user_url(member.user)}, + has accepted your invitation to join the + #{link_to member_source.human_name, member_source.web_url, class: :highlight} #{member_source.model_name.singular}. + diff --git a/app/views/notify/member_invite_declined_email.html.haml b/app/views/notify/member_invite_declined_email.html.haml index aa1b373d1a6..5e626767235 100644 --- a/app/views/notify/member_invite_declined_email.html.haml +++ b/app/views/notify/member_invite_declined_email.html.haml @@ -1,4 +1,7 @@ -%p - #{@invite_email} - has declined your invitation to join the - #{link_to member_source.human_name, member_source.web_url} #{member_source.model_name.singular}. +%tr + %td.text-content + %p + #{content_tag :span, @invite_email, class: :highlight} + has #{content_tag :span, 'declined', class: :highlight} your invitation to join the + #{link_to member_source.human_name, member_source.web_url, class: :highlight} #{member_source.model_name.singular}. + diff --git a/app/views/notify/member_invited_email.html.haml b/app/views/notify/member_invited_email.html.haml index 6730172242b..ae3fecf404a 100644 --- a/app/views/notify/member_invited_email.html.haml +++ b/app/views/notify/member_invited_email.html.haml @@ -1,13 +1,16 @@ -%p - You have been invited - - if member.created_by - by - = link_to member.created_by.name, user_url(member.created_by) - to join the - = link_to member_source.human_name, member_source.public? ? member_source.web_url : invite_url(@token) - #{member_source.model_name.singular} as #{member.human_access}. +%tr + %td.text-content + %p + You have been invited + - if member.created_by + by + = link_to member.created_by.name, user_url(member.created_by) + to join the + = link_to member_source.human_name, member_source.public? ? member_source.web_url : invite_url(@token), class: :highlight + #{member_source.model_name.singular} as #{content_tag :span, member.human_access, class: :highlight}. + + %p + = link_to 'Accept invitation', invite_url(@token) + or + = link_to 'decline', decline_invite_url(@token) -%p - = link_to 'Accept invitation', invite_url(@token) - or - = link_to 'decline', decline_invite_url(@token) diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index 84ccd816d80..77245114772 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -6,17 +6,18 @@ = render 'projects/blob/viewer_switcher', blob: blob unless blame .btn-group{ role: "group" }< - = copy_blob_source_button(blob) unless blame - = open_raw_blob_button(blob) - = download_blob_button(blob) - = view_on_environment_button(@commit.sha, @path, @environment) if @environment - .btn-group{ role: "group" }< - = render_if_exists 'projects/blob/header_file_locks_link' = edit_blob_button = ide_edit_button + .btn-group{ role: "group" }< + = render_if_exists 'projects/blob/header_file_locks_link' - if current_user = replace_blob_link = delete_blob_link + .btn-group{ role: "group" }< + = copy_blob_source_button(blob) unless blame + = open_raw_blob_button(blob) + = download_blob_button(blob) + = view_on_environment_button(@commit.sha, @path, @environment) if @environment = render 'projects/fork_suggestion' = render_if_exists 'projects/blob/header_file_locks', project: @project, path: @path |