Exemplo n.º 1
0
 public static function flowtree($flowid)
 {
     $structure = '';
     $data = Step::steploop($flowid);
     if (!empty($data)) {
         $structure .= '<ul class="nav nav-list">';
         foreach ($data as $key => $value) {
             $structure .= '<li>';
             $structure .= '<a href="#" onclick="deleteStep(' . $key . ')" style="float:right">&nbsp;<i class="icon-remove-sign"></i></a>';
             $structure .= '<a href="#" onclick="editStep(' . $key . ')" style="float:right">&nbsp;<i class="icon-edit"></i></a>';
             $structure .= '<a href="#" onclick="addStep(' . $key . ')" ><i class="icon-bookmark"></i>&nbsp;' . Str::title($value['desc']) . '&nbsp;<i class="icon-plus-sign"></i></a>';
             $structure .= self::looper($value['child']);
             $structure .= '</li>';
         }
         $structure .= '</ul>';
     } else {
         $structure = '<a href="#addDataModal" data-toggle="modal" >Add Steps&nbsp;<i class="icon-plus"></i></a>';
     }
     return $structure;
 }