/** * @param array $row */ public function fillRow(array $row) { /** * @var $ilCtrl ilCtrl */ global $ilCtrl; if ($this->getParentObject()->isCRUDContext()) { $row['chb'] = ilUtil::formCheckbox(false, 'unit_ids[]', $row['unit_id']); $sequence = new ilNumberInputGUI('', 'sequence[' . $row['unit_id'] . ']'); $sequence->setValue($this->position++ * 10); $sequence->setMinValue(0); $sequence->setSize(3); $row['sequence'] = $sequence->render(); $action = new ilAdvancedSelectionListGUI(); $action->setId('asl_content_' . $row['unit_id']); $action->setAsynch(false); $action->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'unit_id', $row['unit_id']); $action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitModificationForm')); $action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteUnit')); $ilCtrl->setParameter($this->getParentObject(), 'unit_id', ''); $row['actions'] = $action->getHtml(); } if ($row['unit_id'] == $row['baseunit_id']) { $row['baseunit'] = ''; } parent::fillRow($row); }
/** * @param bool $delete_item * @param bool $delete_folder * @param ilCloudFileNode $node * * @return string */ public function getSelectionListItemsHTML($delete_item = false, $delete_folder = false, ilCloudFileNode $node) { global $lng, $ilCtrl; /** * @var ilCtrl $ilCtrl */ $this->node = $node; if ($delete_item && !$node->getIsDir() || $delete_folder && $node->getIsDir() || $this->checkHasAction()) { include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $this->selection_list = new ilAdvancedSelectionListGUI(); $this->selection_list->setId("id_action_list_" . $this->node->getId()); $this->selection_list->setListTitle($lng->txt("actions")); $this->selection_list->setItemLinkClass("xsmall"); if ($this->getAsyncMode()) { $this->selection_list->setAsynch(true); $this->selection_list->setAsynchUrl(html_entity_decode($ilCtrl->getLinkTargetByClass("ilobjcloudgui", "asyncGetActionListContent", false) . "&node_id=" . $node->getId())); } else { $this->addSelectionListItems($delete_item, $delete_folder); } return $this->selection_list->getHtml(); } else { return ""; } }
/** * @param array $row */ public function fillRow(array $row) { /** * @var $ilCtrl ilCtrl */ global $ilCtrl; $row['chb'] = ilUtil::formCheckbox(false, 'category_ids[]', $row['category_id']); $action = new ilAdvancedSelectionListGUI(); $action->setId('asl_content_' . $row['category_id']); $action->setAsynch(false); $action->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'category_id', $row['category_id']); $action->addItem($this->lng->txt('un_show_units'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitsOfCategory')); if ($this->getParentObject()->isCRUDContext()) { $action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitCategoryModificationForm')); $action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteCategory')); } else { $action->addItem($this->lng->txt('import'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmImportGlobalCategory')); } $row['title_href'] = $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitsOfCategory'); $ilCtrl->setParameter($this->getParentObject(), 'category_id', ''); $row['actions'] = $action->getHtml(); parent::fillRow($row); }
/** * Shows meeting records * * @access public */ public function viewRecords($has_access = false, $by_type = 'record') { $this->pluginObj->includeClass('class.ilAdobeConnectServer.php'); $this->pluginObj->includeClass('class.ilAdobeConnectRecordsTableGUI.php'); $this->pluginObj->includeClass('class.ilAdobeConnectContentTableGUI.php'); $this->pluginObj->includeClass('class.ilXAVCPermissions.php'); $server = ilAdobeConnectServer::getPresentationUrl(); $this->tabs->activateTab('contents'); $my_tpl = new ilTemplate($this->pluginObj->getDirectory() . '/templates/tpl.meeting_content.html', true, true); if ($this->object->readContents($by_type)) { // Get contents and records $contents = $this->object->searchContent(NULL); if ($has_access) { $view_mode = ilAdobeConnectContentTableGUI::MODE_EDIT; } $table = new ilAdobeConnectRecordsTableGUI($this, 'showContent', $by_type, $view_mode); $table->init(); $data = array(); $i = 0; require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; foreach ($contents as $content) { $content_type = $content->getAttributes()->getAttribute('type'); if ($content_type != $by_type) { continue; } $data[$i]['title'] = $content->getAttributes()->getAttribute('name'); $data[$i]['type'] = $content->getAttributes()->getAttribute('type') == 'record' ? $this->pluginObj->txt('record') : $this->pluginObj->txt('content'); $auth_mode = ilAdobeConnectServer::getSetting('auth_mode'); switch ($auth_mode) { case ilAdobeConnectServer::AUTH_MODE_SWITCHAAI: $data[$i]['link'] = $server . $content->getAttributes()->getAttribute('url'); default: $data[$i]['rec_url'] = $server . $content->getAttributes()->getAttribute('url'); $this->ctrl->setParameter($this, 'record_url', urlencode($data[$i]['rec_url'])); $data[$i]['link'] = $this->ctrl->getLinkTarget($this, 'requestAdobeConnectContent'); } $data[$i]['date_created'] = $content->getAttributes()->getAttribute('date-created')->getUnixTime(); $data[$i]['description'] = $content->getAttributes()->getAttribute('description'); if ($has_access && $content_type == $by_type) { $content_id = $content->getAttributes()->getAttribute('sco-id'); $this->ctrl->setParameter($this, 'content_id', $content_id); // if($content_type == 'content') // { $action = new ilAdvancedSelectionListGUI(); $action->setId('asl_' . $content_id . mt_rand(1, 50)); $action->setListTitle($this->lng->txt('actions')); $action->addItem($this->lng->txt('edit'), '', $this->ctrl->getLinkTarget($this, 'editRecord')); $action->addItem($this->lng->txt('delete'), '', $this->ctrl->getLinkTarget($this, 'askDeleteContents')); $data[$i]['actions'] = $action->getHtml(); // } // else // { // $data[$i]['actions'] = ''; // } } ++$i; } $table->setData($data); $my_tpl->setVariable('CONTENT_TABLE', $table->getHTML()); } return $my_tpl->get(); }
/** * */ protected function showAcceptedTermsOfService() { /** * @var $agree_date ilNonEditableValueGUI */ $agree_date = $this->form_gui->getItemByPostVar('agree_date'); if ($agree_date && $agree_date->getValue()) { $this->lng->loadLanguageModule('tos'); require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php'; /** * @var $entity ilTermsOfServiceAcceptanceEntity */ $entity = ilTermsOfServiceHelper::getCurrentAcceptanceForUser($this->object); if ($entity->getId()) { $show_agreement_text = new ilCheckboxInputGUI($this->lng->txt('tos_show_signed_text'), 'tos_show_signed_text'); $agreement_lang = new ilNonEditableValueGUI($this->lng->txt('language'), ''); $agreement_lang->setValue($this->lng->txt('meta_l_' . $entity->getIso2LanguageCode())); $show_agreement_text->addSubItem($agreement_lang); $agreement_document = new ilNonEditableValueGUI($this->lng->txt('tos_agreement_document'), '', true); require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $action = new ilAdvancedSelectionListGUI(); $action->setId('asl_content_accepted_content'); $action->setListTitle($this->lng->txt('tos_accepted_content')); $action->setHeaderIcon(ilUtil::getImagePath('icon_preview.png')); $action->setAsynch(true); $action->setAsynchUrl($this->ctrl->getLinkTarget($this, 'showAgreementTextAsynch', '', true, false)); $agreement_document->setValue($entity->getSource() . $action->getHtml()); $show_agreement_text->addSubItem($agreement_document); $agree_date->addSubItem($show_agreement_text); } } else { if ($agree_date) { $agree_date->setValue($this->lng->txt('tos_not_accepted_yet')); } } }