46 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
52 $this->lng->loadLanguageModule(
"dcl");
53 $this->lng->loadLanguageModule(
'content');
54 $this->lng->loadLanguageModule(
'obj');
55 $this->lng->loadLanguageModule(
'cntr');
57 if (isset(
$_GET[
'table_id'])) {
58 $this->table_id =
$_GET[
'table_id'];
59 } elseif (isset(
$_GET[
'tableview_id'])) {
60 $this->table_id = ilDclTableView::find(
$_GET[
'tableview_id'])->getTableId();
61 } elseif ($a_id > 0) {
62 $this->table_id = $this->
object->getFirstVisibleTableId();
67 if (!$DIC->ctrl()->isAsynch()) {
70 $DIC->ui()->mainTemplate()->addJavaScript(
'Modules/DataCollection/js/ilDataCollection.js');
72 $DIC->ui()->mainTemplate()->addJavaScript(
"./Services/UIComponent/Modal/js/Modal.js");
73 $DIC->ui()->mainTemplate()->addJavaScript(
"Modules/DataCollection/js/datacollection.js");
74 $this->tpl->addOnLoadCode(
75 "ilDataCollection.setEditUrl('" . $DIC->ctrl()->getLinkTargetByClass(
78 'ilobjdatacollectiongui',
86 $this->tpl->addOnLoadCode(
87 "ilDataCollection.setCreateUrl('" . $DIC->ctrl()->getLinkTargetByClass(
90 'ilobjdatacollectiongui',
98 $this->tpl->addOnLoadCode(
99 "ilDataCollection.setSaveUrl('" . $DIC->ctrl()->getLinkTargetByClass(
102 'ilobjdatacollectiongui',
103 'ildclrecordeditgui',
110 $this->tpl->addOnLoadCode(
111 "ilDataCollection.setDataUrl('" . $DIC->ctrl()->getLinkTargetByClass(
114 'ilobjdatacollectiongui',
115 'ildclrecordeditgui',
123 $DIC->ctrl()->saveParameter($this,
"table_id");
153 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
154 $ilHelp = $DIC[
'ilHelp'];
155 $ilHelp->setScreenIdComponent(
'bibl');
158 $link = $DIC->ctrl()->getLinkTarget($this,
"render");
160 if ($this->
object != null) {
161 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"dcl");
165 if (
$_GET[self::GET_DCL_GTR]) {
166 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class,
'tableview_id',
$_GET[self::GET_VIEW_ID]);
167 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class,
'record_id',
$_GET[self::GET_DCL_GTR]);
168 $DIC->ctrl()->redirectByClass(ilDclDetailedViewGUI::class,
'renderRecord');
171 $next_class = $DIC->ctrl()->getNextClass($this);
172 $cmd = $this->ctrl->getCmd();
175 $DIC->ui()->mainTemplate()->loadStandardTemplate();
176 $DIC->ui()->mainTemplate()->setContent(
"Permission Denied.");
181 switch ($next_class) {
182 case "ilinfoscreengui":
184 $DIC->tabs()->activateTab(
"id_info");
188 case "ilcommonactiondispatchergui":
190 $gui->enableCommentsSettings(
false);
191 $this->ctrl->forwardCommand($gui);
194 case "ilpermissiongui":
196 $DIC->tabs()->activateTab(
"id_permissions");
198 $this->ctrl->forwardCommand($perm_gui);
201 case "ilobjectcopygui":
204 $DIC->ui()->mainTemplate()->loadStandardTemplate();
205 $this->ctrl->forwardCommand($cp);
208 case "ildcltablelistgui":
210 $DIC->tabs()->setTabActive(
"id_tables");
212 $this->ctrl->forwardCommand($tablelist_gui);
215 case "ildclrecordlistgui":
218 $DIC->tabs()->activateTab(
"id_records");
219 $this->ctrl->setParameterByClass(ilDclRecordListGUI::class,
'tableview_id', $_REQUEST[
'tableview_id']);
221 $this->ctrl->forwardCommand($recordlist_gui);
224 case "ildclrecordeditgui":
226 $DIC->tabs()->activateTab(
"id_records");
228 $this->ctrl->forwardCommand($recordedit_gui);
233 $DIC->tabs()->setTabActive(
"id_records");
235 $this->ctrl->forwardCommand($file_gui);
240 $rgui->setObject(
$_GET[
'record_id'],
"dcl_record",
$_GET[
"field_id"],
"dcl_field");
241 $rgui->executeCommand();
242 $DIC->ctrl()->redirectByClass(
"ilDclRecordListGUI",
"listRecords");
245 case "ildcldetailedviewgui":
248 $this->ctrl->forwardCommand($recordview_gui);
249 $DIC->tabs()->clearTargets();
256 $this->ctrl->forwardCommand($recordviewGui);
257 $DIC->tabs()->clearTargets();
258 $DIC->tabs()->setBackTarget($this->lng->txt(
"back"), $DIC->ctrl()->getLinkTarget($this,
""));
260 case "ildclexportgui":
262 $DIC->tabs()->setTabActive(
"export");
265 $exp_gui->addFormat(
"xlsx", $this->lng->txt(
'dlc_xls_async_export'), $exporter,
'exportAsync');
266 $exp_gui->addFormat(
"xml");
268 $this->ctrl->forwardCommand($exp_gui);
271 case strtolower(ilDclPropertyFormGUI::class):
273 $recordedit_gui->getRecord();
274 $recordedit_gui->initForm();
275 $form = $recordedit_gui->getForm();
276 $this->ctrl->forwardCommand($form);
286 return parent::executeCommand();
301 $this->ctrl->setCmd(
"showSummary");
302 $this->ctrl->setCmdClass(
"ilinfoscreengui");
313 $ilCtrl = $DIC[
'ilCtrl'];
314 $this->ctrl->setParameterByClass(
'ilDclRecordListGUI',
'tableview_id',
$_GET[
'tableview_id']);
315 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
325 $ilTabs = $DIC[
'ilTabs'];
328 $ilTabs->activateTab(
"id_info");
331 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
335 $info->enablePrivateNotes();
336 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
338 $this->ctrl->forwardCommand($info);
345 $ilLocator = $DIC[
'ilLocator'];
347 if (is_object($this->
object)) {
348 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
356 public static function _goto($a_target)
360 $ilAccess = $DIC->access();
361 $lng = $DIC->language();
363 $id = explode(
"_", $a_target);
365 if ($ilAccess->checkAccess(
'read',
"", $a_target)) {
366 $_GET[
"baseClass"] =
"ilRepositoryGUI";
367 $_GET[self::GET_REF_ID] = $id[0];
368 $_GET[self::GET_VIEW_ID] = $id[1];
369 $_GET[self::GET_DCL_GTR] = $id[2];
370 $_GET[
"cmd"] =
"listRecords";
371 require_once(
'./ilias.php');
375 if ($ilAccess->checkAccess(
'visible',
"", $a_target)) {
381 $lng->txt(
"msg_no_perm_read_item"),
397 $forms = parent::initCreationForms($a_new_type);
408 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
409 $this->ctrl->redirectByClass(
"ilDclTableListGUI",
"listTables");
422 $ilAccess = $DIC[
'ilAccess'];
423 $ilTabs = $DIC[
'ilTabs'];
425 $ilHelp = $DIC[
'ilHelp'];
427 $ilHelp->setScreenIdComponent(
"dcl");
430 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
431 $ilTabs->addTab(
"id_records",
$lng->txt(
"content"), $this->ctrl->getLinkTargetByClass(
"ildclrecordlistgui",
"show"));
435 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()) || $ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
436 $ilTabs->addTab(
"id_info",
$lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
440 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
441 $ilTabs->addTab(
"id_settings",
$lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
"editObject"));
445 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
446 $ilTabs->addTab(
"id_tables",
$lng->txt(
"dcl_tables"), $this->ctrl->getLinkTargetByClass(
"ildcltablelistgui",
"listTables"));
450 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
451 $ilTabs->addTab(
"export",
$lng->txt(
"export"), $this->ctrl->getLinkTargetByClass(
"ildclexportgui",
""));
455 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
456 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
473 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
476 $ilTabs->activateTab(
"settings");
481 $form->setValuesByArray($values,
true);
486 $tpl->setContent($form->getHTML());
497 $this->tabs_gui->activateTab(
"id_settings");
498 $this->lng->loadLanguageModule($this->object->getType());
501 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
502 $form->setTitle($this->lng->txt($this->object->getType() .
"_edit"));
508 $ti->setRequired(
true);
519 $cb->
setInfo($this->lng->txt(
"dcl_online_info"));
523 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"dcl_activate_notification"),
"notification");
524 $cb->
setInfo($this->lng->txt(
"dcl_notification_info"));
528 $order_options = array();
530 $order_options[$table->getId()] = $table->getTitle();
535 $section_appearance->setTitle($this->lng->txt(
'cont_presentation'));
536 $form->addItem($section_appearance);
537 $form = $this->object_service->commonSettings()->legacyForm($form, $this->
object)->addTileImage();
539 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
551 $ilCtrl = $DIC[
'ilCtrl'];
552 $ilCtrl->setParameterByClass(
"ildclrecordlistgui",
"tableview_id",
$_GET[
"tableview_id"]);
553 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
575 $a_values[
"is_online"] = $this->
object->getOnline();
576 $a_values[
"rating"] = $this->
object->getRating();
577 $a_values[
"public_notes"] = $this->
object->getPublicNotes();
578 $a_values[
"approval"] = $this->
object->getApproval();
579 $a_values[
"notification"] = $this->
object->getNotification();
590 $this->
object->setOnline($a_form->
getInput(
"is_online"));
591 $this->
object->setRating($a_form->
getInput(
"rating"));
592 $this->
object->setPublicNotes($a_form->
getInput(
"public_notes"));
593 $this->
object->setApproval($a_form->
getInput(
"approval"));
594 $this->
object->setNotification($a_form->
getInput(
"notification"));
596 $this->object_service->commonSettings()->legacyForm($a_form, $this->
object)->saveTileImage();
607 $tables = $this->
object->getTables();
608 if (count($tables) == 1 and count($this->table->getRecordFields()) == 0 and count($this->table->getRecords()) == 0
609 and $this->object->getOnline()
619 $ilCtrl = $DIC[
'ilCtrl'];
622 switch (
$_GET[
"ntf"]) {
630 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
643 $ilAccess = $DIC[
'ilAccess'];
646 $ilCtrl = $DIC[
'ilCtrl'];
650 ilObjectListGUI::prepareJSLinks(
651 $this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
652 $ilCtrl->getLinkTargetByClass(
654 "ilcommonactiondispatchergui",
662 $ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
665 $lg = $dispatcher->initHeaderAction();
673 $ilCtrl->setParameter($this,
"ntf", 1);
674 $lg->addCustomCommand($ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_deactivate_dcl");
676 $lg->addHeaderIcon(
"not_icon",
ilUtil::getImagePath(
"notification_on.svg"),
$lng->txt(
"dcl_notification_activated"));
679 $ilCtrl->setParameter($this,
"ntf", 2);
680 $lg->addCustomCommand($ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_activate_dcl");
682 $lg->addHeaderIcon(
"not_icon",
ilUtil::getImagePath(
"notification_off.svg"),
$lng->txt(
"dcl_notification_deactivated"));
684 $ilCtrl->setParameter($this,
"ntf",
"");
688 $tpl->setHeaderActionMenu($lg->getHeaderAction());
690 return $lg->getHeaderAction();
693 $tpl->setHeaderActionMenu($lg->getHeaderAction());
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
initCreationForms($a_new_type)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
const TITLE_LENGTH
max length of object title
Class ilDclRecordEditGUI.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static _lookupTitle($a_id)
lookup object title
static getTableCache($table_id=0)
initEditForm()
Init object edit form.
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
const TYPE_DATA_COLLECTION
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class ilObjDataCollectionGUI.
setTabs()
setTabs create tabs (repository/workspace switch)
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
listRecords()
called by goto
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
setCols($a_cols)
Set Cols.
Export User Interface Class.
render()
show Content; redirect to ilDclRecordListGUI::listRecords
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getEditFormValues()
Get values for edit form.
updateCustom(ilPropertyFormGUI $a_form)
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
getDataCollectionObject()
prepareOutput($a_show_subobjects=true)
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addHeaderAction()
Add header action menu.
addHeaderAction($a_redraw=false)
Class ilObjDataCollection.
getEditFormCustomValues(array &$a_values)
Class ilCommonActionDispatcherGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
infoScreenForward()
show information screen
afterSave(ilObject $a_new_object)
static initJavascript()
Init javascript.