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');
10 require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
47 protected $cmd = self::CMD_SHOW_CONTENT;
55 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0) {
57 $this->lng = $DIC[
'lng'];
58 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
59 $this->lng->loadLanguageModule(
'bibl');
72 return self::CMD_VIEW;
92 $ilTabs = $DIC[
'ilTabs'];
93 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
98 if ($this->
object != null) {
99 $ilNavigationHistory->addItem($this->
object->getRefId(), $link,
"bibl");
104 if ($this->
object instanceof
ilObjBibliographic && !$DIC[
'ilAccess']->checkAccess(
'visible',
"", $this->
object->getRefId())) {
108 $next_class =
$ilCtrl->getNextClass($this);
109 $this->cmd =
$ilCtrl->getCmd();
110 switch ($next_class) {
111 case "ilinfoscreengui":
113 $ilTabs->activateTab(self::TAB_ID_INFO);
116 case "ilcommonactiondispatchergui":
117 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
119 $this->ctrl->forwardCommand($gui);
121 case "ilpermissiongui":
123 $ilTabs->activateTab(self::TAB_ID_PERMISSIONS);
124 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
126 $this->ctrl->forwardCommand($perm_gui);
128 case "ilobjectcopygui":
129 include_once
"./Services/Object/classes/class.ilObjectCopyGUI.php";
131 $cp->setType(
'bibl');
132 $tpl->getStandardTemplate();
133 $this->ctrl->forwardCommand($cp);
137 $ilTabs->setTabActive(self::TAB_ID_RECORDS);
138 include_once(
"./Modules/File/classes/class.ilObjFile.php");
140 $this->ctrl->forwardCommand($file_gui);
144 $ilTabs->setTabActive(self::TAB_EXPORT);
146 $exp_gui->addFormat(
"xml");
147 $this->ctrl->forwardCommand($exp_gui);
150 return parent::executeCommand();
163 $this->ctrl->setCmd(
"showSummary");
164 $this->ctrl->setCmdClass(
"ilinfoscreengui");
177 $this->ctrl->redirectByClass(
'ilPersonalDesktopGUI',
'');
179 $DIC[
'ilTabs']->activateTab(self::TAB_ID_INFO);
180 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
182 $info->enablePrivateNotes();
183 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
184 $this->ctrl->forwardCommand(
$info);
193 $ilLocator = $DIC[
'ilLocator'];
194 if (is_object($this->
object)) {
195 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
206 public static function _goto($a_target) {
209 $id = explode(
"_", $a_target);
210 $DIC[
'ilCtrl']->setTargetScript(
"ilias.php");
211 $DIC[
'ilCtrl']->initBaseClass(
"ilRepositoryGUI");
212 $DIC[
'ilCtrl']->setParameterByClass(
"ilobjbibliographicgui",
"ref_id", $id[0]);
216 $DIC[
'ilCtrl']->redirectByClass(
array(
"ilRepositoryGUI",
"ilobjbibliographicgui" ), self::CMD_SHOW_DETAILS);
218 $DIC[
'ilCtrl']->redirectByClass(
array(
"ilRepositoryGUI",
"ilobjbibliographicgui" ), self::CMD_VIEW);
230 $forms = parent::initCreationForms($a_new_type);
232 $in_file =
new ilFileInputGUI($this->lng->txt(
"bibliography file"),
"bibliographic_file");
234 $in_file->setRequired(
true);
235 $forms[self::CFORM_NEW]->addItem($in_file);
236 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
237 $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
247 if ($form[self::CFORM_NEW]->checkInput()) {
250 $form = $form[self::CFORM_NEW];
251 $form->setValuesByPost();
252 $tpl->setContent($form->getHtml());
265 $a_new_object->doUpdate();
267 $this->ctrl->redirect($this, self::CMD_EDIT);
279 $ilAccess = $DIC[
'ilAccess'];
280 $ilTabs = $DIC[
'ilTabs'];
282 $ilHelp = $DIC[
'ilHelp'];
289 $ilHelp->setScreenIdComponent(
'bibl');
291 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
292 $ilTabs->addTab(self::TAB_CONTENT,
$lng->txt(self::TAB_CONTENT), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_CONTENT));
295 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
296 $ilTabs->addTab(self::TAB_ID_INFO,
$lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
299 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
300 $ilTabs->addTab(
"settings",
$lng->txt(
"settings"), $this->ctrl->getLinkTarget($this,
"editObject"));
303 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
304 $ilTabs->addTab(self::TAB_EXPORT,
$lng->txt(self::TAB_EXPORT), $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
307 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
308 $ilTabs->addTab(self::TAB_ID_PERMISSIONS,
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
316 $form = parent::initEditForm();
320 $in_file->setRequired(
false);
321 $cb_override =
new ilCheckboxInputGUI($this->lng->txt(
"override_entries"),
"override_entries");
323 $form->addItem($cb_override);
324 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
335 $ilTabs = $DIC[
'ilTabs'];
336 $ilTabs->activateTab(
"settings");
349 $a_values[
"is_online"] = $this->
object->getOnline();
365 $ilAccess = $DIC[
'ilAccess'];
367 $ilTabs = $DIC[
'ilTabs'];
369 if (($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()) && $this->
object->getOnline())
370 || $ilAccess->checkAccess(
'write',
"", $this->object->getRefId())
372 $ilTabs->setTabActive(self::TAB_CONTENT);
380 $b->setCaption(
'download_original_file');
381 $b->setUrl(
$ilCtrl->getLinkTargetByClass(
"ilBibliographicDetailsGUI", self::CMD_SEND_FILE));
382 $b->setPrimary(
true);
383 $DIC[
'ilToolbar']->addButtonInstance($b);
385 include_once
"./Modules/Bibliographic/classes/class.ilBibliographicRecordListTableGUI.php";
387 $html = $table->getHTML();
388 $DIC[
'tpl']->setContent(
$html);
391 $DIC[
'tpl']->setPermanentLink(
"bibl", $this->
object->getRefId());
405 if ($DIC[
'ilAccess']->checkAccess(
'read',
"", $this->
object->getRefId())) {
406 $file_path = $this->bibl_obj->getFileAbsolutePath();
408 if (is_file($file_path)) {
409 require_once(
'./Services/FileDelivery/classes/class.ilFileDelivery.php');
425 if ($DIC[
'ilAccess']->checkAccess(
'read',
"", $this->
object->getRefId())) {
427 $this->tpl->setContent($bibGUI->getHTML());
444 $ilAccess = $DIC[
'ilAccess'];
445 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
446 if ($this->
object->getOnline() != $a_form->
getInput(
"is_online")) {
447 $this->
object->setOnline($a_form->
getInput(
"is_online"));
450 if (!empty($_FILES[
'bibliographic_file'][
'name'])) {
451 $this->
addNews($this->bibl_obj->getId(),
'updated');
463 include_once
"./Services/Notification/classes/class.ilNotification.php";
464 switch (
$_GET[
"ntf"]) {
485 $ilNewsItem->setTitle(
$lng->txt(
'news_title_' . $change));
488 $ilNewsItem->setUserId(
$ilUser->getId());
490 $ilNewsItem->setContentTextIsLangVar(
false);
491 $ilNewsItem->create();
501 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
504 $this->ctrl->redirect($this, self::CMD_VIEW);
514 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
517 $this->ctrl->redirect($this, self::CMD_VIEW);
548 $a_new_object->writeSourcefileEntriesToDb();
549 parent::afterImport($a_new_object);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
infoScreenForward()
show information screen
removeFromDeskObject()
Remove from desktop.
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
Class ilObject Basic functions for all objects.
executeCommand()
executeCommand
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
static getInstance(ilObjBibliographic $bibl_obj, $entry_id)
static addToDesktop()
Add desktop item public.
sendFile()
provide file as a download
addToDesk()
Add desktop item.
const TYPE_DATA_COLLECTION
Export User Interface Class.
getId()
get object id public
static deliverFileAttached($path_to_file, $download_file_name=null, $mime_type=null, $delete_file=false)
Class ilDataCollectionField.
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)
Create styles array
The data for the language used.
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.
Create new PHPExcel object
obj_idprivate
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.
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...