view.php
41 lines
| 1 | <?php |
| 2 | /* @var $activity_id string */ |
| 3 | /* @var $activity_name string */ |
| 4 | /* @var $activity_type string */ |
| 5 | /* @var $content_html string */ |
| 6 | /* @var $meta_html string */ |
| 7 | /* @var $status_html string */ |
| 8 | /* @var $status string */ |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; // Exit if accessed directly |
| 12 | } |
| 13 | ?> |
| 14 | <div class="os-form-header"> |
| 15 | <h2><?php echo esc_html($activity_name) ?></h2> |
| 16 | </div> |
| 17 | <div class="os-form-content"> |
| 18 | <?php if($status && $status_html){ ?> |
| 19 | <div class="activity-status-wrapper status-<?php echo esc_attr($status); ?>"> |
| 20 | <div class="activity-status-content"> |
| 21 | <?php echo $status_html ?> |
| 22 | </div> |
| 23 | </div> |
| 24 | <?php } ?> |
| 25 | <div class="activity-preview-wrapper type-<?php echo esc_attr($activity_type); ?>"> |
| 26 | <div class="activity-preview-content-wrapper"> |
| 27 | <?php echo $meta_html ?> |
| 28 | <?php echo $content_html; ?> |
| 29 | </div> |
| 30 | </div> |
| 31 | </div> |
| 32 | <div class="os-form-buttons"> |
| 33 | <button type="button" class="latepoint-btn latepoint-btn-danger" |
| 34 | data-os-success-action="reload" |
| 35 | data-os-params="<?php echo esc_attr(OsUtilHelper::build_os_params(['id' => $activity_id], 'destroy_activity_'.$activity_id)); ?>" |
| 36 | data-os-prompt="<?php esc_attr_e('Are you sure you want to delete this activity record?', 'latepoint'); ?>" |
| 37 | data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name('activities', 'destroy'));?>"> |
| 38 | <i class="latepoint-icon latepoint-icon-trash"></i> |
| 39 | <span><?php esc_html_e('Delete', 'latepoint'); ?></span> |
| 40 | </button> |
| 41 | </div> |