2016-08-17 11:48:49 -04:00
|
|
|
- is_playable = subject.playable? && can?(current_user, :update_build, @project)
|
|
|
|
%li.build{class: ("playable" if is_playable)}
|
2016-08-25 13:48:15 -04:00
|
|
|
.curve
|
2016-08-17 06:21:00 -04:00
|
|
|
.build-content
|
2016-08-17 11:48:49 -04:00
|
|
|
- if is_playable
|
2016-08-17 07:08:45 -04:00
|
|
|
= link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, title: 'Play' do
|
2016-08-26 18:34:21 -04:00
|
|
|
= render_status_with_link('build', 'play')
|
2016-09-07 11:31:32 -04:00
|
|
|
.ci-status-text= subject.name
|
2016-08-17 07:08:45 -04:00
|
|
|
- elsif can?(current_user, :read_build, @project)
|
|
|
|
= link_to namespace_project_build_path(subject.project.namespace, subject.project, subject) do
|
2016-08-26 18:34:21 -04:00
|
|
|
= render_status_with_link('build', subject.status)
|
2016-09-07 11:31:32 -04:00
|
|
|
.ci-status-text= subject.name
|
2016-08-17 07:08:45 -04:00
|
|
|
- else
|
|
|
|
= render_status_with_link('build', subject.status)
|
|
|
|
= ci_icon_for_status(subject.status)
|