Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-01-05 19:18:01 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-01-05 20:15:23 +0300
commitda6af70a22ad34f76923fc8b0c5a1309e0ec541e (patch)
treea8f9f296534265d7d89e16824bb382734a46e07c /app/views/projects/jobs
parentf0c4fbea1c0621a6c5c12e9c9dd5eb534ee58157 (diff)
Changes after review
Diffstat (limited to 'app/views/projects/jobs')
-rw-r--r--app/views/projects/jobs/_empty_state.html.haml17
-rw-r--r--app/views/projects/jobs/show.html.haml27
2 files changed, 29 insertions, 15 deletions
diff --git a/app/views/projects/jobs/_empty_state.html.haml b/app/views/projects/jobs/_empty_state.html.haml
new file mode 100644
index 00000000000..8f44628a5c3
--- /dev/null
+++ b/app/views/projects/jobs/_empty_state.html.haml
@@ -0,0 +1,17 @@
+- illustration = locals.fetch(:illustration)
+- illustration_size = locals.fetch(:illustration_size)
+- title = locals.fetch(:title)
+- content = locals.fetch(:content)
+- action = locals.fetch(:action)
+
+.row.empty-state
+ .col-xs-12
+ .svg-content{ class: illustration_size }
+ = image_tag illustration
+ .col-xs-12
+ .text-content
+ %h4.text-center= title
+ %p= content
+ - if action?
+ .text-center
+ = action
diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml
index d029af2f5e9..60fd1d32b14 100644
--- a/app/views/projects/jobs/show.html.haml
+++ b/app/views/projects/jobs/show.html.haml
@@ -88,22 +88,19 @@
%pre.build-trace#build-trace
%code.bash.js-build-output
.build-loader-animation.js-build-refresh
+ - elsif @build.playable?
+ = render 'empty_state',
+ illustration: 'illustrations/manual_action.svg',
+ illustration_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: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), class: 'btn btn-primary', title: _('Trigger this manual action') )
- else
- - illustration = @build.playable? ? 'illustrations/manual_action.svg' : 'illustrations/job_not_triggered.svg'
- - illustration_size = @build.playable? ? 'svg-394' : 'svg-306'
- - title = @build.playable? ? _('This job requires a manual action') : _('This job has not been triggered yet')
- - content = @build.playable? ? _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments.') : _('This job depends on upstream jobs that need to succeed in order for this job to be triggered.')
- .row.empty-state
- .col-xs-12
- .svg-content{ class: illustration_size }
- = image_tag illustration
- .col-xs-12
- .text-content
- %h4.text-center= title
- %p= content
- - if @build.playable?
- .text-center
- = link_to _('Trigger this manual action'), play_project_job_path(@project, @build), class: 'btn btn-primary', title: _('Trigger this manual action')
+ = render 'empty_state',
+ illustration: 'illustrations/job_not_triggered.svg',
+ illustration_size: 'svg-306',
+ title: _('This job has not been triggered yet'),
+ content: _('This job has not been triggered yet')
= render "sidebar"