43 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
47 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
49 $DIC->language()->loadLanguageModule(
"dcl");
51 if (isset(
$_GET[
'table_id'])) {
52 $this->table_id =
$_GET[
'table_id'];
53 } elseif (isset(
$_GET[
'tableview_id'])) {
54 $this->table_id = ilDclTableView::find(
$_GET[
'tableview_id'])->getTableId();
55 } elseif ($a_id > 0) {
56 $this->table_id = $this->
object->getFirstVisibleTableId();
61 if (!$DIC->ctrl()->isAsynch()) {
64 $DIC->ui()->mainTemplate()->addJavaScript(
'Modules/DataCollection/js/ilDataCollection.js');
65 $DIC->ui()->mainTemplate()->addJavaScript(
"Modules/DataCollection/js/datacollection.js");
66 $this->tpl->addOnLoadCode(
"ilDataCollection.setEditUrl('" .
$DIC->ctrl()->getLinkTargetByClass(array(
68 'ilobjdatacollectiongui',
70 ),
'edit',
'',
true) .
"');");
71 $this->tpl->addOnLoadCode(
"ilDataCollection.setCreateUrl('" .
$DIC->ctrl()->getLinkTargetByClass(array(
73 'ilobjdatacollectiongui',
75 ),
'create',
'',
true) .
"');");
76 $this->tpl->addOnLoadCode(
"ilDataCollection.setSaveUrl('" .
$DIC->ctrl()->getLinkTargetByClass(array(
78 'ilobjdatacollectiongui',
80 ),
'save',
'',
true) .
"');");
81 $this->tpl->addOnLoadCode(
"ilDataCollection.setDataUrl('" .
$DIC->ctrl()->getLinkTargetByClass(array(
83 'ilobjdatacollectiongui',
85 ),
'getRecordData',
'',
true) .
"');");
87 $DIC->ctrl()->saveParameter($this,
"table_id");
117 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
118 $ilHelp =
$DIC[
'ilHelp'];
119 $ilHelp->setScreenIdComponent(
'bibl');
122 $link =
$DIC->ctrl()->getLinkTarget($this,
"render");
124 if ($this->
object !=
null) {
125 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"dcl");
129 if (
$_GET[self::GET_DCL_GTR]) {
130 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class,
'tableview_id',
$_GET[self::GET_VIEW_ID]);
131 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class,
'record_id',
$_GET[self::GET_DCL_GTR]);
132 $DIC->ctrl()->redirectByClass(ilDclDetailedViewGUI::class,
'renderRecord');
136 $next_class =
$DIC->ctrl()->getNextClass($this);
139 $DIC->ui()->mainTemplate()->getStandardTemplate();
140 $DIC->ui()->mainTemplate()->setContent(
"Permission Denied.");
145 switch ($next_class) {
146 case "ilinfoscreengui":
148 $DIC->tabs()->activateTab(
"id_info");
152 case "ilcommonactiondispatchergui":
154 $gui->enableCommentsSettings(
false);
155 $this->ctrl->forwardCommand($gui);
158 case "ilpermissiongui":
160 $DIC->tabs()->activateTab(
"id_permissions");
162 $this->ctrl->forwardCommand($perm_gui);
165 case "ilobjectcopygui":
168 $DIC->ui()->mainTemplate()->getStandardTemplate();
169 $this->ctrl->forwardCommand($cp);
172 case "ildcltablelistgui":
174 $DIC->tabs()->setTabActive(
"id_tables");
176 $this->ctrl->forwardCommand($tablelist_gui);
179 case "ildclrecordlistgui":
182 $DIC->tabs()->activateTab(
"id_records");
183 $this->ctrl->setParameterByClass(ilDclRecordListGUI::class,
'tableview_id', $_REQUEST[
'tableview_id']);
185 $this->ctrl->forwardCommand($recordlist_gui);
188 case "ildclrecordeditgui":
190 $DIC->tabs()->activateTab(
"id_records");
192 $this->ctrl->forwardCommand($recordedit_gui);
197 $DIC->tabs()->setTabActive(
"id_records");
199 $this->ctrl->forwardCommand($file_gui);
204 $rgui->setObject(
$_GET[
'record_id'],
"dcl_record",
$_GET[
"field_id"],
"dcl_field");
205 $rgui->executeCommand();
206 $DIC->ctrl()->redirectByClass(
"ilDclRecordListGUI",
"listRecords");
209 case "ildcldetailedviewgui":
212 $this->ctrl->forwardCommand($recordview_gui);
213 $DIC->tabs()->clearTargets();
220 $this->ctrl->forwardCommand($recordviewGui);
221 $DIC->tabs()->clearTargets();
222 $DIC->tabs()->setBackTarget($this->lng->txt(
"back"),
$DIC->ctrl()->getLinkTarget($this,
""));
224 case "ildclexportgui":
226 $DIC->tabs()->setTabActive(
"export");
229 $exp_gui->addFormat(
"xlsx", $this->lng->txt(
'dlc_xls_async_export'), $exporter,
'exportAsync');
230 $exp_gui->addFormat(
"xml");
232 $this->ctrl->forwardCommand($exp_gui);
235 case strtolower(ilDclPropertyFormGUI::class):
237 $recordedit_gui->getRecord();
238 $recordedit_gui->initForm();
239 $form = $recordedit_gui->getForm();
240 $this->ctrl->forwardCommand(
$form);
244 return parent::executeCommand();
258 $this->ctrl->setCmd(
"showSummary");
259 $this->ctrl->setCmdClass(
"ilinfoscreengui");
271 $this->ctrl->setParameterByClass(
'ilDclRecordListGUI',
'tableview_id',
$_GET[
'tableview_id']);
272 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
282 $ilTabs =
$DIC[
'ilTabs'];
285 $ilTabs->activateTab(
"id_info");
288 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
292 $info->enablePrivateNotes();
293 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
295 $this->ctrl->forwardCommand(
$info);
302 $ilLocator =
$DIC[
'ilLocator'];
304 if (is_object($this->
object)) {
305 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"", $this->node_id);
313 public static function _goto($a_target)
315 $id = explode(
"_", $a_target);
317 $_GET[
"baseClass"] =
"ilRepositoryGUI";
321 $_GET[
"cmd"] =
"listRecords";
322 require_once(
'./ilias.php');
334 $forms = parent::initCreationForms($a_new_type);
346 $this->ctrl->redirectByClass(
"ilDclTableListGUI",
"listTables");
359 $ilAccess =
$DIC[
'ilAccess'];
360 $ilTabs =
$DIC[
'ilTabs'];
362 $ilHelp =
$DIC[
'ilHelp'];
364 $ilHelp->setScreenIdComponent(
"dcl");
367 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
368 $ilTabs->addTab(
"id_records",
$lng->txt(
"content"), $this->ctrl->getLinkTargetByClass(
"ildclrecordlistgui",
"show"));
372 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()) || $ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
373 $ilTabs->addTab(
"id_info",
$lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
377 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
378 $ilTabs->addTab(
"id_settings",
$lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
"editObject"));
382 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
383 $ilTabs->addTab(
"id_tables",
$lng->txt(
"dcl_tables"), $this->ctrl->getLinkTargetByClass(
"ildcltablelistgui",
"listTables"));
387 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
388 $ilTabs->addTab(
"export",
$lng->txt(
"export"), $this->ctrl->getLinkTargetByClass(
"ildclexportgui",
""));
392 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
393 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
403 $ilTabs =
$DIC[
'ilTabs'];
405 $ilTabs->activateTab(
"id_settings");
409 $cb->setInfo($this->lng->txt(
"dcl_online_info"));
413 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"dcl_activate_notification"),
"notification");
414 $cb->setInfo($this->lng->txt(
"dcl_notification_info"));
418 $order_options = array();
432 $ilCtrl->setParameterByClass(
"ildclrecordlistgui",
"tableview_id",
$_GET[
"tableview_id"]);
433 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
455 $a_values[
"is_online"] = $this->
object->getOnline();
456 $a_values[
"rating"] = $this->
object->getRating();
457 $a_values[
"public_notes"] = $this->
object->getPublicNotes();
458 $a_values[
"approval"] = $this->
object->getApproval();
459 $a_values[
"notification"] = $this->
object->getNotification();
470 $this->
object->setOnline($a_form->
getInput(
"is_online"));
471 $this->
object->setRating($a_form->
getInput(
"rating"));
472 $this->
object->setPublicNotes($a_form->
getInput(
"public_notes"));
473 $this->
object->setApproval($a_form->
getInput(
"approval"));
474 $this->
object->setNotification($a_form->
getInput(
"notification"));
485 $tables = $this->
object->getTables();
486 if (count($tables) == 1 and count($this->table->getRecordFields()) == 0 and count($this->table->getRecords()) == 0
487 and $this->object->getOnline()
501 switch (
$_GET[
"ntf"]) {
509 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
522 $ilAccess =
$DIC[
'ilAccess'];
529 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
$ilCtrl->getLinkTargetByClass(array(
530 "ilcommonactiondispatchergui",
532 ),
"",
"",
true,
false),
$ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui" ),
"",
"",
true,
false));
534 $lg = $dispatcher->initHeaderAction();
539 if (
$ilUser->getId() != ANONYMOUS_USER_ID and $this->object->getNotification() == 1) {
542 $ilCtrl->setParameter($this,
"ntf", 1);
543 $lg->addCustomCommand(
$ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_deactivate_dcl");
548 $ilCtrl->setParameter($this,
"ntf", 2);
549 $lg->addCustomCommand(
$ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_activate_dcl");
553 $ilCtrl->setParameter($this,
"ntf",
"");
557 $tpl->setHeaderActionMenu(
$lg->getHeaderAction());
559 return $lg->getHeaderAction();
562 $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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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