42 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
46 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
48 $DIC->language()->loadLanguageModule(
"dcl");
50 if (isset(
$_GET[
'table_id'])) {
51 $this->table_id =
$_GET[
'table_id'];
52 } elseif (isset(
$_GET[
'tableview_id'])) {
53 $this->table_id = ilDclTableView::find(
$_GET[
'tableview_id'])->getTableId();
54 } elseif ($a_id > 0) {
55 $this->table_id = $this->
object->getFirstVisibleTableId();
60 if (!$DIC->ctrl()->isAsynch()) {
63 $DIC->ui()->mainTemplate()->addJavaScript(
'Modules/DataCollection/js/ilDataCollection.js');
64 $DIC->ui()->mainTemplate()->addJavaScript(
"Modules/DataCollection/js/datacollection.js");
65 $this->tpl->addOnLoadCode(
66 "ilDataCollection.setEditUrl('" .
$DIC->ctrl()->getLinkTargetByClass(
69 'ilobjdatacollectiongui',
77 $this->tpl->addOnLoadCode(
78 "ilDataCollection.setCreateUrl('" .
$DIC->ctrl()->getLinkTargetByClass(
81 'ilobjdatacollectiongui',
89 $this->tpl->addOnLoadCode(
90 "ilDataCollection.setSaveUrl('" .
$DIC->ctrl()->getLinkTargetByClass(
93 'ilobjdatacollectiongui',
101 $this->tpl->addOnLoadCode(
102 "ilDataCollection.setDataUrl('" .
$DIC->ctrl()->getLinkTargetByClass(
105 'ilobjdatacollectiongui',
106 'ildclrecordeditgui',
114 $DIC->ctrl()->saveParameter($this,
"table_id");
144 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
145 $ilHelp =
$DIC[
'ilHelp'];
146 $ilHelp->setScreenIdComponent(
'bibl');
149 $link =
$DIC->ctrl()->getLinkTarget($this,
"render");
151 if ($this->
object !=
null) {
152 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"dcl");
156 if (
$_GET[self::GET_DCL_GTR]) {
157 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class,
'tableview_id',
$_GET[self::GET_VIEW_ID]);
158 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class,
'record_id',
$_GET[self::GET_DCL_GTR]);
159 $DIC->ctrl()->redirectByClass(ilDclDetailedViewGUI::class,
'renderRecord');
162 $next_class =
$DIC->ctrl()->getNextClass($this);
163 $cmd =
$DIC->ctrl()->getCmd();
166 $DIC->ui()->mainTemplate()->getStandardTemplate();
167 $DIC->ui()->mainTemplate()->setContent(
"Permission Denied.");
172 switch ($next_class) {
173 case "ilinfoscreengui":
175 $DIC->tabs()->activateTab(
"id_info");
179 case "ilcommonactiondispatchergui":
181 $gui->enableCommentsSettings(
false);
182 $this->ctrl->forwardCommand($gui);
185 case "ilpermissiongui":
187 $DIC->tabs()->activateTab(
"id_permissions");
189 $this->ctrl->forwardCommand($perm_gui);
192 case "ilobjectcopygui":
195 $DIC->ui()->mainTemplate()->getStandardTemplate();
196 $this->ctrl->forwardCommand($cp);
199 case "ildcltablelistgui":
201 $DIC->tabs()->setTabActive(
"id_tables");
203 $this->ctrl->forwardCommand($tablelist_gui);
206 case "ildclrecordlistgui":
209 $DIC->tabs()->activateTab(
"id_records");
210 $this->ctrl->setParameterByClass(ilDclRecordListGUI::class,
'tableview_id', $_REQUEST[
'tableview_id']);
212 $this->ctrl->forwardCommand($recordlist_gui);
215 case "ildclrecordeditgui":
217 $DIC->tabs()->activateTab(
"id_records");
219 $this->ctrl->forwardCommand($recordedit_gui);
224 $DIC->tabs()->setTabActive(
"id_records");
226 $this->ctrl->forwardCommand($file_gui);
231 $rgui->setObject(
$_GET[
'record_id'],
"dcl_record",
$_GET[
"field_id"],
"dcl_field");
232 $rgui->executeCommand();
233 $DIC->ctrl()->redirectByClass(
"ilDclRecordListGUI",
"listRecords");
236 case "ildcldetailedviewgui":
239 $this->ctrl->forwardCommand($recordview_gui);
240 $DIC->tabs()->clearTargets();
247 $this->ctrl->forwardCommand($recordviewGui);
248 $DIC->tabs()->clearTargets();
249 $DIC->tabs()->setBackTarget($this->lng->txt(
"back"),
$DIC->ctrl()->getLinkTarget($this,
""));
251 case "ildclexportgui":
253 $DIC->tabs()->setTabActive(
"export");
256 $exp_gui->addFormat(
"xlsx", $this->lng->txt(
'dlc_xls_async_export'), $exporter,
'exportAsync');
257 $exp_gui->addFormat(
"xml");
259 $this->ctrl->forwardCommand($exp_gui);
262 case strtolower(ilDclPropertyFormGUI::class):
264 $recordedit_gui->getRecord();
265 $recordedit_gui->initForm();
266 $form = $recordedit_gui->getForm();
267 $this->ctrl->forwardCommand(
$form);
271 return parent::executeCommand();
285 $this->ctrl->setCmd(
"showSummary");
286 $this->ctrl->setCmdClass(
"ilinfoscreengui");
298 $this->ctrl->setParameterByClass(
'ilDclRecordListGUI',
'tableview_id',
$_GET[
'tableview_id']);
299 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
309 $ilTabs =
$DIC[
'ilTabs'];
312 $ilTabs->activateTab(
"id_info");
315 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
319 $info->enablePrivateNotes();
320 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
322 $this->ctrl->forwardCommand(
$info);
329 $ilLocator =
$DIC[
'ilLocator'];
331 if (is_object($this->
object)) {
332 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"", $this->node_id);
340 public static function _goto($a_target)
342 $id = explode(
"_", $a_target);
344 $_GET[
"baseClass"] =
"ilRepositoryGUI";
348 $_GET[
"cmd"] =
"listRecords";
349 require_once(
'./ilias.php');
361 $forms = parent::initCreationForms($a_new_type);
372 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
373 $this->ctrl->redirectByClass(
"ilDclTableListGUI",
"listTables");
386 $ilAccess =
$DIC[
'ilAccess'];
387 $ilTabs =
$DIC[
'ilTabs'];
389 $ilHelp =
$DIC[
'ilHelp'];
391 $ilHelp->setScreenIdComponent(
"dcl");
394 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
395 $ilTabs->addTab(
"id_records",
$lng->txt(
"content"), $this->ctrl->getLinkTargetByClass(
"ildclrecordlistgui",
"show"));
399 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()) || $ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
400 $ilTabs->addTab(
"id_info",
$lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
404 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
405 $ilTabs->addTab(
"id_settings",
$lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
"editObject"));
409 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
410 $ilTabs->addTab(
"id_tables",
$lng->txt(
"dcl_tables"), $this->ctrl->getLinkTargetByClass(
"ildcltablelistgui",
"listTables"));
414 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
415 $ilTabs->addTab(
"export",
$lng->txt(
"export"), $this->ctrl->getLinkTargetByClass(
"ildclexportgui",
""));
419 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
420 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
431 $ilTabs =
$DIC[
'ilTabs'];
433 $ilTabs->activateTab(
"id_settings");
437 $cb->setInfo($this->lng->txt(
"dcl_online_info"));
441 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"dcl_activate_notification"),
"notification");
442 $cb->setInfo($this->lng->txt(
"dcl_notification_info"));
446 $order_options = array();
460 $ilCtrl->setParameterByClass(
"ildclrecordlistgui",
"tableview_id",
$_GET[
"tableview_id"]);
461 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
483 $a_values[
"is_online"] = $this->
object->getOnline();
484 $a_values[
"rating"] = $this->
object->getRating();
485 $a_values[
"public_notes"] = $this->
object->getPublicNotes();
486 $a_values[
"approval"] = $this->
object->getApproval();
487 $a_values[
"notification"] = $this->
object->getNotification();
498 $this->
object->setOnline($a_form->
getInput(
"is_online"));
499 $this->
object->setRating($a_form->
getInput(
"rating"));
500 $this->
object->setPublicNotes($a_form->
getInput(
"public_notes"));
501 $this->
object->setApproval($a_form->
getInput(
"approval"));
502 $this->
object->setNotification($a_form->
getInput(
"notification"));
513 $tables = $this->
object->getTables();
514 if (count($tables) == 1 and count($this->table->getRecordFields()) == 0 and count($this->table->getRecords()) == 0
515 and $this->object->getOnline()
528 switch (
$_GET[
"ntf"]) {
536 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
549 $ilAccess =
$DIC[
'ilAccess'];
556 ilObjectListGUI::prepareJSLinks(
557 $this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
560 "ilcommonactiondispatchergui",
568 $ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
571 $lg = $dispatcher->initHeaderAction();
576 if (
$ilUser->getId() != ANONYMOUS_USER_ID and $this->object->getNotification() == 1) {
579 $ilCtrl->setParameter($this,
"ntf", 1);
580 $lg->addCustomCommand(
$ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_deactivate_dcl");
585 $ilCtrl->setParameter($this,
"ntf", 2);
586 $lg->addCustomCommand(
$ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_activate_dcl");
590 $ilCtrl->setParameter($this,
"ntf",
"");
594 $tpl->setHeaderActionMenu(
$lg->getHeaderAction());
596 return $lg->getHeaderAction();
599 $tpl->setHeaderActionMenu(
$lg->getHeaderAction());
An exception for terminatinating execution or to throw for unit testing.
Class ilCommonActionDispatcherGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static getTableCache($table_id=0)
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
Export User Interface Class.
Class ilDclRecordEditGUI.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
const TYPE_DATA_COLLECTION
Class ilObjDataCollectionGUI.
render()
show Content; redirect to ilDclRecordListGUI::listRecords
infoScreenForward()
show information screen
getEditFormCustomValues(array &$a_values)
addLocatorItems()
Functions to be overwritten.
setTabs()
setTabs create tabs (repository/workspace switch)
afterSave(ilObject $a_new_object)
initEditCustomForm(ilPropertyFormGUI $a_form)
initCreationForms($a_new_type)
addHeaderAction($a_redraw=false)
updateCustom(ilPropertyFormGUI $a_form)
getDataCollectionObject()
listRecords()
called by goto
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
Class ilObjDataCollection.
New implementation of ilObjectGUI.
prepareOutput($a_show_subobjects=true)
prepare output
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static initJavascript()
Init javascript.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
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)
static initConnection(ilTemplate $a_main_tpl=null)
Init YUI Connection module.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(empty($password)) $table
if(isset($_POST['submit'])) $form