5include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 $this->ctrl =
$DIC->ctrl();
28 $this->lng =
$DIC->language();
29 $this->
user = $DIC->user();
32 parent::__construct();
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();
An exception for terminatinating execution or to throw for unit testing.
This class represents a block method of a block.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setLimit($a_limit)
Set Limit.
getCurrentDetailLevel()
Get Current Detail Level.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
setData($a_data)
Set Data.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
static _getLastNotesOfUser()
get last notes of current user
BlockGUI class for (centered) Content on Personal Desktop.
BlockGUI class for Personal Desktop Notes block.
showNote()
show single note
static getScreenMode()
Get Screen Mode for current command.
getListRowData()
Get list data.
fillDataSection()
Fill data section.
static isRepositoryObject()
Get block type.
fillRow($a_set)
get flat bookmark list for personal desktop
__construct()
Constructor.
getHTML()
Handle config status.
getOverview()
Get overview.
executeCommand()
execute command
static getBlockType()
Get block type.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)