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)
79 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
80 $DIC->language()->loadLanguageModule(
'bibl');
82 if (is_object($this->
object)) {
95 return self::CMD_VIEW;
118 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
121 $link = $this->dic()->ctrl()->getLinkTarget($this, $this->
getStandardCmd());
122 if ($this->
object != null) {
123 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"bibl");
128 if ($this->
object instanceof
ilObjBibliographic && !$DIC->access()->checkAccess(
'visible',
"", $this->object->getRefId())) {
132 $next_class = $this->dic()->ctrl()->getNextClass($this);
133 $this->cmd = $this->dic()->ctrl()->getCmd();
134 switch ($next_class) {
135 case strtolower(ilInfoScreenGUI::class):
137 $this->dic()->tabs()->activateTab(self::TAB_ID_INFO);
140 case strtolower(ilCommonActionDispatcherGUI::class):
142 $this->ctrl->forwardCommand($gui);
144 case strtolower(ilPermissionGUI::class):
146 $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
149 case strtolower(ilObjectCopyGUI::class):
151 $cp->setType(
'bibl');
152 $this->dic()[
'tpl']->getStandardTemplate();
153 $this->ctrl->forwardCommand($cp);
155 case strtolower(ilObjFileGUI::class):
157 $this->dic()->tabs()->setTabActive(self::TAB_ID_RECORDS);
158 $this->ctrl->forwardCommand(
new ilObjFile($this));
160 case strtolower(ilExportGUI::class):
162 $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
164 $exp_gui->addFormat(
"xml");
165 $this->ctrl->forwardCommand($exp_gui);
167 case strtolower(ilBiblFieldFilterGUI::class):
169 $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
171 $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
176 $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
180 case self::CMD_EDIT_OBJECT:
181 case self::CMD_UPDATE_OBJECT:
183 $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
204 $this->ctrl->setCmd(
"showSummary");
205 $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
217 if (!$this->checkPermissionBoolAndReturn(
"visible") && !$this->checkPermissionBoolAndReturn(
'read')) {
219 $this->ctrl->redirectByClass(
'ilPersonalDesktopGUI',
'');
221 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
223 $info->enablePrivateNotes();
224 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
225 $this->ctrl->forwardCommand(
$info);
235 $ilLocator = $DIC[
'ilLocator'];
236 if (is_object($this->
object)) {
237 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
248 public static function _goto($a_target)
252 $id = explode(
"_", $a_target);
253 $DIC->ctrl()->initBaseClass(ilRepositoryGUI::class);
254 $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class,
"ref_id",
$id[0]);
259 $DIC->ctrl()->redirectByClass(
261 ilRepositoryGUI::class,
262 ilObjBibliographicGUI::class,
264 self::CMD_SHOW_DETAILS
267 $DIC->ctrl()->redirectByClass(
269 ilRepositoryGUI::class,
270 ilObjBibliographicGUI::class,
287 $forms = parent::initCreationForms($a_new_type);
289 $in_file =
new ilFileInputGUI($DIC->language()->txt(
"bibliography_file"),
"bibliographic_file");
290 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
291 $in_file->setRequired(
true);
292 $forms[self::CFORM_NEW]->addItem($in_file);
293 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
294 $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
305 if (
$form[self::CFORM_NEW]->checkInput()) {
309 $form->setValuesByPost();
310 $DIC->ui()->mainTemplate()->setContent(
$form->getHtml());
324 $a_new_object->doUpdate();
326 $this->ctrl->redirect($this, self::CMD_EDIT);
340 $ilHelp = $DIC[
'ilHelp'];
344 $ilHelp->setScreenIdComponent(
'bibl');
346 if ($DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
347 $DIC->tabs()->addTab(
350 ->txt(self::TAB_CONTENT),
351 $this->ctrl->getLinkTarget($this, self::CMD_SHOW_CONTENT)
355 if ($DIC->access()->checkAccess(
'visible',
"", $this->object->getRefId())
356 || $DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())
358 $DIC->tabs()->addTab(
362 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
366 if ($DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
367 $DIC->tabs()->addTab(
368 self::SUBTAB_SETTINGS,
370 ->txt(self::SUBTAB_SETTINGS),
371 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
375 if ($DIC->access()->checkAccess(
"write",
"", $this->object->getRefId())) {
376 $DIC->tabs()->addTab(
379 ->txt(self::TAB_EXPORT),
380 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
384 if ($DIC->access()->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
385 $DIC->tabs()->addTab(
386 self::TAB_ID_PERMISSIONS,
388 ->txt(
"perm_settings"),
389 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
398 $DIC->tabs()->addSubTab(
399 self::SUBTAB_SETTINGS,
401 ->txt(self::SUBTAB_SETTINGS),
402 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
404 $DIC->tabs()->addSubTab(
405 self::SUB_TAB_FILTER,
407 ->txt(
"bibl_filter"),
417 $form = parent::initEditForm();
421 ->txt(
"bibliography_file"),
424 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
425 $in_file->setRequired(
false);
428 ->txt(
"override_entries"),
433 $form->addItem($cb_override);
434 $form->setFormAction($DIC->ctrl()->getFormAction($this,
"save"));
447 $DIC->tabs()->activateTab(self::SUBTAB_SETTINGS);
461 $a_values[
"is_online"] = $this->
object->getOnline();
481 $read_access = $DIC->access()->checkAccess(
'read',
"", $this->object->getRefId());
482 $online = $this->
object->getOnline();
483 $write_access = $DIC->access()->checkAccess(
'write',
"", $this->object->getRefId());
484 if (($read_access && $online) || $write_access) {
485 $DIC->tabs()->activateTab(self::TAB_CONTENT);
488 $b->setCaption(
'download_original_file');
489 $b->setUrl($DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SEND_FILE));
490 $b->setPrimary(
true);
491 $DIC->toolbar()->addButtonInstance($b);
495 $DIC->ui()->mainTemplate()->setContent(
$html);
498 $DIC->ui()->mainTemplate()->setPermanentLink(
"bibl", $this->object->getRefId());
504 ->txt(
"msg_no_perm_read_item"),
518 $table->writeFilterToSession();
520 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
529 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
540 if ($DIC[
'ilAccess']->checkAccess(
'read',
"", $this->object->getRefId())) {
541 $file_path = $this->
object->getLegacyAbsolutePath();
543 if (is_file($file_path)) {
560 if ($DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
561 $id = $DIC->http()->request()->getQueryParams()[self::P_ENTRY_ID];
562 $entry = $this->facade->entryFactory()
563 ->findByIdAndTypeString(
$id, $this->object->getFileTypeAsString());
566 $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
586 if ($DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
587 if ($this->object->getOnline() != $a_form->
getInput(
"is_online")) {
588 $this->
object->setOnline($a_form->
getInput(
"is_online"));
591 if (!empty($_FILES[
'bibliographic_file'][
'name'])) {
592 $this->
addNews($this->object->getId(),
'updated');
604 switch (
$_GET[
"ntf"]) {
624 $DIC->ctrl()->redirect($this,
"");
636 $ilNewsItem->setTitle($DIC->language()->txt(
'news_title_' . $change));
639 $ilNewsItem->setUserId($DIC->user()->getId());
641 $ilNewsItem->setContentTextIsLangVar(
false);
642 $ilNewsItem->create();
656 ilUtil::sendSuccess($DIC->language()->txt(
"added_to_desktop"),
true);
657 $this->ctrl->redirect($this, self::CMD_VIEW);
671 ilUtil::sendSuccess($DIC->language()->txt(
"removed_from_desktop"),
true);
672 $this->ctrl->redirect($this, self::CMD_VIEW);
706 $a_new_object->parseFileToDatabase();
708 parent::afterImport($a_new_object);
infoScreenForward()
show information screen
removeFromDeskObject()
Remove from desktop.
Class ilObjBibliographicGUI.
removeFromDesk()
Remove from desktop.
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
updateCustom(ilPropertyFormGUI $a_form)
updateSettings
executeCommand()
executeCommand
if(!array_key_exists('StateId', $_REQUEST)) $id
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
Class ilDataCollectionField.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
static addToDesktop()
Add desktop item public.
sendFile()
provide file as a download
addToDesk()
Add desktop item.
const TYPE_DATA_COLLECTION
Export User Interface Class.
static deliverFileAttached($path_to_file, $download_file_name='', $mime_type='', $delete_file=false)
void
if(isset($_POST['submit'])) $form
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)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setTabs()
create tabs (repository/workspace switch)
addNews($obj_id, $change='created')
static removeFromDesktop()
Remove item from personal desktop public.
getEditFormCustomValues(array &$a_values)
initEditCustomForm(ilPropertyFormGUI $a_form)
addToDeskObject()
Add desktop item.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
showContent()
shows the overview page with all entries in a table
getStandardCmd()
getStandardCmd
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjBibliographic.
if(empty($password)) $table
Class ilBiblEntryDetailPresentationGUI.
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...