5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
79 $next_class = $ilCtrl->getNextClass();
80 $cmd = $ilCtrl->getCmd(
"getHTML");
104 include_once(
"Services/Notes/classes/class.ilNote.php");
109 $this->
setRowTemplate(
"tpl.pd_notes_overview.html",
"Services/Notes");
117 if (count($this->notes) == 0)
135 foreach($this->notes as $note)
137 switch ($note->getLabel())
141 $alt = $lng->txt(
"note");
146 $alt = $lng->txt(
"note").
", ".$lng->txt(
"important");
151 $alt = $lng->txt(
"note").
", ".$lng->txt(
"question");
156 $alt = $lng->txt(
"note").
", ".$lng->txt(
"pro");
161 $alt = $lng->txt(
"note").
", ".$lng->txt(
"contra");
166 $target = $note->getObject();
169 $title = $note->getSubject();
180 "date" => $note->getCreationDate(),
181 "id" => $note->getId(),
182 "obj_type" => $target[
"obj_type"],
183 "obj_id" => $target[
"obj_id"],
184 "rep_obj_id" => $target[
"rep_obj_id"]);
197 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
198 if (!is_object($this->note_gui))
201 $this->note_gui->enableTargets();
210 $this->tpl->setVariable(
"VAL_SUBJECT", $a_set[
"subject"]);
214 $ilCtrl->setParameter($this,
"rel_obj", $a_set[
"rep_obj_id"]);
215 $ilCtrl->setParameter($this,
"note_id", $a_set[
"id"]);
217 $this->tpl->setVariable(
"HREF_SHOW_NOTE",
218 $ilCtrl->getLinkTarget($this,
"showNote"));
219 $this->tpl->setVariable(
"IMG_NOTE", $a_set[
"img"]);
220 $this->tpl->setVariable(
"ALT_NOTE", $a_set[
"alt"]);
221 $ilCtrl->clearParameters($this);
226 $this->tpl->setCurrentBlock(
"details");
227 if (substr($a_set[
"text"], 0, 40) != substr($a_set[
"text"], 0, 40))
229 $this->tpl->setVariable(
"NOTE_TEXT", $a_set[
"text"]);
231 $this->tpl->setVariable(
"VAL_DATE",
233 $this->tpl->parseCurrentBlock();
236 $this->note_gui->showTargets($this->tpl, $a_set[
"rep_obj_id"], $a_set[
"id"],
237 $a_set[
"obj_type"], $a_set[
"obj_id"]);
240 $this->tpl->setCurrentBlock(
"edit_note");
241 $this->tpl->setVariable(
"TXT_EDIT_NOTE", $lng->txt(
"edit"));
242 $ilCtrl->setParameterByClass(
"ilnotegui",
"rel_obj", $a_set[
"rep_obj_id"]);
243 $ilCtrl->setParameterByClass(
"ilnotegui",
"note_id", $a_set[
"id"]);
244 $ilCtrl->setParameterByClass(
"ilnotegui",
"note_type",
IL_NOTE_PRIVATE);
245 $this->tpl->setVariable(
"LINK_EDIT_NOTE",
246 $ilCtrl->getLinkTargetByClass(array(
"ilpersonaldesktopgui",
"ilpdnotesgui",
"ilnotegui"),
"editNoteForm")
248 $this->tpl->parseCurrentBlock();
250 $ilCtrl->clearParametersByClass(
"ilnotegui");
260 return '<div class="small">'.((int) count($this->notes)).
" ".$lng->txt(
"notes").
"</div>";
270 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
273 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
275 $content_block->setContent(
$note_gui->getPDNoteHTML(
$_GET[
"note_id"]));
276 $content_block->setTitle($lng->txt(
"note"));
277 $content_block->setColSpan(2);
279 $content_block->addHeaderCommand($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
280 $lng->txt(
"selected_items_back"));
282 return $content_block->getHTML();