From c48f33c5bec02e8fd49326514023f6b6af66d693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Wed, 28 Mar 2018 13:51:30 +0200 Subject: [PATCH] Move action link to build extended status illustration --- app/views/projects/jobs/_empty_states.html.haml | 2 +- lib/gitlab/ci/status/build/action.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/projects/jobs/_empty_states.html.haml b/app/views/projects/jobs/_empty_states.html.haml index 6d4a9931923..4d2c776e538 100644 --- a/app/views/projects/jobs/_empty_states.html.haml +++ b/app/views/projects/jobs/_empty_states.html.haml @@ -6,4 +6,4 @@ illustration_size: illustration[:size], title: illustration[:title], content: illustration[:content], - action: @build.playable? ? link_to(_("Trigger this manual action"), detailed_status.action_path, method: detailed_status.action_method, class: 'btn btn-primary', title: _("Trigger this manual action")) : nil + action: illustration[:action_path] ? link_to(_("Trigger this manual action"), illustration[:action_path], method: illustration[:action_method], class: 'btn btn-primary', title: _("Trigger this manual action")) : nil diff --git a/lib/gitlab/ci/status/build/action.rb b/lib/gitlab/ci/status/build/action.rb index 17eb37448cb..f7f3d47c098 100644 --- a/lib/gitlab/ci/status/build/action.rb +++ b/lib/gitlab/ci/status/build/action.rb @@ -20,6 +20,8 @@ module Gitlab size: 'svg-394', title: _('This job requires a manual action'), content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments'), + action_path: action_path, + action_method: action_method } end