Commit 4fa3eee3 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '231044-convert-runner-buttons-to-pajamas' into 'master'

Convert project runner buttons to pajamas

See merge request gitlab-org/gitlab!52358
parents 990f72aa a604a6af
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
%br %br
%br %br
- if @project.group_runners_enabled? - if @project.group_runners_enabled?
= link_to toggle_group_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do = link_to toggle_group_runners_project_runners_path(@project), class: 'btn gl-button btn-warning-secondary', method: :post do
= _('Disable group runners') = _('Disable group runners')
- else - else
= link_to toggle_group_runners_project_runners_path(@project), class: 'btn btn-success btn-inverted', method: :post do = link_to toggle_group_runners_project_runners_path(@project), class: 'btn gl-button btn-success btn-inverted', method: :post do
= _('Enable group runners') = _('Enable group runners')
   
= _('for this project') = _('for this project')
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
= sprite_icon('lock') = sprite_icon('lock')
%small.edit-runner %small.edit-runner
= link_to edit_project_runner_path(@project, runner), class: 'btn btn-edit' do = link_to edit_project_runner_path(@project, runner), class: 'btn gl-button btn-edit' do
= sprite_icon('pencil') = sprite_icon('pencil', css_class: 'gl-my-2')
- else - else
%span.commit-sha %span.commit-sha
= runner.short_sha = runner.short_sha
...@@ -19,18 +19,18 @@ ...@@ -19,18 +19,18 @@
.float-right .float-right
- if @project_runners.include?(runner) - if @project_runners.include?(runner)
- if runner.active? - if runner.active?
= link_to _('Pause'), pause_project_runner_path(@project, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: _("Are you sure?") } = link_to _('Pause'), pause_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-sm btn-danger', data: { confirm: _("Are you sure?") }
- else - else
= link_to _('Resume'), resume_project_runner_path(@project, runner), method: :post, class: 'btn btn-success btn-sm' = link_to _('Resume'), resume_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-success btn-sm'
- if runner.belongs_to_one_project? - if runner.belongs_to_one_project?
= link_to _('Remove runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' = link_to _('Remove runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn gl-button btn-danger btn-sm'
- else - else
- runner_project = @project.runner_projects.find_by(runner_id: runner) # rubocop: disable CodeReuse/ActiveRecord - runner_project = @project.runner_projects.find_by(runner_id: runner) # rubocop: disable CodeReuse/ActiveRecord
= link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn gl-button btn-danger btn-sm'
- elsif runner.project_type? - elsif runner.project_type?
= form_for [@project, @project.runner_projects.new] do |f| = form_for [@project, @project.runner_projects.new] do |f|
= f.hidden_field :runner_id, value: runner.id = f.hidden_field :runner_id, value: runner.id
= f.submit _('Enable for this project'), class: 'btn btn-sm' = f.submit _('Enable for this project'), class: 'btn gl-button btn-sm'
.float-right .float-right
%small.light %small.light
\##{runner.id} \##{runner.id}
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
= _('Shared runners disabled on group level') = _('Shared runners disabled on group level')
- else - else
- if @project.shared_runners_enabled? - if @project.shared_runners_enabled?
= link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn gl-button btn-warning-secondary', method: :post do
= _('Disable shared runners') = _('Disable shared runners')
- else - else
= link_to toggle_shared_runners_project_runners_path(@project), class: 'btn btn-success', method: :post do = link_to toggle_shared_runners_project_runners_path(@project), class: 'btn gl-button btn-success', method: :post do
= _('Enable shared runners') = _('Enable shared runners')
  for this project   for this project
......
---
title: Convert project runner buttons to pajamas
merge_request: 52358
author:
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment