Ejemplo n.º 1
0
 function index()
 {
     $Step = new mStep();
     $Step->isfirst = 1;
     $Step->load();
     $DB = new mStep();
     $AllSteps = $DB->get();
     $StepArray = array();
     $StepArray[''] = 'None';
     $StepArray[-1] = 'End of Process';
     foreach ($AllSteps as $S) {
         $StepArray[$S->id()] = $S->short_title;
     }
     data('AllSteps', json_encode($StepArray));
     data('Step', $Step);
     $this->display('custom/steps');
 }
Ejemplo n.º 2
0
        <?php 
}
?>

<h2 class="heading">Custom Order</h2>
<div class="actions">
    <a class="btn btn-primary" href="/site-admin/custom/create_step/">Add Step</a>
</div>
<ul>
<?php 
$stepids = array();
$i = 1;
while ($Step->is_loaded()) {
    $stepids[] = $Step->id();
    display_step($Step, $i > 1, $AllSteps);
    $i++;
    $Step = $Step->next_step;
}
//Get other steps not displayed
$DB = new mStep();
if (count($stepids) > 0) {
    $DB->db->where_not_in($DB->_id(), $stepids);
}
$Steps = $DB->get();
foreach ($Steps as $Step) {
    $i++;
    display_step($Step, $i > 1, $AllSteps);
}
?>
</ul>