23 use \ILIAS\Modules\OrgUnit\ARHelper\DIC;
67 protected $cmd = self::CMD_SHOW_CONTENT;
75 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
80 $DIC->language()->loadLanguageModule(
'bibl');
81 $DIC->language()->loadLanguageModule(
'content');
82 $DIC->language()->loadLanguageModule(
'obj');
83 $DIC->language()->loadLanguageModule(
'cntr');
85 if (is_object($this->
object)) {
98 return self::CMD_VIEW;
121 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
124 $link = $this->dic()->ctrl()->getLinkTarget($this, $this->
getStandardCmd());
125 if ($this->
object != null) {
126 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"bibl");
131 if ($this->
object instanceof
ilObjBibliographic && !$DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
135 $next_class = $this->dic()->ctrl()->getNextClass($this);
136 $this->cmd = $this->dic()->ctrl()->getCmd();
137 switch ($next_class) {
138 case strtolower(ilInfoScreenGUI::class):
140 $this->dic()->tabs()->activateTab(self::TAB_ID_INFO);
143 case strtolower(ilCommonActionDispatcherGUI::class):
146 $this->ctrl->forwardCommand($gui);
148 case strtolower(ilPermissionGUI::class):
150 $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
153 case strtolower(ilObjectCopyGUI::class):
155 $cp->setType(
'bibl');
156 $this->dic()[
'tpl']->loadStandardTemplate();
157 $this->ctrl->forwardCommand($cp);
159 case strtolower(ilObjFileGUI::class):
161 $this->dic()->tabs()->setTabActive(self::TAB_ID_RECORDS);
162 $this->ctrl->forwardCommand(
new ilObjFile($this));
164 case strtolower(ilExportGUI::class):
166 $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
168 $exp_gui->addFormat(
"xml");
169 $this->ctrl->forwardCommand($exp_gui);
171 case strtolower(ilBiblFieldFilterGUI::class):
173 $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
175 $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
180 $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
184 case self::CMD_EDIT_OBJECT:
185 case self::CMD_UPDATE_OBJECT:
187 $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
208 $this->ctrl->setCmd(
"showSummary");
209 $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
221 if (!$this->checkPermissionBoolAndReturn(
"visible") && !$this->checkPermissionBoolAndReturn(
'read')) {
223 $this->ctrl->redirectByClass(
'ilDashboardGUI',
'');
225 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
227 $info->enablePrivateNotes();
228 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
229 $this->ctrl->forwardCommand($info);
239 $ilLocator = $DIC[
'ilLocator'];
240 if (is_object($this->
object)) {
241 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
252 public static function _goto($a_target)
256 $id = explode(
"_", $a_target);
257 $DIC->ctrl()->initBaseClass(ilRepositoryGUI::class);
258 $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class,
"ref_id", $id[0]);
263 $DIC->ctrl()->redirectByClass(
265 ilRepositoryGUI::class,
266 ilObjBibliographicGUI::class,
268 self::CMD_SHOW_DETAILS
271 $DIC->ctrl()->redirectByClass(
273 ilRepositoryGUI::class,
274 ilObjBibliographicGUI::class,
291 $forms = parent::initCreationForms($a_new_type);
293 $in_file =
new ilFileInputGUI($DIC->language()->txt(
"bibliography_file"),
"bibliographic_file");
294 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
295 $in_file->setRequired(
true);
296 $forms[self::CFORM_NEW]->addItem($in_file);
297 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
298 $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
309 if ($form[self::CFORM_NEW]->checkInput()) {
312 $form = $form[self::CFORM_NEW];
313 $form->setValuesByPost();
314 $DIC->ui()->mainTemplate()->setContent($form->getHtml());
328 $a_new_object->doUpdate();
330 $this->ctrl->redirect($this, self::CMD_EDIT);
344 $ilHelp = $DIC[
'ilHelp'];
348 $ilHelp->setScreenIdComponent(
'bibl');
350 if ($DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
351 $DIC->tabs()->addTab(
354 ->txt(self::TAB_CONTENT),
355 $this->ctrl->getLinkTarget($this, self::CMD_SHOW_CONTENT)
359 if ($DIC->access()->checkAccess(
'visible',
"", $this->object->getRefId())
360 || $DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())
362 $DIC->tabs()->addTab(
366 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
370 if ($DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
371 $DIC->tabs()->addTab(
372 self::SUBTAB_SETTINGS,
374 ->txt(self::SUBTAB_SETTINGS),
375 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
379 if ($DIC->access()->checkAccess(
"write",
"", $this->object->getRefId())) {
380 $DIC->tabs()->addTab(
383 ->txt(self::TAB_EXPORT),
384 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
388 if ($DIC->access()->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
389 $DIC->tabs()->addTab(
390 self::TAB_ID_PERMISSIONS,
392 ->txt(
"perm_settings"),
393 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
402 $DIC->tabs()->addSubTab(
403 self::SUBTAB_SETTINGS,
405 ->txt(self::SUBTAB_SETTINGS),
406 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
408 $DIC->tabs()->addSubTab(
409 self::SUB_TAB_FILTER,
411 ->txt(
"bibl_filter"),
429 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
432 $ilTabs->activateTab(
"settings");
437 $form->setValuesByArray($values,
true);
442 $tpl->setContent($form->getHTML());
450 $form = parent::initEditForm();
454 ->txt(
"bibliography_file"),
457 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
458 $in_file->setRequired(
false);
461 ->txt(
"override_entries"),
466 $form->addItem($cb_override);
469 $section_appearance->setTitle($this->lng->txt(
'cont_presentation'));
470 $form->addItem($section_appearance);
471 $DIC->object()->commonSettings()->legacyForm($form, $this->
object)->addTileImage();
473 $form->setFormAction($DIC->ctrl()->getFormAction($this,
"save"));
486 $DIC->tabs()->activateTab(self::SUBTAB_SETTINGS);
500 $a_values[
"is_online"] = $this->
object->getOnline();
520 $read_access = $DIC->access()->checkAccess(
'read',
"", $this->object->getRefId());
521 $online = $this->
object->getOnline();
522 $write_access = $DIC->access()->checkAccess(
'write',
"", $this->object->getRefId());
523 if (($read_access && $online) || $write_access) {
524 $DIC->tabs()->activateTab(self::TAB_CONTENT);
527 $b->setCaption(
'download_original_file');
528 $b->setUrl($DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SEND_FILE));
529 $b->setPrimary(
true);
530 $DIC->toolbar()->addButtonInstance(
$b);
533 $html = $table->getHTML();
534 $DIC->ui()->mainTemplate()->setContent($html);
537 $DIC->ui()->mainTemplate()->setPermanentLink(
"bibl", $this->object->getRefId());
543 ->txt(
"msg_no_perm_read_item"),
557 $table->writeFilterToSession();
558 $table->resetOffset();
559 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
566 $table->resetFilter();
567 $table->resetOffset();
568 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
579 if ($DIC[
'ilAccess']->checkAccess(
'read',
"", $this->object->getRefId())) {
580 $file_path = $this->
object->getLegacyAbsolutePath();
582 if (is_file($file_path)) {
599 if ($DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
600 $id = $DIC->http()->request()->getQueryParams()[self::P_ENTRY_ID];
601 $entry = $this->facade->entryFactory()
602 ->findByIdAndTypeString($id, $this->object->getFileTypeAsString());
605 $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
625 if ($DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
626 if ($this->object->getOnline() != $a_form->
getInput(
"is_online")) {
627 $this->
object->setOnline($a_form->
getInput(
"is_online"));
630 if (!empty($_FILES[
'bibliographic_file'][
'name'])) {
631 $this->
addNews($this->object->getId(),
'updated');
634 $DIC->object()->commonSettings()->legacyForm($a_form, $this->
object)->saveTileImage();
645 switch (
$_GET[
"ntf"]) {
665 $DIC->ctrl()->redirect($this,
"");
677 $ilNewsItem->setTitle($DIC->language()->txt(
'news_title_' . $change));
680 $ilNewsItem->setUserId($DIC->user()->getId());
682 $ilNewsItem->setContentTextIsLangVar(
false);
683 $ilNewsItem->create();
718 $a_new_object->parseFileToDatabase();
720 parent::afterImport($a_new_object);
infoScreenForward()
show information screen
Class ilObjBibliographicGUI.
removeFromDesk()
Remove from desktop.
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.
updateCustom(ilPropertyFormGUI $a_form)
updateSettings
executeCommand()
executeCommand
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
sendFile()
provide file as a download
addToDesk()
Add desktop item.
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
const TYPE_DATA_COLLECTION
Export User Interface Class.
static deliverFileAttached($path_to_file, $download_file_name='', $mime_type='', $delete_file=false)
void
getId()
get object id public
Class ilBiblFieldFilterGUI.
static _lookupObjId($a_id)
initCreationForms($a_new_type)
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
removeFromDeskObject()
Remove from desktop public.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setTabs()
create tabs (repository/workspace switch)
addNews($obj_id, $change='created')
getEditFormValues()
Get values for edit form.
getEditFormCustomValues(array &$a_values)
initEditCustomForm(ilPropertyFormGUI $a_form)
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
__construct(Container $dic, ilPlugin $plugin)
showContent()
shows the overview page with all entries in a table
addToDeskObject()
Add desktop item public.
getStandardCmd()
getStandardCmd
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjBibliographic.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilBiblFactoryFacade.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
afterImport(ilObject $a_new_object)
Post (successful) object import hook.
static _goto($a_target)
_goto Deep link
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...