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();
46 return self::$block_type;
64 switch (
$_GET[
"cmd"]) {
82 $next_class =
$ilCtrl->getNextClass();
83 $cmd =
$ilCtrl->getCmd(
"getHTML");
93 return parent::getHTML();
104 include_once(
"Services/Notes/classes/class.ilNote.php");
108 $this->
setRowTemplate(
"tpl.pd_notes_overview.html",
"Services/Notes");
111 parent::fillDataSection();
114 if (count($this->notes) == 0) {
133 foreach ($this->notes as $note) {
134 switch ($note->getLabel()) {
137 $alt =
$lng->txt(
"note");
142 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"important");
147 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"question");
152 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"pro");
157 $alt =
$lng->txt(
"note") .
", " .
$lng->txt(
"contra");
165 $title = $note->getSubject();
175 "date" => $note->getCreationDate(),
176 "id" => $note->getId(),
177 "obj_type" =>
$target[
"obj_type"],
179 "rep_obj_id" =>
$target[
"rep_obj_id"]);
194 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
195 if (!is_object($this->note_gui)) {
196 $this->note_gui =
new ilNoteGUI(0, 0,
"");
197 $this->note_gui->enableTargets();
200 $this->tpl->setVariable(
"VAL_SUBJECT", $a_set[
"subject"]);
203 $ilCtrl->setParameter($this,
"rel_obj", $a_set[
"rep_obj_id"]);
204 $ilCtrl->setParameter($this,
"note_id", $a_set[
"id"]);
206 $this->tpl->setVariable(
208 $ilCtrl->getLinkTarget($this,
"showNote")
210 $this->tpl->setVariable(
"IMG_NOTE", $a_set[
"img"]);
211 $this->tpl->setVariable(
"ALT_NOTE", $a_set[
"alt"]);
212 $ilCtrl->clearParameters($this);
216 $this->tpl->setCurrentBlock(
"details");
217 if (substr($a_set[
"text"], 0, 40) != substr($a_set[
"text"], 0, 40)) {
218 $this->tpl->setVariable(
"NOTE_TEXT", $a_set[
"text"]);
220 $this->tpl->setVariable(
224 $this->tpl->parseCurrentBlock();
227 $this->note_gui->showTargets(
229 $a_set[
"rep_obj_id"],
236 $this->tpl->setCurrentBlock(
"edit_note");
237 $this->tpl->setVariable(
"TXT_EDIT_NOTE",
$lng->txt(
"edit"));
238 $ilCtrl->setParameterByClass(
"ilnotegui",
"rel_obj", $a_set[
"rep_obj_id"]);
239 $ilCtrl->setParameterByClass(
"ilnotegui",
"note_id", $a_set[
"id"]);
241 $this->tpl->setVariable(
243 $ilCtrl->getLinkTargetByClass(
array(
"ilpersonaldesktopgui",
"ilpdnotesgui",
"ilnotegui"),
"editNoteForm")
246 $this->tpl->parseCurrentBlock();
248 $ilCtrl->clearParametersByClass(
"ilnotegui");
260 return '<div class="small">' . ((int) count($this->notes)) .
" " .
$lng->txt(
"notes") .
"</div>";
271 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
274 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
276 $content_block->setContent(
$note_gui->getPDNoteHTML(
$_GET[
"note_id"]));
277 $content_block->setTitle(
$lng->txt(
"note"));
278 $content_block->setColSpan(2);
279 $content_block->addHeaderCommand(
280 $ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
281 $lng->txt(
"selected_items_back")
284 return $content_block->getHTML();
static isRepositoryObject()
Get block type.
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.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
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.
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.