_table_body.php
1 year ago
index.php
1 year ago
preview_job_action.php
1 year ago
view_job_run_result.php
1 year ago
preview_job_action.php
34 lines
| 1 | <?php |
| 2 | /* @var $job OsProcessJobModel */ |
| 3 | /* @var $action_settings_html string */ |
| 4 | /* @var $preview_html string */ |
| 5 | /* @var $action_status_html string */ |
| 6 | /* @var $action \LatePoint\Misc\ProcessAction */ |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; // Exit if accessed directly |
| 10 | } |
| 11 | |
| 12 | |
| 13 | ?> |
| 14 | <div class="os-form-header"> |
| 15 | <h2><?php echo esc_html($action->get_nice_type_name()); ?></h2> |
| 16 | <a href="#" class="latepoint-side-panel-close latepoint-side-panel-close-trigger"><i class="latepoint-icon latepoint-icon-x"></i></a> |
| 17 | </div> |
| 18 | <div class="os-form-content"> |
| 19 | <?php echo $action_status_html; ?> |
| 20 | <div class="action-preview-wrapper type-<?php echo esc_attr($action->type); ?>"> |
| 21 | <?php echo $preview_html; ?> |
| 22 | </div> |
| 23 | </div> |
| 24 | <div class="os-form-buttons right-aligned"> |
| 25 | <button type="button" data-os-after-call="reload_process_jobs_table" class="latepoint-btn latepoint-btn-primary" data-os-params="<?php echo esc_attr(OsUtilHelper::build_os_params(['action_ids' => [$action->id], 'job_id' => $job->id], 'run_job_'.$job->id)); ?>" data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name('process_jobs', 'run_job'));?>"> |
| 26 | <?php if($action_status_html){ ?> |
| 27 | <i class="latepoint-icon latepoint-icon-refresh-cw"></i> |
| 28 | <span><?php esc_html_e('Run Again', 'latepoint'); ?></span> |
| 29 | <?php }else{ ?> |
| 30 | <i class="latepoint-icon latepoint-icon-play-circle"></i> |
| 31 | <span><?php esc_html_e('Run Now', 'latepoint'); ?></span> |
| 32 | <?php } ?> |
| 33 | </button> |
| 34 | </div> |