/** * Executes edit action * * @param sfRequest $request A request object */ public function executeEdit(sfWebRequest $request) { // Get user profile from database $user = $this->getUser()->getGuardUser(); $profile = Doctrine_Core::getTable("SfGuardUserProfile")->findOneByUserId($user->getId()); $this->ldapAuthentication = sfConfig::get("app_authentication_method", "symfony") == "ldap" ? true : false; // If user has no profile, create a new one for him if (empty($profile)) { $profile = new sfGuardUserProfile(); $profile->setUserId($user->getId()); $profile->setToken(MiscUtils::generateToken()); $profile->setSecurityLevel(sfConfig::get("app_security_level_new_user", 0)); $profile->save(); } $this->form = new ProfileForm(array('first_name' => $user->getFirstName(), 'last_name' => $user->getLastName(), 'email' => $user->getEmailAddress())); $this->token = $profile->getToken(); $this->securityLevel = Labeler::getSecurityLevelLabel($profile->getSecurityLevel()); // Process form if ($request->isMethod("post")) { $this->processEdit($request, $this->form); } }
</td> <td class="testcase_result column_0">-</td> <?php } ?> <td class="change_indicator <?php echo $differentResultsFlag ? "changed_result" : ""; ?> "></td> <td class="testcase_result <?php echo Labeler::decisionToText($result["decision_criteria_id"]); ?> column_1"> <?php echo ucfirst(str_replace("_", " ", Labeler::decisionToText($result["decision_criteria_id"]))); ?> </td> </tr> <?php $line++; ?> <?php } ?> </table> </div> <!-- /index_page --> </div> <!-- /page -->
$input = fopen($arg, 'r'); if ($input === false) { Labeler::logerr("cannot open input file: {$arg}\n" . $usage); exit(1); } } $arg = array_shift($argv); } if ($arg) { if ($arg !== '-') { $output = fopen($arg, 'r'); if ($output === false) { Labeler::logerr("cannot open input file: {$arg}\n" . $usage); exit(1); } } } $labeler = new Labeler(); while (!feof($input)) { $item = fgetcsv($input, 0, $delimiter); if ($item === false) { break; } if (count($item) === 2) { $item[] = ''; } if (count($item) > 2) { $cleaned = $labeler->cleanup($item[0], $item[1], $item[2]); fputcsv($output, $cleaned, $delimiter); } }
} else { if ($failLimit < $target) { $targetPercentage = round($value / $target * 100, 1) > 100 ? 100 : round($value / $target * 100, 1); } else { $targetPercentage = 100; } } echo $targetPercentage; ?> %</td> <td class="testcase_result <?php echo Labeler::decisionToText($measure["decision_criteria_id"]); ?> "> <span class="content"><?php echo ucfirst(Labeler::decisionToText($measure["decision_criteria_id"])); ?> </span> </td> <td class="testcase_notes"><div class="content"><?php echo $measure["comment"]; ?> </div></td> </tr> <?php } ?> </table> <?php }
} ?> <?php $rowCount++; $globalRowCount++; ?> <tr class="<?php echo $rowCount % 2 == 0 ? "even" : "odd"; ?> "> <td class="date"><span title="<?php echo Labeler::getTestSessionStatusLabel($data["status"]); ?> " class="icon_status <?php echo "status_" . MiscUtils::slugify(Labeler::getTestSessionStatusLabel($data["status"]), '_'); ?> "></span><?php echo format_datetime($data["created_at"], "y-MM-dd HH:mm"); ?> </td> <td class="report_name"> <a href="<?php echo url_for("test_session", array("project" => $currentProject["name_slug"], "product" => $currentProduct["name_slug"], "environment" => $currentEnvironment["name_slug"], "image" => $data["i_slug"], "id" => $data["id"], "display" => "basic")); ?> " title="See basic report" class="shortcut_link">Basic</a> <a href="<?php echo url_for("test_session", array("project" => $currentProject["name_slug"], "product" => $currentProduct["name_slug"], "environment" => $currentEnvironment["name_slug"], "image" => $data["i_slug"], "id" => $data["id"], "display" => "detailed")); ?> " title="See detailed report" class="shortcut_link">Detailed</a> <a href="<?php
echo $measure["label"]; ?> </td> </tr> </tbody> <tbody> <?php } ?> <?php $previousFeatureKey = $featureKey; ?> <tr class="testcase result_<?php echo Labeler::decisionToText($measure["decision_criteria_id"]); ?> "> <td class="testcase_name"><?php echo $measure["name"]; ?> </td> <td class="testcase_measurement"><?php echo $measure["complement"]; ?> </td> <?php // Prepare an array to store all measures' values $measureValues = array(); for ($i = count($previousSessions) - 1; $i >= 0; $i--) {
echo $form["_csrf_token"]->render(); ?> <table class="detailed_results"> <thead> <tr> <th id="th_test_case">Name</th> <th id="th_result">Result</th> <th id="th_bugs">Bugs</th> <th id="th_notes">Notes</th> </tr> </thead> <tbody> <tr class="testcase result_<?php echo Labeler::decisionToText($result["decision_criteria_id"]); ?> "> <td class="testcase_name"><?php echo $result["name"]; ?> </td> <td class="testcase_result"> <span class="content"><?php echo $form["decision_criteria_id"]; ?> </span> </td> <td class="testcase_bugs"><div class="content"><?php echo $form["bugs"]->render(array("class" => "comment_field")); ?>