/** * Show target selection */ public function showSourceSelectionTree() { global $ilTabs, $ilToolbar, $ilCtrl, $tree, $tpl, $objDefinition; $this->tpl = $tpl; $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html', "Services/Object"); ilUtil::sendInfo($this->lng->txt('msg_copy_clipboard_source')); include_once './Services/Object/classes/class.ilPasteIntoMultipleItemsExplorer.php'; $exp = new ilPasteIntoMultipleItemsExplorer(ilPasteIntoMultipleItemsExplorer::SEL_TYPE_RADIO, 'ilias.php?baseClass=ilRepositoryGUI&cmd=goto', 'paste_copy_repexpand'); $exp->setRequiredFormItemPermission('visible,read,copy'); $ilCtrl->setParameter($this, 'selectMode', self::SOURCE_SELECTION); $exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'showSourceSelectionTree')); $exp->setTargetGet('ref_id'); $exp->setPostVar('source'); $exp->setCheckedItems(array($this->getSource())); #$exp->setNotSelectableItems(array($this->getTarget())); // Filter to container foreach (array('cat', 'root', 'grp', 'fold') as $container) { $exp->removeFormItemForType($container); } if ($_GET['paste_copy_repexpand'] == '') { $expanded = $tree->readRootId(); } else { $expanded = $_GET['paste_copy_repexpand']; } $this->tpl->setVariable('FORM_TARGET', '_self'); $this->tpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this, 'copySelection')); $exp->setExpand($expanded); // build html-output $exp->setOutput(0); $output = $exp->getOutput(); $this->tpl->setVariable('OBJECT_TREE', $output); $this->tpl->setVariable('CMD_SUBMIT', 'saveSource'); $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('btn_next')); $ilToolbar->addButton($this->lng->txt('cancel'), $ilCtrl->getLinkTarget($this, 'cancel')); }