5 require_once
"./Services/Object/classes/class.ilObject2GUI.php";
6 require_once
"./Modules/Bibliographic/classes/class.ilBibliographicDetailsGUI.php";
7 require_once(
"./Services/Export/classes/class.ilExportGUI.php");
8 require_once(
'./Services/News/classes/class.ilNewsItem.php');
9 require_once(
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php');
41 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0) {
46 $lng->loadLanguageModule(
'bibl');
80 if ($this->
object != NULL) {
81 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"bibl");
84 $next_class = $ilCtrl->getNextClass($this);
85 $this->cmd = $ilCtrl->getCmd();
86 switch ($next_class) {
87 case "ilinfoscreengui":
89 $ilTabs->activateTab(
"id_info");
92 case "ilcommonactiondispatchergui":
93 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
95 $this->ctrl->forwardCommand($gui);
97 case "ilpermissiongui":
99 $ilTabs->activateTab(
"id_permissions");
100 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
102 $this->ctrl->forwardCommand($perm_gui);
104 case "ilobjectcopygui":
105 include_once
"./Services/Object/classes/class.ilObjectCopyGUI.php";
107 $cp->setType(
'bibl');
108 $tpl->getStandardTemplate();
109 $this->ctrl->forwardCommand($cp);
113 $ilTabs->setTabActive(
"id_records");
114 include_once(
"./Modules/File/classes/class.ilObjFile.php");
116 $this->ctrl->forwardCommand($file_gui);
120 $ilTabs->setTabActive(
"export");
122 $exp_gui->addFormat(
"xml");
123 $this->ctrl->forwardCommand($exp_gui);
139 $this->ctrl->setCmd(
"showSummary");
140 $this->ctrl->setCmdClass(
"ilinfoscreengui");
152 $this->ctrl->redirectByClass(
'ilPersonalDesktopGUI',
'');
154 $ilTabs->activateTab(
"id_info");
155 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
157 $info->enablePrivateNotes();
158 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
159 $this->ctrl->forwardCommand($info);
168 if (is_object($this->
object)) {
169 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
180 public static function _goto($a_target) {
182 $id = explode(
"_", $a_target);
183 $ilCtrl->setTargetScript(
"ilias.php");
184 $ilCtrl->initBaseClass(
"ilRepositoryGUI");
185 $ilCtrl->setParameterByClass(
"ilobjbibliographicgui",
"ref_id", $id[0]);
189 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjbibliographicgui" ),
"showDetails");
191 $ilCtrl->redirectByClass(array(
"ilRepositoryGUI",
"ilobjbibliographicgui" ),
"view");
205 $in_file =
new ilFileInputGUI($lng->txt(
"bibliography file"),
"bibliographic_file");
206 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex" ));
207 $in_file->setRequired(
true);
209 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
210 $forms[
self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
219 if ($form[self::CFORM_NEW]->checkInput()) {
223 $form->setValuesByPost();
224 $tpl->setContent($form->getHtml());
235 $this->ctrl->redirect($this,
"edit");
246 global $ilAccess, $ilTabs,
$lng, $ilHelp;
253 $ilHelp->setScreenIdComponent(
'bibl');
255 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
256 $ilTabs->addTab(
"content", $lng->txt(
"content"), $this->ctrl->getLinkTarget($this,
"showContent"));
259 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
260 $ilTabs->addTab(
"id_info", $lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
263 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
264 $ilTabs->addTab(
"settings", $lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
"editObject"));
267 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
268 $ilTabs->addTab(
"export", $lng->txt(
"export"), $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
271 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
272 $ilTabs->addTab(
"id_permissions", $lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
281 $in_file =
new ilFileInputGUI($lng->txt(
"bibliography file"),
"bibliographic_file");
282 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex" ));
283 $in_file->setRequired(
false);
284 $cb_override =
new ilCheckboxInputGUI($this->lng->txt(
"override_entries"),
"override_entries");
286 $form->addItem($cb_override);
287 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
298 $ilTabs->activateTab(
"settings");
311 $a_values[
"is_online"] = $this->
object->getOnline();
330 if (($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()) && $this->object->getOnline())
331 || $ilAccess->checkAccess(
'write',
"", $this->object->getRefId())
333 $ilTabs->setTabActive(
"content");
334 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
336 $ilToolbar->addButton($lng->txt(
"download_original_file"), $ilCtrl->getLinkTargetByClass(
"ilBibliographicDetailsGUI",
"sendFile"));
337 include_once
"./Modules/Bibliographic/classes/class.ilBibliographicRecordListTableGUI.php";
339 $html = $table->getHTML();
340 $tpl->setContent($html);
342 $tpl->setPermanentLink(
"bibl", $this->object->getRefId());
345 ilUtil::sendFailure(sprintf($this->lng->txt(
"msg_no_perm_read_item"), $object_title),
true);
358 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
359 $file_path = $this->bibl_obj->getFileAbsolutePath();
361 if (is_file($file_path)) {
362 $path_array = explode(DIRECTORY_SEPARATOR, $file_path);
363 $filename = $path_array[
sizeof($path_array) - 1];
379 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
381 $this->tpl->setContent($bibGUI->getHTML());
399 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
400 if ($this->object->getOnline() != $a_form->
getInput(
"is_online")) {
401 $this->
object->setOnline($a_form->
getInput(
"is_online"));
404 if (! empty($_FILES[
'bibliographic_file'][
'name'])) {
405 $this->
addNews($this->bibl_obj->getId(),
'updated');
416 include_once
"./Services/Notification/classes/class.ilNotification.php";
417 switch (
$_GET[
"ntf"]) {
425 $ilCtrl->redirect($this,
"");
435 $ilNewsItem->setTitle($lng->txt(
'news_title_' . $change));
438 $ilNewsItem->setUserId($ilUser->getId());
440 $ilNewsItem->setContentTextIsLangVar(
false);
441 $ilNewsItem->create();
449 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
452 $this->ctrl->redirect($this,
'view');
460 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
463 $this->ctrl->redirect($this,
'view');