diff options
Diffstat (limited to 'app/views/projects/commits/_commits.html.haml')
-rw-r--r-- | app/views/projects/commits/_commits.html.haml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index 9e0dd93c683..02b5fe00ad0 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -22,7 +22,7 @@ - if context_commits.present? %li.commit-header.js-commit-header %span.font-weight-bold= n_("%d previously merged commit", "%d previously merged commits", context_commits.count) % context_commits.count - - if project.context_commits_enabled? && can_update_merge_request + - if can_update_merge_request %button.gl-button.btn.btn-default.ml-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'false' } } = _('Add/remove') @@ -34,13 +34,14 @@ = render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request } - if hidden > 0 - %li.gl-alert.gl-alert-warning - .gl-alert-container - = sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content + %li + = render 'shared/global_alert', + variant: :warning, + dismissible: false do + .gl-alert-body = n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden) -- if project.context_commits_enabled? && can_update_merge_request && context_commits&.empty? +- if can_update_merge_request && context_commits&.empty? %button.gl-button.btn.btn-default.mt-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'true' } } = _('Add previously merged commits') |