Handle process visualization and going from one step to another
This commit is contained in:
@@ -43,18 +43,23 @@ class Wiaas_Admin_Delivery_Process {
|
||||
continue;
|
||||
}
|
||||
|
||||
$is_step_running = $step->get_status() === 'pending';
|
||||
$is_step_completed = $step->get_status() === 'complete';
|
||||
$is_current_step = $step->get_id() === $current_step->get_id();
|
||||
$is_step_completed = $step->get_status() === 'complete' || $step->get_status() === 'approved';
|
||||
$is_current_step = $current_step && $step->get_id() === $current_step->get_id();
|
||||
|
||||
//$disabled_style = $is_step_running ? '' : 'opacity: 0.5';
|
||||
$completed_style = $is_step_completed ? 'border-left: 4px solid #46b450;' : '';
|
||||
if ($is_current_step) {
|
||||
$style = 'color: #FD8049;';
|
||||
} else if ($is_step_completed) {
|
||||
$style = 'color: #34C388;';
|
||||
} else {
|
||||
$style = 'opacity: 0.5; color: #CCC;';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="postbox" style="<?php esc_attr_e($completed_style, 'wiaas') ?>">
|
||||
<div class="postbox">
|
||||
|
||||
<h3>
|
||||
<i class="fa fa-circle" style="font-size: 22px; margin-right: 10px; <?php esc_attr_e($style, 'wiaas') ?>"></i>
|
||||
<span><?php esc_html_e($step->get_name(), 'wiaas') ?></span>
|
||||
</h3>
|
||||
|
||||
@@ -163,28 +168,38 @@ class Wiaas_Admin_Delivery_Process {
|
||||
$label = $field->get_field_label(false, $action_entry[$field->id]);
|
||||
|
||||
echo '<tr>' .
|
||||
'<td><h5>' . $label . ' : </h5></td>' .
|
||||
'<td><strong>' . $label . ' : </strong></td>' .
|
||||
'<td>' . $value . '</td>' .
|
||||
'</tr>';
|
||||
}
|
||||
|
||||
if (! empty($current_action_step)) {
|
||||
?>
|
||||
|
||||
?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-transform: uppercase;font-size: 11px; letter-spacing: 0.4px; margin:10px;">
|
||||
<strong>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a style="text-transform: uppercase; font-size: 11px; letter-spacing: 0.4px; margin:10px;" href="<?php echo $current_action_step->get_entry_url() ?>">
|
||||
<?php echo $current_action_step->get_name() . ' ' . $current_action_step->get_status_label($current_action_step->get_status()) ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php
|
||||
if (! empty($current_action_step)) {
|
||||
echo $current_action_step->get_status_label($current_action_step->get_status()) . ': ' . $current_action_step->get_name();
|
||||
echo '<a target="_blank" href="' . $current_action_step->get_entry_url() . '">' .
|
||||
' <i class="fa fa-external-link" style="font-size: 16px;"></i>' .
|
||||
'</a>';
|
||||
|
||||
} else {
|
||||
echo $workflow_api->get_status($action_entry);
|
||||
}
|
||||
?>
|
||||
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user