5 require_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
6 require_once(
'./Services/Object/classes/class.ilObject2GUI.php');
7 require_once(
'./Services/Export/classes/class.ilExportGUI.php');
8 require_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
9 require_once(
'./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php');
10 require_once(
'./Modules/DataCollection/classes/class.ilDclExportGUI.php');
45 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0) {
51 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
53 $lng->loadLanguageModule(
"dcl");
55 if (isset(
$_GET[
'table_id'])) {
56 $this->table_id =
$_GET[
'table_id'];
57 } elseif (isset(
$_GET[
'tableview_id'])) {
58 $this->table_id = ilDclTableView::find(
$_GET[
'tableview_id'])->getTableId();
59 } elseif ($a_id > 0) {
60 $this->table_id = $this->
object->getFirstVisibleTableId();
68 $tpl->addJavaScript(
'Modules/DataCollection/js/ilDataCollection.js');
69 $tpl->addJavaScript(
"Modules/DataCollection/js/datacollection.js");
70 $this->tpl->addOnLoadCode(
"ilDataCollection.setEditUrl('" .
$ilCtrl->getLinkTargetByClass(
array(
72 'ilobjdatacollectiongui',
74 ),
'edit',
'',
true) .
"');");
75 $this->tpl->addOnLoadCode(
"ilDataCollection.setCreateUrl('" .
$ilCtrl->getLinkTargetByClass(
array(
77 'ilobjdatacollectiongui',
79 ),
'create',
'',
true) .
"');");
80 $this->tpl->addOnLoadCode(
"ilDataCollection.setSaveUrl('" .
$ilCtrl->getLinkTargetByClass(
array(
82 'ilobjdatacollectiongui',
84 ),
'save',
'',
true) .
"');");
85 $this->tpl->addOnLoadCode(
"ilDataCollection.setDataUrl('" .
$ilCtrl->getLinkTargetByClass(
array(
87 'ilobjdatacollectiongui',
89 ),
'getRecordData',
'',
true) .
"');");
91 $ilCtrl->saveParameter($this,
"table_id");
118 $ilTabs = $DIC[
'ilTabs'];
119 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
125 $link =
$ilCtrl->getLinkTarget($this,
"render");
127 if ($this->
object != NULL) {
128 $ilNavigationHistory->addItem($this->
object->getRefId(), $link,
"dcl");
132 if (
$_GET[self::GET_DCL_GTR]) {
133 $ilCtrl->setParameterByClass(
'ilDclDetailedViewGUI',
'tableview_id',
$_GET[self::GET_VIEW_ID]);
134 $ilCtrl->setParameterByClass(
'ilDclDetailedViewGUI',
'record_id',
$_GET[self::GET_DCL_GTR]);
135 $ilCtrl->redirectByClass(
'ilDclDetailedViewGUI',
'renderRecord');
139 $next_class =
$ilCtrl->getNextClass($this);
142 $tpl->getStandardTemplate();
143 $tpl->setContent(
"Permission Denied.");
148 switch ($next_class) {
149 case "ilinfoscreengui":
151 $ilTabs->activateTab(
"id_info");
155 case "ilcommonactiondispatchergui":
156 require_once(
'./Services/Object/classes/class.ilCommonActionDispatcherGUI.php');
158 $gui->enableCommentsSettings(
false);
159 $this->ctrl->forwardCommand($gui);
162 case "ilpermissiongui":
164 $ilTabs->activateTab(
"id_permissions");
165 require_once(
'./Services/AccessControl/classes/class.ilPermissionGUI.php');
167 $this->ctrl->forwardCommand($perm_gui);
170 case "ilobjectcopygui":
171 require_once(
'./Services/Object/classes/class.ilObjectCopyGUI.php');
174 $tpl->getStandardTemplate();
175 $this->ctrl->forwardCommand($cp);
178 case "ildcltablelistgui":
180 $ilTabs->setTabActive(
"id_tables");
181 require_once(
'./Modules/DataCollection/classes/Table/class.ilDclTableListGUI.php');
183 $this->ctrl->forwardCommand($tablelist_gui);
186 case "ildclrecordlistgui":
189 $ilTabs->activateTab(
"id_records");
190 $this->ctrl->setParameterByClass(
'ilDclRecordListGUI',
'tableview_id', $_REQUEST[
'tableview_id']);
191 require_once(
'./Modules/DataCollection/classes/Content/class.ilDclRecordListGUI.php');
193 $this->ctrl->forwardCommand($recordlist_gui);
196 case "ildclrecordeditgui":
198 $ilTabs->activateTab(
"id_records");
199 require_once(
'./Modules/DataCollection/classes/Content/class.ilDclRecordEditGUI.php');
201 $this->ctrl->forwardCommand($recordedit_gui);
204 case "ildclrecordlistviewdefinitiongui":
206 $this->addListFieldsTabs(
"list_viewdefinition");
207 $ilTabs->setTabActive(
"id_fields");
208 require_once(
'./Modules/DataCollection/classes/Content/class.ilDclRecordListViewdefinitionGUI.php');
209 $recordlist_gui =
new ilDclRecordListViewdefinitionGUI($this, $this->table_id);
210 $this->ctrl->forwardCommand($recordlist_gui);
215 $ilTabs->setTabActive(
"id_records");
216 require_once(
'./Modules/File/classes/class.ilObjFile.php');
218 $this->ctrl->forwardCommand($file_gui);
223 $rgui->setObject(
$_GET[
'record_id'],
"dcl_record",
$_GET[
"field_id"],
"dcl_field");
224 $rgui->executeCommand();
225 $ilCtrl->redirectByClass(
"ilDclRecordListGUI",
"listRecords");
228 case "ildcldetailedviewgui":
230 require_once(
'./Modules/DataCollection/classes/DetailedView/class.ilDclDetailedViewGUI.php');
232 $this->ctrl->forwardCommand($recordview_gui);
233 $ilTabs->clearTargets();
239 require_once(
'./Modules/DataCollection/classes/DetailedView/class.ilDclDetailedViewGUI.php');
241 $this->ctrl->forwardCommand($recordviewGui);
242 $ilTabs->clearTargets();
243 $ilTabs->setBackTarget($this->lng->txt(
"back"),
$ilCtrl->getLinkTargetByClass(
"ilObjDataCollectionGUI",
""));
245 case "ildclexportgui":
247 $ilTabs->setTabActive(
"export");
250 $exp_gui->addFormat(
"xml");
252 require_once
'Modules/DataCollection/classes/Content/class.ilDclContentExporter.php';
254 $exp_gui->addFormat(
"xlsx", $this->lng->txt(
'dlc_xls_async_export'), $exporter,
'exportAsync');
256 $this->ctrl->forwardCommand($exp_gui);
259 case strtolower(ilDclPropertyFormGUI::class):
260 require_once
'./Modules/DataCollection/classes/Content/class.ilDclRecordEditGUI.php';
262 $recordedit_gui->getRecord();
263 $recordedit_gui->initForm();
264 $form = $recordedit_gui->getForm();
265 $this->ctrl->forwardCommand($form);
269 return parent::executeCommand();
282 $this->ctrl->setCmd(
"showSummary");
283 $this->ctrl->setCmdClass(
"ilinfoscreengui");
294 $this->ctrl->setParameterByClass(
'ilDclRecordListGUI',
'tableview_id',
$_GET[
'tableview_id']);
295 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
304 $ilTabs = $DIC[
'ilTabs'];
307 $ilTabs->activateTab(
"id_info");
310 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
313 require_once(
'./Services/InfoScreen/classes/class.ilInfoScreenGUI.php');
315 $info->enablePrivateNotes();
316 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
318 $this->ctrl->forwardCommand(
$info);
324 $ilLocator = $DIC[
'ilLocator'];
326 if (is_object($this->
object)) {
327 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
335 public static function _goto($a_target) {
336 $id = explode(
"_", $a_target);
338 $_GET[
"baseClass"] =
"ilRepositoryGUI";
339 $_GET[self::GET_REF_ID] = $id[0];
340 $_GET[self::GET_VIEW_ID] = $id[1];
341 $_GET[self::GET_DCL_GTR] = $id[2];
342 $_GET[
"cmd"] =
"listRecords";
343 require_once(
'./ilias.php');
354 $forms = parent::initCreationForms($a_new_type);
365 $this->ctrl->redirectByClass(
"ilDclTableListGUI",
"listTables");
377 $ilAccess = $DIC[
'ilAccess'];
378 $ilTabs = $DIC[
'ilTabs'];
380 $ilHelp = $DIC[
'ilHelp'];
382 $ilHelp->setScreenIdComponent(
"dcl");
385 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
386 $ilTabs->addTab(
"id_records",
$lng->txt(
"content"), $this->ctrl->getLinkTargetByClass(
"ildclrecordlistgui",
"show"));
390 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()) || $ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
391 $ilTabs->addTab(
"id_info",
$lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
395 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
396 $ilTabs->addTab(
"id_settings",
$lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
"editObject"));
400 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
401 $ilTabs->addTab(
"id_tables",
$lng->txt(
"dcl_tables"), $this->ctrl->getLinkTargetByClass(
"ildcltablelistgui",
"listTables"));
405 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
406 $ilTabs->addTab(
"export",
$lng->txt(
"export"), $this->ctrl->getLinkTargetByClass(
"ildclexportgui",
""));
410 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
411 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
420 $ilTabs = $DIC[
'ilTabs'];
422 $ilTabs->activateTab(
"id_settings");
426 $cb->
setInfo($this->lng->txt(
"dcl_online_info"));
430 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"dcl_activate_notification"),
"notification");
431 $cb->
setInfo($this->lng->txt(
"dcl_notification_info"));
435 $order_options =
array();
437 $order_options[$table->getId()] = $table->getTitle();
448 $ilCtrl->setParameterByClass(
"ildclrecordlistgui",
"tableview_id",
$_GET[
"tableview_id"]);
449 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
469 $a_values[
"is_online"] = $this->
object->getOnline();
470 $a_values[
"rating"] = $this->
object->getRating();
471 $a_values[
"public_notes"] = $this->
object->getPublicNotes();
472 $a_values[
"approval"] = $this->
object->getApproval();
473 $a_values[
"notification"] = $this->
object->getNotification();
483 $this->
object->setOnline($a_form->
getInput(
"is_online"));
484 $this->
object->setRating($a_form->
getInput(
"rating"));
485 $this->
object->setPublicNotes($a_form->
getInput(
"public_notes"));
486 $this->
object->setApproval($a_form->
getInput(
"approval"));
487 $this->
object->setNotification($a_form->
getInput(
"notification"));
497 $tables = $this->
object->getTables();
498 if (count($tables) == 1 AND count($this->table->getRecordFields()) == 0 AND count($this->table->getRecords()) == 0
499 AND $this->
object->getOnline()
512 require_once(
'./Services/Notification/classes/class.ilNotification.php');
513 switch (
$_GET[
"ntf"]) {
521 $ilCtrl->redirectByClass(
"ildclrecordlistgui",
"show");
533 $ilAccess = $DIC[
'ilAccess'];
538 require_once(
'./Services/Object/classes/class.ilCommonActionDispatcherGUI.php');
541 require_once(
'./Services/Object/classes/class.ilObjectListGUI.php');
542 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
$ilCtrl->getLinkTargetByClass(
array(
543 "ilcommonactiondispatchergui",
545 ),
"",
"",
true,
false),
$ilCtrl->getLinkTargetByClass(
array(
"ilcommonactiondispatchergui",
"iltagginggui" ),
"",
"",
true,
false));
547 $lg = $dispatcher->initHeaderAction();
552 if (
$ilUser->getId() != ANONYMOUS_USER_ID AND $this->
object->getNotification() == 1) {
553 require_once(
'./Services/Notification/classes/class.ilNotification.php');
556 $ilCtrl->setParameter($this,
"ntf", 1);
557 $lg->addCustomCommand(
$ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_deactivate_dcl");
559 $lg->addHeaderIcon(
"not_icon",
ilUtil::getImagePath(
"notification_on.svg"),
$lng->txt(
"dcl_notification_activated"));
562 $ilCtrl->setParameter($this,
"ntf", 2);
563 $lg->addCustomCommand(
$ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_activate_dcl");
565 $lg->addHeaderIcon(
"not_icon",
ilUtil::getImagePath(
"notification_off.svg"),
$lng->txt(
"dcl_notification_deactivated"));
567 $ilCtrl->setParameter($this,
"ntf",
"");
571 $tpl->setHeaderActionMenu($lg->getHeaderAction());
573 return $lg->getHeaderAction();
576 $tpl->setHeaderActionMenu($lg->getHeaderAction());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
executeCommand()
execute command
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.
Class ilDclRecordEditGUI.
Class ilObject Basic functions for all objects.
static initConnection()
Init YUI Connection module.
static getTableCache($table_id=0)
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)
listRecords()
called by goto
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
Export User Interface Class.
render()
show Content; redirect to ilDclRecordListGUI::listRecords
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
updateCustom(ilPropertyFormGUI $a_form)
initEditCustomForm(ilPropertyFormGUI $a_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.