Beispiel #1
0
 function showForm($ID, $options = array())
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='4'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), $prof->fields["name"]) . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . PluginProjetProjet::getTypeName(2) . ":</td><td>";
     Profile::dropdownNoneReadWrite("projet", $this->fields["projet"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . PluginProjetTask::getTypeName(2) . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("task", $this->fields["task"], 1, 1, 1);
     } else {
         _e('No access');
         // No access;
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Associable items to a ticket') . " - " . PluginProjetProjet::getTypeName(2) . "</td><td>";
     if ($prof->fields['create_ticket']) {
         Dropdown::showYesNo("open_ticket", $this->fields["open_ticket"]);
     } else {
         echo Dropdown::getYesNo(0);
     }
     echo "</td>";
     echo "<td></td><td>";
     echo "</td>";
     echo "</tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
 static function getAlreadyPlannedInformation($val)
 {
     global $CFG_GLPI;
     $out = "";
     $out .= PluginProjetProjet::getTypeName() . " - " . PluginProjetTask::getTypeName() . ' : ' . Html::convDateTime($val["begin"]) . ' -> ' . Html::convDateTime($val["end"]) . ' : ';
     $out .= "<a href='" . $CFG_GLPI["root_doc"] . "/plugins/projet/front/projet.form.php?id=" . $val["plugin_projet_tasks_id"] . "'>";
     $out .= Html::resume_text($val["name"], 80) . '</a>';
     return $out;
 }