_table_body.php
5 months ago
index.php
11 months ago
preview_job_action.php
1 year ago
view_job_run_result.php
1 year ago
view_job_run_result.php
49 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2022 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /* @var $process_name string */ |
| 7 | /* @var $content_html string */ |
| 8 | /* @var $meta_html string */ |
| 9 | /* @var $status_html string */ |
| 10 | /* @var $status string */ |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; // Exit if accessed directly |
| 14 | } |
| 15 | |
| 16 | |
| 17 | ?> |
| 18 | <div class="os-form-header"> |
| 19 | <h2><?php echo esc_html($process_name) ?></h2> |
| 20 | <a href="#" class="latepoint-side-panel-close latepoint-side-panel-close-trigger"><i class="latepoint-icon latepoint-icon-x"></i></a> |
| 21 | </div> |
| 22 | <div class="os-form-content"> |
| 23 | <div class="activity-preview-wrapper"> |
| 24 | <?php echo $meta_html ?> |
| 25 | <div class="activity-status-wrapper status-<?php echo esc_attr($status); ?>"> |
| 26 | <div class="activity-status-content"> |
| 27 | <?php echo $status_html ?> |
| 28 | </div> |
| 29 | </div> |
| 30 | <div class="activity-preview-content-wrapper"> |
| 31 | <?php echo $content_html; ?> |
| 32 | </div> |
| 33 | </div> |
| 34 | </div> |
| 35 | <div class="os-form-buttons right-aligned"> |
| 36 | <a class="latepoint-btn latepoint-btn-lg" data-os-after-call="reload_process_jobs_table" href="#" data-os-prompt="<?php esc_attr_e('Are you sure you want to run this job?', 'latepoint'); ?>" data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name('process_jobs', 'run_job')); ?>" data-os-params="<?php echo esc_attr(OsUtilHelper::build_os_params(['job_id' => $job->id], 'run_job_'.$job->id)); ?>"> |
| 37 | <?php if(in_array($job->status, [LATEPOINT_JOB_STATUS_COMPLETED, LATEPOINT_JOB_STATUS_ERROR])){ ?> |
| 38 | <i class="latepoint-icon latepoint-icon-refresh-cw"></i> |
| 39 | <span><?php esc_html_e('Run Again','latepoint'); ?></span> |
| 40 | <?php }elseif($job->status == LATEPOINT_JOB_STATUS_SCHEDULED){ ?> |
| 41 | <i class="latepoint-icon latepoint-icon-play-circle"></i> |
| 42 | <span><?php esc_html_e('Run Now','latepoint'); ?></span> |
| 43 | <?php }else{ ?> |
| 44 | <i class="latepoint-icon latepoint-icon-play-circle"></i> |
| 45 | <span><?php esc_html_e('Run','latepoint'); ?></span> |
| 46 | <?php } ?> |
| 47 | </a> |
| 48 | </div> |
| 49 |