diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-17 14:08:45 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-17 14:08:45 +0300 |
commit | 49e7070adfcb281938a43aceeb52cc0257601e1d (patch) | |
tree | 46a2dd6c907e8e1b030b6c576f05a8be5e4c7736 /app/views/projects/ci | |
parent | ae5ec7918a7d6c13f0b4a6b1fd5a168646b39327 (diff) |
Add support for Play and Created jobs
Diffstat (limited to 'app/views/projects/ci')
-rw-r--r-- | app/views/projects/ci/builds/_build_pipeline.html.haml | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/app/views/projects/ci/builds/_build_pipeline.html.haml b/app/views/projects/ci/builds/_build_pipeline.html.haml index 5149d75e5a2..8c8e0efc60f 100644 --- a/app/views/projects/ci/builds/_build_pipeline.html.haml +++ b/app/views/projects/ci/builds/_build_pipeline.html.haml @@ -1,12 +1,14 @@ %li.build .build-content - %span{class: "ci-status-link ci-status-icon-#{subject.status}"} - - if subject.playable? && can?(current_user, :update_build, @project) - = link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, title: 'Play' do - = icon('play') - - elsif can?(current_user, :read_build, @project) && subject.started? - = link_to namespace_project_build_path(subject.project.namespace, subject.project, subject) do - = ci_icon_for_status(subject.status) - - else - = ci_icon_for_status(subject.status) - = subject.name + - if subject.playable? && can?(current_user, :update_build, @project) + = 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 + - elsif can?(current_user, :read_build, @project) + = link_to namespace_project_build_path(subject.project.namespace, subject.project, subject) do + = render_status_with_link('build', subject.status) + = subject.name + - else + = render_status_with_link('build', subject.status) + = ci_icon_for_status(subject.status) + |