print '<div class="error">' . $langs->trans($tmp) . '</div>'; } elseif ($tmp == 'NotConfigured') { print $langs->trans($tmp); } else { print $tmp; } print '</td>' . "\n"; print '<td align="center">'; if ($conf->global->PROJECT_TASK_ADDON == 'mod_' . $classname) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmodtask&value=mod_' . $classname . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>'; } print '</td>'; $project = new Project($db); $project->initAsSpecimen(); // Info $htmltooltip = ''; $htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>'; $nextval = $module->getNextValue($mysoc, $project); if ("{$nextval}" != $langs->trans("NotAvailable")) { $htmltooltip .= '' . $langs->trans("NextValue") . ': '; if ($nextval) { $htmltooltip .= $nextval . '<br>'; } else { $htmltooltip .= $langs->trans($module->error) . '<br>'; } } print '<td align="center">'; print $form->textwithpicto('', $htmltooltip, 1, 0); print '</td>';
/** * testProjectCreate * * @return void */ public function testProjectCreate() { global $conf, $user, $langs, $db; $conf = $this->savconf; $user = $this->savuser; $langs = $this->savlangs; $db = $this->savdb; $localobject = new Project($this->savdb); $localobject->initAsSpecimen(); $result = $localobject->create($user); $this->assertLessThan($result, 0); print __METHOD__ . " result=" . $result . "\n"; return $result; }
/** * testProjectBuild * * @return int */ public function testProjectBuild() { global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $conf->project->dir_output.='/temp'; $localobject=new Project($this->savdb); $localobject->initAsSpecimen(); // Soleil $localobject->modelpdf='baleine'; $result=project_pdf_create($db, $localobject, $localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; return 0; }