diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-23 21:12:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-23 21:12:59 +0300 |
commit | 3acaaf7231d0779a6ceb37fca693cd81e698ef90 (patch) | |
tree | 22a068ab03faa19008997f5bc10298282ad077ab /app/views/projects/deployments | |
parent | 2cba761741967eb6baf797af2ee0a702c2ffbdfe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/deployments')
-rw-r--r-- | app/views/projects/deployments/_rollback.haml | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/views/projects/deployments/_rollback.haml b/app/views/projects/deployments/_rollback.haml index a7befabdc96..223f7520b47 100644 --- a/app/views/projects/deployments/_rollback.haml +++ b/app/views/projects/deployments/_rollback.haml @@ -1,7 +1,4 @@ - if deployment.deployable && can?(current_user, :create_deployment, deployment) - tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment') - = button_tag class: 'js-confirm-rollback-modal-button gl-button btn btn-default btn-icon has-tooltip', type: 'button', data: { environment_name: @environment.name, commit_short_sha: deployment.short_sha, commit_url: project_commit_path(@project, deployment.sha), is_last_deployment: deployment.last?.to_s, retry_path: retry_project_job_path(@environment.project, deployment.deployable) }, title: tooltip do - - if deployment.last? - = sprite_icon('repeat', css_class: 'gl-icon') - - else - = sprite_icon('redo', css_class: 'gl-icon') + - icon = deployment.last? ? 'repeat' : 'redo' + = render Pajamas::ButtonComponent.new(icon: icon, button_options: { title: tooltip, class: 'js-confirm-rollback-modal-button has-tooltip', data: { environment_name: @environment.name, commit_short_sha: deployment.short_sha, commit_url: project_commit_path(@project, deployment.sha), is_last_deployment: deployment.last?.to_s, retry_path: retry_project_job_path(@environment.project, deployment.deployable) } }) |