78 lines
1.5 KiB
PHP
78 lines
1.5 KiB
PHP
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
$workflow_api = new Gravity_Flow_API($action_entry['form_id']);
|
|
|
|
$current_action_step = $workflow_api->get_current_step($action_entry);
|
|
|
|
$entry_url = add_query_arg( array(
|
|
'page' => 'gravityflow-inbox',
|
|
'view' => 'entry',
|
|
'id' => $action_entry['form_id'],
|
|
'lid' => $action_entry['id']
|
|
), admin_url() );
|
|
|
|
?>
|
|
|
|
<table style="padding: 10px;">
|
|
|
|
<?php
|
|
foreach ($action_form['fields'] as $field) {
|
|
|
|
if ($field->type === 'wiaas_order') {
|
|
continue;
|
|
}
|
|
|
|
if ($field->type === 'workflow_discussion') {
|
|
|
|
echo '<tr style="padding: 20px;"><td colspan="2">' . $field->format_discussion_value($action_entry[$field->id]) . '</td></tr>';
|
|
|
|
continue;
|
|
}
|
|
|
|
$value = $field->get_value_entry_detail($action_entry[$field->id]);
|
|
$label = $field->get_field_label(false, $action_entry[$field->id]);
|
|
|
|
echo '<tr>' .
|
|
'<td><strong>' . $label . ' : </strong></td>' .
|
|
'<td>' . $value . '</td>' .
|
|
'</tr>';
|
|
}
|
|
|
|
?>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="2" style="text-transform: uppercase;font-size: 11px; letter-spacing: 0.4px; margin:10px;">
|
|
<strong>
|
|
|
|
<?php
|
|
|
|
echo empty($current_action_step) ?
|
|
$workflow_api->get_status($action_entry) :
|
|
$current_action_step->get_status_label($current_action_step->get_status()) . ': ' . $current_action_step->get_name();;
|
|
|
|
echo '<a target="_blank" href="' . $entry_url . '">' .
|
|
' <i class="dashicons dashicons-external" style="font-size: 16px;"></i>' .
|
|
'</a>';
|
|
|
|
?>
|
|
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<?php
|
|
|
|
|
|
?>
|
|
</table>
|
|
|
|
<hr />
|
|
|
|
|