4 include_once
'Services/Block/classes/class.ilBlockGUI.php';
5 include_once
'Services/Mail/classes/class.ilMailUserCache.php';
24 include_once
'Services/User/classes/class.ilObjUser.php';
25 include_once
'Services/Mail/classes/class.ilMailbox.php';
26 include_once
'Services/Mail/classes/class.ilMail.php';
28 parent::__construct();
42 return self::$block_type;
78 $cmd = $ilCtrl->getCmd(
'getHTML');
87 $umail =
new ilMail($ilUser->getId());
88 if(!$rbacsystem->checkAccess(
'internal_mail', $umail->getMailObjectReferenceId()))
99 $html = parent::getHTML();
111 require_once
'Services/Mail/classes/class.ilObjMail.php';
113 $umail =
new ilMail($ilUser->getId());
114 $mbox =
new ilMailBox($ilUser->getId());
115 $this->inbox = $mbox->getInboxFolder();
120 'status' =>
'unread',
141 parent::fillDataSection();
146 if(count($this->mails) == 0)
165 $this->tpl->touchBlock(
'usr_image_space');
166 if($user && $user->getId() != ANONYMOUS_USER_ID)
168 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', $user->getPublicName());
169 $this->tpl->setVariable(
'IMG_SENDER', $user->getPersonalPicturePath(
'xxsmall'));
170 $this->tpl->setVariable(
'ALT_SENDER', htmlspecialchars($user->getPublicName()));
174 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', $mail[
'import_name'] .
' (' . $lng->txt(
'user_deleted') .
')');
176 $this->tpl->setCurrentBlock(
'image_container');
177 $this->tpl->touchBlock(
'image_container');
178 $this->tpl->parseCurrentBlock();
182 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', ilMail::_getIliasMailerName());
184 $this->tpl->setVariable(
'ALT_SENDER', htmlspecialchars(ilMail::_getIliasMailerName()));
191 if($user && $user->getId() != ANONYMOUS_USER_ID)
193 $this->tpl->setVariable(
'PUBLIC_NAME_SHORT', $user->getPublicName());
197 $this->tpl->setVariable(
'PUBLIC_NAME_SHORT', $mail[
'import_name'] .
' (' . $lng->txt(
'user_deleted') .
')');
201 $this->tpl->setVariable(
'PUBLIC_NAME_SHORT', ilMail::_getIliasMailerName());
205 $this->tpl->setVariable(
'NEW_MAIL_SUBJ', htmlentities($mail[
'm_subject'], ENT_NOQUOTES,
'UTF-8'));
206 $ilCtrl->setParameter($this,
'mobj_id', $this->inbox);
207 $ilCtrl->setParameter($this,
'mail_id', $mail[
'mail_id']);
208 $ilCtrl->setParameter($this,
'mail_mode', $this->mail_mode);
209 $this->tpl->setVariable(
'NEW_MAIL_LINK_READ', $ilCtrl->getLinkTarget($this,
'showMail'));
210 $ilCtrl->clearParameters($this);
220 return '<div class="small">' . ((int)count($this->mails)) .
" " . $lng->txt(
"mails_pl") .
"</div>";
230 include_once(
"./Services/Mail/classes/class.ilPDMailGUI.php");
233 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
235 $content_block->setContent($mail_gui->getPDMailHTML(
$_GET[
"mail_id"],
237 $content_block->setTitle($lng->txt(
"message"));
238 $content_block->setColSpan(2);
240 $content_block->addHeaderCommand($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
241 $lng->txt(
"selected_items_back"));
243 if(
$_GET[
"mail_mode"] !=
"system")
245 $content_block->addBlockCommand(
"ilias.php?baseClass=ilMailGUI&mail_id=" .
246 $_GET[
"mail_id"] .
"&mobj_id=" .
$_GET[
"mobj_id"] .
"&type=reply",
248 $content_block->addBlockCommand(
"ilias.php?baseClass=ilMailGUI&mail_id=" .
249 $_GET[
"mail_id"] .
"&mobj_id=" . $_GET[
"mobj_id"] .
"&type=read",
252 $ilCtrl->setParameter($this,
'mail_id', (
int)$_GET[
'mail_id']);
253 $content_block->addBlockCommand($ilCtrl->getLinkTarget($this,
'deleteMail'), $lng->txt(
'delete'));
259 $ilCtrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
260 $ilCtrl->setParameter($this,
"mobj_id",
$_GET[
"mobj_id"]);
261 $content_block->addBlockCommand(
262 $ilCtrl->getLinkTarget($this,
"deleteMail"),
263 $lng->txt(
"delete"));
264 $ilCtrl->clearParameters($this);
267 return $content_block->getHTML();
277 $lng->loadLanguageModule(
'mail');
280 $mbox =
new ilMailBox(
$GLOBALS[
'DIC'][
'ilUser']->getId());
282 if(!
$_GET[
'mobj_id'])
284 $_GET[
'mobj_id'] = $mbox->getInboxFolder();
287 if($umail->moveMailsToFolder(
array(
$_GET[
'mail_id']),
288 $mbox->getTrashFolder())
297 $ilCtrl->redirectByClass(
'ilpersonaldesktopgui',
'show');
307 foreach($data as $mail)
309 if($mail[
'sender_id'] && $mail[
'sender_id'] != ANONYMOUS_USER_ID)
311 $usr_ids[$mail[
'sender_id']] = $mail[
'sender_id'];
315 ilMailUserCache::preloadUserObjects($usr_ids);
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
BlockGUI class for Personal Desktop Mail block.
static getScreenMode()
Get Screen Mode for current command.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
fillDataSection()
Fill data section.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setColSpan($a_colspan)
Set Columns Span.
Mail User Interface class.
setImage($a_image)
Set Image.
fillRow($mail)
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)
setData($a_data)
Set Data.
This class handles base functions for mail handling.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
static getBlockType()
Get block type.
static formatDate(ilDateTime $date)
Format a date public.
static getUserObjectById($usr_id)
__construct()
Constructor.
static isRepositoryObject()
Get block type.
Create styles array
The data for the language used.
getMailsOfFolder($a_folder_id, $filter=array())
setLimit($a_limit)
Set Limit.
executeCommand()
execute command
This class represents a block method of a block.
BlockGUI class for (centered) Content on Personal Desktop.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
const PD_SYS_MSG_MAIL_BLOCK
getCurrentDetailLevel()
Get Current Detail Level.
getOverview()
Get overview.