diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-23 18:09:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-23 18:09:55 +0300 |
commit | 9a9415ab127d5e660c09113238a6fb0a895218e9 (patch) | |
tree | 0999f1914bd60e30488fc56bc1ebaeaced925950 /app/views | |
parent | c6acc1681a6d245e00cc7edebfa2cb7a731e8c96 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/nav/sidebar/_project.html.haml | 12 | ||||
-rw-r--r-- | app/views/notify/issues_csv_email.html.haml | 9 | ||||
-rw-r--r-- | app/views/notify/issues_csv_email.text.erb | 4 | ||||
-rw-r--r-- | app/views/projects/issues/export_csv/_modal.html.haml | 1 | ||||
-rw-r--r-- | app/views/shared/members/_badge.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/members/_blocked_badge.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/members/_its_you_badge.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/members/_member.html.haml | 25 | ||||
-rw-r--r-- | app/views/shared/members/_two_factor_auth_badge.html.haml | 3 |
9 files changed, 37 insertions, 27 deletions
diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 3aa056fad7b..9df6a7dfc07 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -222,12 +222,14 @@ %span = _('Metrics') - - if project_nav_tab?(:alert_management) - = nav_link(controller: :alert_management) do - = link_to project_alert_management_index_path(@project), title: _('Alerts'), class: 'shortcuts-tracking qa-operations-tracking-link' do - %span - = _('Alerts') + - if Feature.enabled?(:alert_management_minimal, @project) + - if project_nav_tab?(:alert_management) + = nav_link(controller: :alert_management) do + = link_to project_alert_management_index_path(@project), title: _('Alerts'), class: 'shortcuts-tracking qa-operations-tracking-link' do + %span + = _('Alerts') + - if project_nav_tab? :environments = render_if_exists "layouts/nav/sidebar/tracing_link" = nav_link(controller: :environments, action: [:index, :folder, :show, :new, :edit, :create, :update, :stop, :terminal]) do diff --git a/app/views/notify/issues_csv_email.html.haml b/app/views/notify/issues_csv_email.html.haml index b777ca1e57d..77502a45f02 100644 --- a/app/views/notify/issues_csv_email.html.haml +++ b/app/views/notify/issues_csv_email.html.haml @@ -1,9 +1,6 @@ --# haml-lint:disable NoPlainNodes %p{ style: 'font-size:18px; text-align:center; line-height:30px;' } - Your CSV export of #{ pluralize(@written_count, 'issue') } from project - %a{ href: project_url(@project), style: "color:#3777b0; text-decoration:none; display:block;" } - = @project.full_name - has been added to this email as an attachment. + - project_link = link_to(@project.full_name, project_url(@project), style: "color:#3777b0; text-decoration:none; display:block;") + = _('Your CSV export of %{issues_count} from project %{project_link} has been added to this email as an attachment.').html_safe % { issues_count: pluralize(@written_count, 'issue'), project_link: project_link } - if @truncated %p - This attachment has been truncated to avoid exceeding a maximum allowed attachment size of 15MB. #{ @written_count } of #{ @issues_count } issues have been included. Consider re-exporting with a narrower selection of issues. + = _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{issues_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, issues_count: @issues_count } diff --git a/app/views/notify/issues_csv_email.text.erb b/app/views/notify/issues_csv_email.text.erb index 5d4128e3ae9..a1d2a4691bc 100644 --- a/app/views/notify/issues_csv_email.text.erb +++ b/app/views/notify/issues_csv_email.text.erb @@ -1,5 +1,5 @@ -Your CSV export of <%= pluralize(@written_count, 'issue') %> from project <%= @project.full_name %> (<%= project_url(@project) %>) has been added to this email as an attachment. +<%= _('Your CSV export of %{written_count} from project %{project_name} (%{project_url}) has been added to this email as an attachment.') % { written_count: pluralize(@written_count, 'issue'), project_name: @project.full_name, project_url: project_url(@project) } %> <% if @truncated %> -This attachment has been truncated to avoid exceeding a maximum allowed attachment size of 15MB. <%= @written_count %> of <%= @issues_count %> issues have been included. Consider re-exporting with a narrower selection of issues. + <%= _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{issues_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, issues_count: @issues_count} %> <% end %> diff --git a/app/views/projects/issues/export_csv/_modal.html.haml b/app/views/projects/issues/export_csv/_modal.html.haml index af3a087ca59..9fdeb901b56 100644 --- a/app/views/projects/issues/export_csv/_modal.html.haml +++ b/app/views/projects/issues/export_csv/_modal.html.haml @@ -1,4 +1,3 @@ --# haml-lint:disable NoPlainNodes - if current_user .issues-export-modal.modal .modal-dialog diff --git a/app/views/shared/members/_badge.html.haml b/app/views/shared/members/_badge.html.haml new file mode 100644 index 00000000000..e304207f3e9 --- /dev/null +++ b/app/views/shared/members/_badge.html.haml @@ -0,0 +1,4 @@ +- type ||= 'info' + +%span.px-1.py-1 + %span{ class: "badge badge-#{type}" }= yield diff --git a/app/views/shared/members/_blocked_badge.html.haml b/app/views/shared/members/_blocked_badge.html.haml new file mode 100644 index 00000000000..95335ebe74d --- /dev/null +++ b/app/views/shared/members/_blocked_badge.html.haml @@ -0,0 +1,3 @@ +- if user.blocked? + = render 'shared/members/badge', type: 'danger' do + = _("Blocked") diff --git a/app/views/shared/members/_its_you_badge.html.haml b/app/views/shared/members/_its_you_badge.html.haml new file mode 100644 index 00000000000..b53ffd8032d --- /dev/null +++ b/app/views/shared/members/_its_you_badge.html.haml @@ -0,0 +1,3 @@ +- if user == current_user + = render 'shared/members/badge', type: 'success' do + = _("It's you") diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index d74030c566f..31eba9d71ee 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -13,24 +13,23 @@ - if user = image_tag avatar_icon_for_user(user, 40), class: "avatar s40 flex-shrink-0 flex-grow-0", alt: '' .user-info - = link_to user.name, user_path(user), class: 'member js-user-link', data: { user_id: user.id } - = user_status(user) - %span.cgray= user.to_reference + %span.mr-1 + = link_to user.name, user_path(user), class: 'member js-user-link', data: { user_id: user.id } + = user_status(user) + %span.cgray= user.to_reference - = render_if_exists 'shared/members/ee/sso_badge', member: member + .mx-n1.d-inline-flex.flex-wrap + = render_if_exists 'shared/members/ee/sso_badge', member: member - - if user == current_user - %span.badge.badge-success.prepend-left-5= _("It's you") + = render_if_exists 'shared/members/ee/gma_badge', member: member - = render_if_exists 'shared/members/ee/license_badge', user: user, group: @group + = render 'shared/members/its_you_badge', user: user, current_user: current_user - - if user.blocked? - %label.badge.badge-danger - %strong= _("Blocked") + = render_if_exists 'shared/members/ee/license_badge', user: user, group: @group - - if user.two_factor_enabled? - %label.badge.badge-info - = _("2FA") + = render 'shared/members/blocked_badge', user: user + + = render 'shared/members/two_factor_auth_badge', user: user - if source.instance_of?(Group) && source != @group · diff --git a/app/views/shared/members/_two_factor_auth_badge.html.haml b/app/views/shared/members/_two_factor_auth_badge.html.haml new file mode 100644 index 00000000000..34850c135d6 --- /dev/null +++ b/app/views/shared/members/_two_factor_auth_badge.html.haml @@ -0,0 +1,3 @@ +- if user.two_factor_enabled? + = render 'shared/members/badge', type: 'info' do + = _("2FA") |