5 require_once
"./Services/Object/classes/class.ilObject2GUI.php";
6 require_once
"./Modules/Bibliographic/classes/class.ilBibliographicDetailsGUI.php";
37 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
45 $lng->loadLanguageModule(
"bibl");
81 if($this->
object != NULL)
83 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"bibl");
86 $next_class = $ilCtrl->getNextClass($this);
87 $this->cmd = $ilCtrl->getCmd();
92 case "ilinfoscreengui":
94 $ilTabs->activateTab(
"id_info");
98 case "ilcommonactiondispatchergui":
99 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
101 $this->ctrl->forwardCommand($gui);
104 case "ilpermissiongui":
106 $ilTabs->activateTab(
"id_permissions");
107 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
109 $this->ctrl->forwardCommand($perm_gui);
112 case "ilobjectcopygui":
113 include_once
"./Services/Object/classes/class.ilObjectCopyGUI.php";
115 $cp->setType(
'bibl');
117 $tpl->getStandardTemplate();
118 $this->ctrl->forwardCommand($cp);
124 $ilTabs->setTabActive(
"id_records");
125 include_once(
"./Modules/File/classes/class.ilObjFile.php");
127 $this->ctrl->forwardCommand($file_gui);
146 $this->ctrl->setCmd(
"showSummary");
147 $this->ctrl->setCmdClass(
"ilinfoscreengui");
162 $this->ctrl->redirectByClass(
'ilPersonalDesktopGUI',
'');
165 $ilTabs->activateTab(
"id_info");
167 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
169 $info->enablePrivateNotes();
170 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
172 $this->ctrl->forwardCommand($info);
182 if (is_object($this->
object))
184 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
194 public static function _goto($a_target)
198 $id = explode(
"_", $a_target);
200 $ilCtrl->setTargetScript(
"ilias.php");
201 $ilCtrl->initBaseClass(
"ilRepositoryGUI");
202 $ilCtrl->setParameterByClass(
"ilobjbibliographicgui",
"ref_id", $id[0]);
207 $ilCtrl->setParameterByClass(
"ilobjbibliographicgui",
"entryId", $id[1]);
208 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjbibliographicgui" ),
"showDetails");
212 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjbibliographicgui" ),
"view");
228 unset($forms[self::CFORM_IMPORT]);
232 $in_file =
new ilFileInputGUI($lng->txt(
"bibliography file"),
"bibliographic_file");
234 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
236 $in_file->setRequired(
true);
238 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
239 $forms[
self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
254 if ($form[self::CFORM_NEW]->checkInput()){
259 $form->setValuesByPost();
260 $tpl->setContent($form->getHtml());
270 $a_new_object->doUpdate();
272 $this->ctrl->redirect($this,
"edit");
285 global $ilAccess, $ilTabs,
$lng;
288 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()))
290 $ilTabs->addTab(
"content",
291 $lng->txt(
"content"),
292 $this->ctrl->getLinkTarget($this,
"showContent"));
296 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
298 $ilTabs->addTab(
"id_info",
299 $lng->txt(
"info_short"),
300 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
304 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId()))
306 $ilTabs->addTab(
"settings",
307 $lng->txt(
"settings"),
308 $this->ctrl->getLinkTarget($this,
"editObject"));
312 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
314 $ilTabs->addTab(
"id_permissions",
315 $lng->txt(
"perm_settings"),
316 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
329 $in_file =
new ilFileInputGUI($lng->txt(
"bibliography file"),
"bibliographic_file");
331 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
333 $in_file->setRequired(
false);
335 $cb_override =
new ilCheckboxInputGUI($this->lng->txt(
"Override Entries"),
"override_entries");
337 $form->addItem($cb_override);
339 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
352 $ilTabs->activateTab(
"settings");
366 $a_values[
"is_online"] = $this->
object->getOnline();
392 if(($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()) && $this->object->getOnline()) || $ilAccess->checkAccess(
'write',
"", $this->object->getRefId())){
393 $ilTabs->setTabActive(
"content");
395 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
397 $ilToolbar->addButton($lng->txt(
"Download Original File"), $ilCtrl->getLinkTargetByClass(
"ilBibliographicDetailsGUI",
"sendFile"));
399 include_once
"./Modules/Bibliographic/classes/class.ilBibliographicRecordListTableGUI.php";
401 $html = $table->getHTML();
402 $tpl->setContent($html);
405 $tpl->setPermanentLink(
"bibl", $this->object->getRefId());
408 ilUtil::sendFailure(sprintf($this->lng->txt(
"msg_no_perm_read_item"), $object_title),
true);
420 if($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())){
422 $file_path = $this->bibl_obj->getFileAbsolutePath();
425 if(is_file($file_path)){
426 $path_array = explode(DIRECTORY_SEPARATOR, $file_path);
427 $filename = $path_array[
sizeof($path_array)-1];
442 if($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())){
444 $bibGUI->showDetails($this->bibl_obj,
$_GET[
'entryId']);
462 if($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())){
463 if($this->object->getOnline() != $a_form->
getInput(
"is_online")){
464 $this->
object->setOnline($a_form->
getInput(
"is_online"));
479 include_once
"./Services/Notification/classes/class.ilNotification.php";
489 $ilCtrl->redirect($this,
"");
499 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
501 $ilAccess,
"dcl", $this->ref_id,$this->obj_id);
503 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
504 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
505 $ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
506 $ilCtrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
508 $lg = $dispatcher->initHeaderAction();
512 if ($ilUser->getId() != ANONYMOUS_USER_ID && $this->
object->getNotification() == 1)
514 include_once
"./Services/Notification/classes/class.ilNotification.php";
518 $ilCtrl->setParameter($this,
"ntf", 1);
519 $lg->addCustomCommand($ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_deactivate_dcl");
521 $lg->addHeaderIcon(
"not_icon",
523 $lng->txt(
"dcl_notification_activated"));
528 $ilCtrl->setParameter($this,
"ntf", 2);
529 $lg->addCustomCommand($ilCtrl->getLinkTarget($this,
"toggleNotification"),
"dcl_notification_activate_dcl");
531 $lg->addHeaderIcon(
"not_icon",
533 $lng->txt(
"dcl_notification_deactivated"));
535 $ilCtrl->setParameter($this,
"ntf",
"");
540 $tpl->setHeaderActionMenu($lg->getHeaderAction());
544 return $lg->getHeaderAction();
547 $tpl->setHeaderActionMenu($lg->getHeaderAction());