diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-08-17 18:48:49 +0300 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-08-17 19:10:11 +0300 |
commit | 2c23465d05fa1efa4213bd5d7b0e86b1cd521212 (patch) | |
tree | ee62cfba433516cc1c14b86fdc2c7dee67ba872d /app/views/projects/ci/builds | |
parent | bfe2259bb76b320bd148de4fbdcebfd1b70a59ba (diff) |
Move deployable conditional to variable; fix pipelines_spec
Diffstat (limited to 'app/views/projects/ci/builds')
-rw-r--r-- | app/views/projects/ci/builds/_build_pipeline.html.haml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/ci/builds/_build_pipeline.html.haml b/app/views/projects/ci/builds/_build_pipeline.html.haml index 13088ef64d9..04cbd0c3591 100644 --- a/app/views/projects/ci/builds/_build_pipeline.html.haml +++ b/app/views/projects/ci/builds/_build_pipeline.html.haml @@ -1,6 +1,7 @@ -%li.build{class: ("playable" if subject.playable? && can?(current_user, :update_build, @project))} +- is_playable = subject.playable? && can?(current_user, :update_build, @project) +%li.build{class: ("playable" if is_playable)} .build-content - - if subject.playable? && can?(current_user, :update_build, @project) + - if is_playable = link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, title: 'Play' do = render_status_with_link('build', 'play') = subject.name |