5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 parent::__construct();
41 return self::$block_type;
78 $next_class = $ilCtrl->getNextClass();
79 $cmd = $ilCtrl->getCmd(
"getHTML");
92 return parent::getHTML();
103 include_once(
"Services/Notes/classes/class.ilNote.php");
108 $this->
setRowTemplate(
"tpl.pd_notes_overview.html",
"Services/Notes");
111 parent::fillDataSection();
116 if (count($this->notes) == 0)
134 foreach($this->notes as $note)
136 switch ($note->getLabel())
140 $alt = $lng->txt(
"note");
145 $alt = $lng->txt(
"note").
", ".$lng->txt(
"important");
150 $alt = $lng->txt(
"note").
", ".$lng->txt(
"question");
155 $alt = $lng->txt(
"note").
", ".$lng->txt(
"pro");
160 $alt = $lng->txt(
"note").
", ".$lng->txt(
"contra");
168 $title = $note->getSubject();
179 "date" => $note->getCreationDate(),
180 "id" => $note->getId(),
181 "obj_type" =>
$target[
"obj_type"],
183 "rep_obj_id" =>
$target[
"rep_obj_id"]);
196 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
197 if (!is_object($this->note_gui))
200 $this->note_gui->enableTargets();
209 $this->tpl->setVariable(
"VAL_SUBJECT", $a_set[
"subject"]);
213 $ilCtrl->setParameter($this,
"rel_obj", $a_set[
"rep_obj_id"]);
214 $ilCtrl->setParameter($this,
"note_id", $a_set[
"id"]);
216 $this->tpl->setVariable(
"HREF_SHOW_NOTE",
217 $ilCtrl->getLinkTarget($this,
"showNote"));
218 $this->tpl->setVariable(
"IMG_NOTE", $a_set[
"img"]);
219 $this->tpl->setVariable(
"ALT_NOTE", $a_set[
"alt"]);
220 $ilCtrl->clearParameters($this);
225 $this->tpl->setCurrentBlock(
"details");
226 if (substr($a_set[
"text"], 0, 40) != substr($a_set[
"text"], 0, 40))
228 $this->tpl->setVariable(
"NOTE_TEXT", $a_set[
"text"]);
230 $this->tpl->setVariable(
"VAL_DATE",
232 $this->tpl->parseCurrentBlock();
235 $this->note_gui->showTargets($this->tpl, $a_set[
"rep_obj_id"], $a_set[
"id"],
236 $a_set[
"obj_type"], $a_set[
"obj_id"]);
239 $this->tpl->setCurrentBlock(
"edit_note");
240 $this->tpl->setVariable(
"TXT_EDIT_NOTE", $lng->txt(
"edit"));
241 $ilCtrl->setParameterByClass(
"ilnotegui",
"rel_obj", $a_set[
"rep_obj_id"]);
242 $ilCtrl->setParameterByClass(
"ilnotegui",
"note_id", $a_set[
"id"]);
243 $ilCtrl->setParameterByClass(
"ilnotegui",
"note_type",
IL_NOTE_PRIVATE);
244 $this->tpl->setVariable(
"LINK_EDIT_NOTE",
245 $ilCtrl->getLinkTargetByClass(
array(
"ilpersonaldesktopgui",
"ilpdnotesgui",
"ilnotegui"),
"editNoteForm")
247 $this->tpl->parseCurrentBlock();
249 $ilCtrl->clearParametersByClass(
"ilnotegui");
259 return '<div class="small">'.((int) count($this->notes)).
" ".$lng->txt(
"notes").
"</div>";
269 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
272 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
274 $content_block->setContent(
$note_gui->getPDNoteHTML(
$_GET[
"note_id"]));
275 $content_block->setTitle($lng->txt(
"note"));
276 $content_block->setColSpan(2);
277 $content_block->addHeaderCommand($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
278 $lng->txt(
"selected_items_back"));
280 return $content_block->getHTML();
static isRepositoryObject()
Get block type.
fillDataSection()
Fill data section.
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.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
__construct()
Constructor.
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.
static formatDate(ilDateTime $date)
Format a date public.
Create styles array
The data for the language used.
setLimit($a_limit)
Set Limit.
static getScreenMode()
Get Screen Mode for current command.
showNote()
show single note
static getBlockType()
Get block type.
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.