/** * Permet d'afficher une ligne de suivi dans la liste de suivi */ function showInFollowupSummary(PluginProjetProjet $projet, $rand) { global $DB, $CFG_GLPI; $canedit = PluginProjetProjet_Item::isProjetParticipant($projet->fields["id"]) && plugin_projet_haveRight('projet', 'w'); echo "<tr class='tab_bg_2' " . ($canedit ? "style='cursor:pointer' onClick=\"viewEditFollowup" . $this->fields['plugin_projet_projets_id'] . $this->fields['id'] . "{$rand}();\"" : '') . " id='viewfollowup" . $this->fields['plugin_projet_projets_id'] . $this->fields["id"] . "{$rand}'>"; echo "<td class='left'>" . nl2br($this->fields["content"]) . "</td>"; echo "<td>"; if ($canedit) { echo "\n<script type='text/javascript' >\n"; echo "function viewEditFollowup" . $this->fields['plugin_projet_projets_id'] . $this->fields["id"] . "{$rand}() {\n"; $params = array('type' => __CLASS__, 'parenttype' => 'PluginProjetProjet', 'plugin_projet_projets_id' => $this->fields["plugin_projet_projets_id"], 'id' => $this->fields["id"]); Ajax::updateItemJsCode("viewfollowup" . $this->fields['plugin_projet_projets_id'] . "{$rand}", "../ajax/viewsubitem.php", $params); echo "};"; echo "</script>\n"; } echo Html::convDateTime($this->fields["date"]) . "</td>"; echo "<td>" . getUserName($this->fields["users_id"]) . "</td>"; echo "</tr>\n"; }