Commit 3248c9fb authored by Kamil Trzcinski's avatar Kamil Trzcinski

Rename playable_actions to manual_actions

parent 7d0fe1f0
......@@ -96,10 +96,6 @@ module Ci
self.when == 'manual'
end
def playable_actions
pipeline.playable_actions
end
def playable?
project.builds_enabled? && commands.present? && manual?
end
......
......@@ -65,8 +65,8 @@ module Ci
!tag?
end
def playable_actions
builds.manual_actions.latest
def manual_actions
builds.latest.manual_actions
end
def retryable?
......
......@@ -33,7 +33,7 @@ class Deployment < ActiveRecord::Base
project.repository.keep_around(self.sha)
end
def playable_actions
deployable.try(:playable_actions)
def manual_actions
deployable.try(:manual_actions)
end
end
......@@ -57,8 +57,8 @@
%td.pipeline-actions
.controls.hidden-xs.pull-right
- artifacts = pipeline.builds.latest.select { |b| b.artifacts? }
- playable = pipeline.playable_actions
- if artifacts.present? || playable.any?
- actions = pipeline.manual_actions
- if artifacts.present? || actions.any?
.btn-group.inline
- if playable.any?
.btn-group
......@@ -69,7 +69,7 @@
%li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do
= icon("play")
%span= playable.name.titleize
%span= actions.name.titleize
- if artifacts.present?
.btn-group
%a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'}
......
- playable = deployment.playable_actions
- if playable.any?
- actions = deployment.manual_actions
- if actions.any?
.btn-group.inline
.btn-group
%a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'}
......@@ -9,4 +9,4 @@
%li
= link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do
= icon("play")
%span= playable.name.titleize
%span= actions.name.titleize
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