?> </div> </form> <?php } else { echo 'Uh Oh, thats not the right action type'; } } else { ?> <div class="page-header"> <h1>Edit Action <button type="button" onclick="newAction()" class="btn btn-primary"><i class="fa fa-plus"></i> Add Action</button></h1> </div> <?php // Show list of ACT and STAT $actionInfo = Activity::listActions(); echo '<table class="table table-hover"><thead>'; if ($user->inRole('administrator')) { $editHead = '<th class="col-md-1"></th>'; } echo '<tr><th class="col-md-1">ID</th><th class="col-md-1">Type</th><th class="col-md-1">Name</th><th class="col-md-1">Title</th><th class="col-md-5">Description</th>' . $editHead . '</tr></thead>'; foreach ($actionInfo as $key => $value) { if ($user->inRole('administrator')) { $edit = '<td class="col-md-1"><a href="?id=' . $value['id'] . '">edit</a></td>'; } echo '<tr><td class="col-md-1">' . $value['id'] . '</td><td class="col-md-1">' . $value['type'] . '</td><td class="col-md-1">' . $value['name'] . '</td><td class="col-md-2">' . $value['title'] . '</td><td class="col-md-4">' . $value['description'] . '</td>' . $edit . '</tr>'; unset($ruleAllow); } echo '</table>'; } ?>
$actDataTo = Activity::splitStage($stages[1], ","); $pipeline = $stages[2]; $out = Activity::getAction($actDataFrom['activity'], $actDataFrom['status'], $actDataTo['activity'], $actDataTo['status'], $pipeline); break; case 'getActionType': $action = $key; $out = Activity::getActionType($action); break; case 'getActivities': $out = Activity::listActivities(); break; case 'getStatuses': $out = Activity::listStatuses($key); break; case 'getActions': $out = Activity::listActions(); break; case 'getNewAction': $out = Activity::getNewAction(); break; default: $out = false; break; } if ($out) { if (is_array($out)) { print json_encode($out); } else { echo $out; } }
} ?> </select> </div> <div class="col-sm-1"> <p id="ok_xx" style="color: #3C763D; text-align: center; padding-top: 7px; display: none;"><i class="fa fa-check"></i> Updated</p> <p id="err_xx"style="color: #A94442; text-align: center; padding-top: 7px; display: none;"><i class="fa fa-times"></i> Error</p> </div> </div> <div class="form-group"> <label class="control-label col-sm-3 " for="action_xx">Action</label> <div class="col-sm-4"> <select class="form-control action" id="action_xx" aria-describedby="inputSuccess2Status"> <option value="" selected >None</option> <?php $activities = Activity::listActions(); foreach ($activities as $key => $value) { echo '<option value="' . $value['id'] . '">' . $value['id'] . ' - ' . $value['name'] . '</option>'; } ?> </select> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-10"> <div class="checkbox"> <label> <input id="assign_xx" type="checkbox" value="" <?php if ($rule['assign'] == 1) { echo " checked"; }