5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 $this->ctrl = $DIC->ctrl();
28 $this->lng = $DIC->language();
29 $this->
user = $DIC->user();
30 $lng = $DIC->language();
32 parent::__construct();
44 return self::$block_type;
60 switch (
$_GET[
"cmd"]) {
78 $next_class =
$ilCtrl->getNextClass();
79 $cmd =
$ilCtrl->getCmd(
"getHTML");
89 return parent::getHTML();
100 include_once(
"Services/Notes/classes/class.ilNote.php");
104 $this->
setRowTemplate(
"tpl.pd_notes_overview.html",
"Services/Notes");
107 parent::fillDataSection();
110 if (count($this->notes) == 0) {
129 foreach ($this->notes as $note) {
130 switch ($note->getLabel()) {
133 $alt =
$lng->txt(
"note");
138 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"important");
143 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"question");
148 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"pro");
153 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"contra");
161 $title = $note->getSubject();
171 "date" => $note->getCreationDate(),
172 "id" => $note->getId(),
173 "obj_type" =>
$target[
"obj_type"],
175 "rep_obj_id" =>
$target[
"rep_obj_id"]);
190 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
191 if (!is_object($this->note_gui)) {
192 $this->note_gui =
new ilNoteGUI(0, 0,
"");
193 $this->note_gui->enableTargets();
196 $this->tpl->setVariable(
"VAL_SUBJECT", $a_set[
"subject"]);
199 $ilCtrl->setParameter($this,
"rel_obj", $a_set[
"rep_obj_id"]);
200 $ilCtrl->setParameter($this,
"note_id", $a_set[
"id"]);
202 $this->tpl->setVariable(
204 $ilCtrl->getLinkTarget($this,
"showNote")
206 $this->tpl->setVariable(
"IMG_NOTE", $a_set[
"img"]);
207 $this->tpl->setVariable(
"ALT_NOTE", $a_set[
"alt"]);
208 $ilCtrl->clearParameters($this);
212 $this->tpl->setCurrentBlock(
"details");
213 if (substr($a_set[
"text"], 0, 40) != substr($a_set[
"text"], 0, 40)) {
214 $this->tpl->setVariable(
"NOTE_TEXT", $a_set[
"text"]);
216 $this->tpl->setVariable(
220 $this->tpl->parseCurrentBlock();
223 $note =
new ilNote($a_set[
"id"]);
224 $this->tpl->setVariable(
226 $this->note_gui->renderTargets($note)
230 $this->tpl->setCurrentBlock(
"edit_note");
231 $this->tpl->setVariable(
"TXT_EDIT_NOTE",
$lng->txt(
"edit"));
232 $ilCtrl->setParameterByClass(
"ilnotegui",
"rel_obj", $a_set[
"rep_obj_id"]);
233 $ilCtrl->setParameterByClass(
"ilnotegui",
"note_id", $a_set[
"id"]);
235 $this->tpl->setVariable(
237 $ilCtrl->getLinkTargetByClass(array(
"ilpersonaldesktopgui",
"ilpdnotesgui",
"ilnotegui"),
"editNoteForm")
240 $this->tpl->parseCurrentBlock();
242 $ilCtrl->clearParametersByClass(
"ilnotegui");
254 return '<div class="small">' . ((int) count($this->notes)) .
" " .
$lng->txt(
"notes") .
"</div>";
265 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
268 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
270 $content_block->setContent(
$note_gui->getPDNoteHTML(
$_GET[
"note_id"]));
271 $content_block->setTitle(
$lng->txt(
"note"));
272 $content_block->setColSpan(2);
273 $content_block->addHeaderCommand(
274 $ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
275 $lng->txt(
"selected_items_back")
278 return $content_block->getHTML();
fillDataSection()
Fill data section.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
getListRowData()
Get list data.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
BlockGUI class for Personal Desktop Notes block.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
__construct()
Constructor.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
fillRow($a_set)
get flat bookmark list for personal desktop
setTitle($a_title)
Set Title.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
executeCommand()
execute command
setData($a_data)
Set Data.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setLimit($a_limit)
Set Limit.
static getScreenMode()
Get Screen Mode for current command.
showNote()
show single note
This class represents a block method of a block.
BlockGUI class for (centered) Content on Personal Desktop.
static _getLastNotesOfUser()
get last notes of current user
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
getCurrentDetailLevel()
Get Current Detail Level.
getOverview()
Get overview.