2017-05-07 22:35:56 +00:00
- if pipeline_schedule
%tr.pipeline-schedule-table-row
%td
= pipeline_schedule.description
%td.branch-name-cell
2017-12-06 18:38:35 +00:00
= sprite_icon('fork', size: 12)
2017-07-20 07:23:40 +00:00
- if pipeline_schedule.ref.present?
2017-05-25 10:21:15 +00:00
= link_to pipeline_schedule.ref, project_ref_path(@project, pipeline_schedule.ref), class: "ref-name"
2017-05-07 22:35:56 +00:00
%td
- if pipeline_schedule.last_pipeline
.status-icon-container{ class: "ci-status-icon-#{pipeline_schedule.last_pipeline.status}" }
2017-06-29 17:06:35 +00:00
= link_to project_pipeline_path(@project, pipeline_schedule.last_pipeline.id) do
2017-05-07 22:35:56 +00:00
= ci_icon_for_status(pipeline_schedule.last_pipeline.status)
2017-05-10 18:47:43 +00:00
%span ##{pipeline_schedule.last_pipeline.id}
2017-05-07 22:35:56 +00:00
- else
2017-06-12 05:36:12 +00:00
= s_("PipelineSchedules|None")
2017-05-07 22:35:56 +00:00
%td.next-run-cell
2017-08-03 17:23:02 +00:00
- if pipeline_schedule.active? && pipeline_schedule.next_run_at
2017-05-23 17:32:11 +00:00
= time_ago_with_tooltip(pipeline_schedule.real_next_run)
2017-05-07 22:35:56 +00:00
- else
2017-06-12 05:36:12 +00:00
= s_("PipelineSchedules|Inactive")
2017-05-07 22:35:56 +00:00
%td
- if pipeline_schedule.owner
2018-02-09 10:43:12 +00:00
= image_tag avatar_icon_for_user(pipeline_schedule.owner, 20), class: "avatar s20"
2017-05-07 22:35:56 +00:00
= link_to user_path(pipeline_schedule.owner) do
= pipeline_schedule.owner&.name
%td
2018-04-09 17:42:45 +00:00
.float-right.btn-group
2017-12-06 07:23:59 +00:00
- if can?(current_user, :play_pipeline_schedule, pipeline_schedule)
2017-12-06 07:36:49 +00:00
= link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('Play'), class: 'btn' do
2017-12-03 06:55:49 +00:00
= icon('play')
2017-07-20 10:54:36 +00:00
- if can?(current_user, :take_ownership_pipeline_schedule, pipeline_schedule)
2017-06-07 13:46:10 +00:00
= link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('PipelineSchedules|Take ownership'), class: 'btn' do
= s_('PipelineSchedules|Take ownership')
2017-07-20 10:54:36 +00:00
- if can?(current_user, :update_pipeline_schedule, pipeline_schedule)
2017-06-07 13:46:10 +00:00
= link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn' do
2017-05-07 22:35:56 +00:00
= icon('pencil')
- if can?(current_user, :admin_pipeline_schedule, pipeline_schedule)
2017-06-07 13:46:10 +00:00
= link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn btn-remove', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do
2017-05-07 22:35:56 +00:00
= icon('trash')