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):
145 $this->ctrl->forwardCommand($gui);
147 case strtolower(ilPermissionGUI::class):
149 $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
152 case strtolower(ilObjectCopyGUI::class):
154 $cp->setType(
'bibl');
155 $this->dic()[
'tpl']->loadStandardTemplate();
156 $this->ctrl->forwardCommand($cp);
158 case strtolower(ilObjFileGUI::class):
160 $this->dic()->tabs()->setTabActive(self::TAB_ID_RECORDS);
161 $this->ctrl->forwardCommand(
new ilObjFile($this));
163 case strtolower(ilExportGUI::class):
165 $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
167 $exp_gui->addFormat(
"xml");
168 $this->ctrl->forwardCommand($exp_gui);
170 case strtolower(ilBiblFieldFilterGUI::class):
172 $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
174 $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
179 $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
183 case self::CMD_EDIT_OBJECT:
184 case self::CMD_UPDATE_OBJECT:
186 $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
207 $this->ctrl->setCmd(
"showSummary");
208 $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
220 if (!$this->checkPermissionBoolAndReturn(
"visible") && !$this->checkPermissionBoolAndReturn(
'read')) {
222 $this->ctrl->redirectByClass(
'ilDashboardGUI',
'');
224 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
226 $info->enablePrivateNotes();
227 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
228 $this->ctrl->forwardCommand($info);
238 $ilLocator = $DIC[
'ilLocator'];
239 if (is_object($this->
object)) {
240 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
251 public static function _goto($a_target)
255 $id = explode(
"_", $a_target);
256 $DIC->ctrl()->initBaseClass(ilRepositoryGUI::class);
257 $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class,
"ref_id", $id[0]);
262 $DIC->ctrl()->redirectByClass(
264 ilRepositoryGUI::class,
265 ilObjBibliographicGUI::class,
267 self::CMD_SHOW_DETAILS
270 $DIC->ctrl()->redirectByClass(
272 ilRepositoryGUI::class,
273 ilObjBibliographicGUI::class,
290 $forms = parent::initCreationForms($a_new_type);
292 $in_file =
new ilFileInputGUI($DIC->language()->txt(
"bibliography_file"),
"bibliographic_file");
293 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
294 $in_file->setRequired(
true);
295 $forms[self::CFORM_NEW]->addItem($in_file);
296 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
297 $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
308 if ($form[self::CFORM_NEW]->checkInput()) {
311 $form = $form[self::CFORM_NEW];
312 $form->setValuesByPost();
313 $DIC->ui()->mainTemplate()->setContent($form->getHtml());
327 $a_new_object->doUpdate();
329 $this->ctrl->redirect($this, self::CMD_EDIT);
343 $ilHelp = $DIC[
'ilHelp'];
347 $ilHelp->setScreenIdComponent(
'bibl');
349 if ($DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
350 $DIC->tabs()->addTab(
353 ->txt(self::TAB_CONTENT),
354 $this->ctrl->getLinkTarget($this, self::CMD_SHOW_CONTENT)
358 if ($DIC->access()->checkAccess(
'visible',
"", $this->object->getRefId())
359 || $DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())
361 $DIC->tabs()->addTab(
365 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
369 if ($DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
370 $DIC->tabs()->addTab(
371 self::SUBTAB_SETTINGS,
373 ->txt(self::SUBTAB_SETTINGS),
374 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
378 if ($DIC->access()->checkAccess(
"write",
"", $this->object->getRefId())) {
379 $DIC->tabs()->addTab(
382 ->txt(self::TAB_EXPORT),
383 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
387 if ($DIC->access()->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
388 $DIC->tabs()->addTab(
389 self::TAB_ID_PERMISSIONS,
391 ->txt(
"perm_settings"),
392 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
401 $DIC->tabs()->addSubTab(
402 self::SUBTAB_SETTINGS,
404 ->txt(self::SUBTAB_SETTINGS),
405 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
407 $DIC->tabs()->addSubTab(
408 self::SUB_TAB_FILTER,
410 ->txt(
"bibl_filter"),
428 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
431 $ilTabs->activateTab(
"settings");
436 $form->setValuesByArray($values,
true);
441 $tpl->setContent($form->getHTML());
449 $form = parent::initEditForm();
453 ->txt(
"bibliography_file"),
456 $in_file->
setSuffixes(array(
"ris",
"bib",
"bibtex"));
457 $in_file->setRequired(
false);
460 ->txt(
"override_entries"),
465 $form->addItem($cb_override);
468 $section_appearance->setTitle($this->lng->txt(
'cont_presentation'));
469 $form->addItem($section_appearance);
470 $DIC->object()->commonSettings()->legacyForm($form, $this->
object)->addTileImage();
472 $form->setFormAction($DIC->ctrl()->getFormAction($this,
"save"));
485 $DIC->tabs()->activateTab(self::SUBTAB_SETTINGS);
499 $a_values[
"is_online"] = $this->
object->getOnline();
519 $read_access = $DIC->access()->checkAccess(
'read',
"", $this->object->getRefId());
520 $online = $this->
object->getOnline();
521 $write_access = $DIC->access()->checkAccess(
'write',
"", $this->object->getRefId());
522 if (($read_access && $online) || $write_access) {
523 $DIC->tabs()->activateTab(self::TAB_CONTENT);
526 $b->setCaption(
'download_original_file');
527 $b->setUrl($DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SEND_FILE));
528 $b->setPrimary(
true);
529 $DIC->toolbar()->addButtonInstance(
$b);
532 $html = $table->getHTML();
533 $DIC->ui()->mainTemplate()->setContent($html);
536 $DIC->ui()->mainTemplate()->setPermanentLink(
"bibl", $this->object->getRefId());
542 ->txt(
"msg_no_perm_read_item"),
556 $table->writeFilterToSession();
557 $table->resetOffset();
558 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
565 $table->resetFilter();
566 $table->resetOffset();
567 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
578 if ($DIC[
'ilAccess']->checkAccess(
'read',
"", $this->object->getRefId())) {
579 $file_path = $this->
object->getLegacyAbsolutePath();
581 if (is_file($file_path)) {
598 if ($DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
599 $id = $DIC->http()->request()->getQueryParams()[self::P_ENTRY_ID];
600 $entry = $this->facade->entryFactory()
601 ->findByIdAndTypeString($id, $this->object->getFileTypeAsString());
604 $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
624 if ($DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
625 if ($this->object->getOnline() != $a_form->
getInput(
"is_online")) {
626 $this->
object->setOnline($a_form->
getInput(
"is_online"));
629 if (!empty($_FILES[
'bibliographic_file'][
'name'])) {
630 $this->
addNews($this->object->getId(),
'updated');
633 $DIC->object()->commonSettings()->legacyForm($a_form, $this->
object)->saveTileImage();
644 switch (
$_GET[
"ntf"]) {
664 $DIC->ctrl()->redirect($this,
"");
676 $ilNewsItem->setTitle($DIC->language()->txt(
'news_title_' . $change));
679 $ilNewsItem->setUserId($DIC->user()->getId());
681 $ilNewsItem->setContentTextIsLangVar(
false);
682 $ilNewsItem->create();
717 $a_new_object->parseFileToDatabase();
719 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
Class ilDataCollectionField.
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.
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...