4include_once
'Services/Block/classes/class.ilBlockGUI.php';
5include_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();
88 if(!$rbacsystem->checkAccess(
'internal_mail', $umail->getMailObjectReferenceId()))
99 $html = parent::getHTML();
112 $mbox =
new ilMailBox(
$ilUser->getId());
113 $this->inbox = $mbox->getInboxFolder();
115 $this->mails = $umail->getMailsOfFolder(
118 'status' =>
'unread',
139 parent::fillDataSection();
144 if(count($this->mails) == 0)
163 $this->tpl->touchBlock(
'usr_image_space');
164 if($user && $user->getId() != ANONYMOUS_USER_ID)
166 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', $user->getPublicName());
167 $this->tpl->setVariable(
'IMG_SENDER', $user->getPersonalPicturePath(
'xxsmall'));
168 $this->tpl->setVariable(
'ALT_SENDER', htmlspecialchars($user->getPublicName()));
172 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', $mail[
'import_name'] .
' (' .
$lng->txt(
'user_deleted') .
')');
174 $this->tpl->setCurrentBlock(
'image_container');
175 $this->tpl->touchBlock(
'image_container');
176 $this->tpl->parseCurrentBlock();
180 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', ilMail::_getIliasMailerName());
182 $this->tpl->setVariable(
'ALT_SENDER', htmlspecialchars(ilMail::_getIliasMailerName()));
189 if($user && $user->getId() != ANONYMOUS_USER_ID)
191 $this->tpl->setVariable(
'PUBLIC_NAME_SHORT', $user->getPublicName());
195 $this->tpl->setVariable(
'PUBLIC_NAME_SHORT', $mail[
'import_name'] .
' (' .
$lng->txt(
'user_deleted') .
')');
199 $this->tpl->setVariable(
'PUBLIC_NAME_SHORT', ilMail::_getIliasMailerName());
203 $this->tpl->setVariable(
'NEW_MAIL_SUBJ', htmlentities($mail[
'm_subject'], ENT_NOQUOTES,
'UTF-8'));
204 $ilCtrl->setParameter($this,
'mobj_id', $this->inbox);
205 $ilCtrl->setParameter($this,
'mail_id', $mail[
'mail_id']);
206 $ilCtrl->setParameter($this,
'mail_mode', $this->mail_mode);
207 $this->tpl->setVariable(
'NEW_MAIL_LINK_READ',
$ilCtrl->getLinkTarget($this,
'showMail'));
208 $ilCtrl->clearParameters($this);
218 return '<div class="small">' . ((int)count($this->mails)) .
" " .
$lng->txt(
"mails_pl") .
"</div>";
228 include_once(
"./Services/Mail/classes/class.ilPDMailGUI.php");
231 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
233 $content_block->setContent($mail_gui->getPDMailHTML(
$_GET[
"mail_id"],
235 $content_block->setTitle(
$lng->txt(
"message"));
236 $content_block->setColSpan(2);
238 $content_block->addHeaderCommand(
$ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
239 $lng->txt(
"selected_items_back"));
241 if(
$_GET[
"mail_mode"] !=
"system")
243 $content_block->addBlockCommand(
"ilias.php?baseClass=ilMailGUI&mail_id=" .
244 $_GET[
"mail_id"] .
"&mobj_id=" .
$_GET[
"mobj_id"] .
"&type=reply",
246 $content_block->addBlockCommand(
"ilias.php?baseClass=ilMailGUI&mail_id=" .
247 $_GET[
"mail_id"] .
"&mobj_id=" .
$_GET[
"mobj_id"] .
"&type=read",
250 $ilCtrl->setParameter($this,
'mail_id', (
int)
$_GET[
'mail_id']);
251 $content_block->addBlockCommand(
$ilCtrl->getLinkTarget($this,
'deleteMail'),
$lng->txt(
'delete'));
257 $ilCtrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
258 $ilCtrl->setParameter($this,
"mobj_id",
$_GET[
"mobj_id"]);
259 $content_block->addBlockCommand(
260 $ilCtrl->getLinkTarget($this,
"deleteMail"),
261 $lng->txt(
"delete"));
262 $ilCtrl->clearParameters($this);
265 return $content_block->getHTML();
275 $lng->loadLanguageModule(
'mail');
278 $mbox =
new ilMailBox(
$_SESSION[
'AccountId']);
280 if(!
$_GET[
'mobj_id'])
282 $_GET[
'mobj_id'] = $mbox->getInboxFolder();
285 if($umail->moveMailsToFolder(array(
$_GET[
'mail_id']),
286 $mbox->getTrashFolder())
295 $ilCtrl->redirectByClass(
'ilpersonaldesktopgui',
'show');
305 foreach(
$data as $mail)
307 if($mail[
'sender_id'] && $mail[
'sender_id'] != ANONYMOUS_USER_ID)
309 $usr_ids[$mail[
'sender_id']] = $mail[
'sender_id'];
313 ilMailUserCache::preloadUserObjects($usr_ids);
This class represents a block method of a block.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setLimit($a_limit)
Set Limit.
setImage($a_image)
Set Image.
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.
setColSpan($a_colspan)
Set Columns Span.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
static formatDate(ilDateTime $date)
Format a date @access public.
static getUserObjectById($usr_id)
Class Mail this class handles base functions for mail handling.
BlockGUI class for (centered) Content on Personal Desktop.
BlockGUI class for Personal Desktop Mail block.
static getBlockType()
Get block type.
__construct()
Constructor.
fillDataSection()
Fill data section.
fillRow($mail)
get flat bookmark list for personal desktop
static getScreenMode()
Get Screen Mode for current command.
executeCommand()
execute command
getHTML()
Handle config status.
getOverview()
Get overview.
static isRepositoryObject()
Get block type.
Mail User Interface class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)