12include_once(
'Services/Table/classes/class.ilTable2GUI.php');
 
   13include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
   50        public function __construct($a_parent_obj, $a_parent_cmd = 
'', $is_mailing_allowed = 
false, $is_chat_active = 
false)
 
   60                $this->
setId(
'addr_book');
 
   61                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   63                $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, 
'setAddressbookFilter'));
 
   65                $this->
setTitle($lng->txt(
"mail_addr_entries"));
 
   66                $this->
setRowTemplate(
"tpl.mail_addressbook_row.html", 
"Services/Contact");
 
   70                $this->cron_upd_adrbook = 
$ilSetting->get(
'cron_upd_adrbook', 0);
 
   73                if($this->cron_upd_adrbook != 0)
 
   78                $this->
addColumn(
'', 
'addr_id', 
'1px', 
true);
 
   79                $this->
addColumn($this->lng->txt(
'login'), 
'login', $width);
 
   80                $this->
addColumn($this->lng->txt(
'firstname'), 
'firstname', $width);
 
   81                $this->
addColumn($this->lng->txt(
'lastname'), 
'lastname', $width);
 
   82                $this->
addColumn($this->lng->txt(
'email'), 
'email', $width);
 
   84                if(
$ilSetting->get(
'cron_upd_adrbook', 0) != 0)
 
   86                        $this->
addColumn($this->lng->txt(
'auto_update'), 
'auto_update', $width);
 
   88                $this->
addColumn($this->lng->txt(
'actions'), 
'actions', 
'20%');
 
   90                $this->
enable(
'select_all');
 
   94                if($this->mailing_allowed)
 
  100                if($this->chat_active)
 
  102                        $this->
addMultiCommand(
'inviteToChat', $this->lng->txt(
'invite_to_chat'));
 
  123                                if($this->cron_upd_adrbook != 0)
 
  125                                        $value = $value == 1 ? $this->lng->txt(
'yes') : $this->lng->txt(
'no');
 
  146                foreach (
$row as $key => $value)
 
  149                        $this->ctrl->setParameter($this->parent_obj, 
'addr_id', 
$row[
'addr_id']);
 
  153                                $this->tpl->setVariable(
"VAL_LOGIN_LINKED_LOGIN", $value);
 
  156                        if($key == 
"login" && $value != 
"")
 
  158                                if($this->mailing_allowed)
 
  160                                        $this->tpl->setVariable(
"VAL_LOGIN_LINKED_LINK", $this->ctrl->getLinkTarget($this->parent_obj, 
'mailToUsers'));
 
  161                                        $this->tpl->setVariable(
"VAL_LOGIN_LINKED_LOGIN", $value);
 
  165                                        $this->tpl->setVariable(
"VAL_LOGIN_UNLINKED", $value);
 
  171                                if(
$_GET[
"baseClass"] == 
"ilMailGUI" && $this->smtp_mailing_allowed)
 
  173                                        $this->tpl->setVariable(
"VAL_EMAIL_LINKED_LINK", $this->ctrl->getLinkTarget($this->parent_obj, 
'mailToUsers'));
 
  174                                        $this->tpl->setVariable(
"VAL_EMAIL_LINKED_EMAIL", $value);
 
  178                                        $this->tpl->setVariable(
"VAL_EMAIL_UNLINKED", $value);
 
  182                        if($key == 
'auto_update' && $this->cron_upd_adrbook != 0)
 
  184                                $this->tpl->setVariable(
"VAL_CRON_AUTO_UPDATE", $value);
 
  187                        $this->tpl->setVariable(
"VAL_".strtoupper($key), $value);
 
  191                $current_selection_list->setListTitle($this->lng->txt(
"actions"));
 
  192                $current_selection_list->setId(
"act_" . 
$row[
'addr_id']);
 
  194                $current_selection_list->addItem($this->lng->txt(
"edit"), 
'', $this->ctrl->getLinkTarget($this->parent_obj, 
"showAddressForm"));
 
  196                if($this->mailing_allowed)
 
  198                        $current_selection_list->addItem($this->lng->txt(
"send_mail_to"), 
'', $this->ctrl->getLinkTarget($this->parent_obj, 
"mailToUsers"));
 
  201                $current_selection_list->addItem($this->lng->txt(
"delete"), 
'', $this->ctrl->getLinkTarget($this->parent_obj, 
"confirmDelete"));
 
  204                if($this->chat_active)
 
  206                        $current_selection_list->addItem($this->lng->txt(
"invite_to_chat"), 
'', $this->ctrl->getLinkTarget($this->parent_obj, 
"inviteToChat"));
 
  208                $this->tpl->setVariable(
"VAL_ACTIONS", $current_selection_list->getHTML());
 
  214                include_once 
'Services/Form/classes/class.ilTextInputGUI.php';
 
  215                $ul = 
new ilTextInputGUI($this->lng->txt(
'login').
'/'.$this->lng->txt(
'email').
'/'.$this->lng->txt(
'name'), 
'query');
 
  216                $ul->setDataSource($this->ctrl->getLinkTarget($this->getParentObject(), 
'lookupAddressbookAsync', 
'', 
true));
 
  218                $ul->setSubmitFormOnEnter(
true);
 
  220                $ul->readFromSession();
 
  221                $this->filter[
'query'] = $ul->getValue();
 
  251                return $this->filter[
'query'];
 
formatCellValue($key, $value)
setSmtpMailingAllowed($smtp_mailing_allowed)
setChatActive($chat_active)
setMailingAllowed($mailing_allowed)
__construct($a_parent_obj, $a_parent_cmd='', $is_mailing_allowed=false, $is_chat_active=false)
Constructor.
User interface class for advanced drop-down selection lists.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
enable($a_module_name)
enables particular modules of table
This class represents a text property in a property form.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public