4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Modules/MediaPool/classes/class.ilObjMediaPool.php");
6 include_once(
"./Services/Table/classes/class.ilTableGUI.php");
7 include_once(
"./Modules/Folder/classes/class.ilObjFolderGUI.php");
8 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
9 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
10 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
33 function __construct($a_data,$a_id = 0,$a_call_by_reference =
true, $a_prepare_output =
false)
45 $lng->loadLanguageModule(
"mep");
47 if ($this->ctrl->getCmd() ==
"explorer")
49 $this->ctrl->saveParameter($this, array(
"ref_id"));
53 $this->ctrl->saveParameter($this, array(
"ref_id",
"mepitem_id"));
55 $this->ctrl->saveParameter($this, array(
"mep_mode"));
57 $lng->loadLanguageModule(
"content");
75 if ($this->ctrl->getRedirectSource() ==
"ilinternallinkgui")
81 $next_class = $this->ctrl->getNextClass($this);
82 $cmd = $this->ctrl->getCmd();
84 $new_type =
$_POST[
"new_type"]
88 if ($new_type !=
"" && (
$cmd !=
"confirmRemove" &&
$cmd !=
"copyToClipboard"
89 &&
$cmd !=
"pasteFromClipboard"))
96 $tree =& $this->
object->getTree();
97 if (
$_GET[
"mepitem_id"] ==
"")
103 if (
$cmd ==
"create")
105 switch(
$_POST[
"new_type"])
108 $this->ctrl->redirectByClass(
"ilobjmediaobjectgui",
"create");
113 $this->ctrl->redirectByClass(
"ilobjfoldergui",
"create");
120 case 'ilmediapoolpagegui':
123 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
126 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
128 $mep_page_gui->setEnableEditing(
false);
130 $ret = $this->ctrl->forwardCommand($mep_page_gui);
133 $tpl->setContent(
$ret);
138 case "ilobjmediaobjectgui":
141 if (
$cmd ==
"create" ||
$cmd ==
"save" ||
$cmd ==
"cancel")
143 $ret_obj =
$_GET[
"mepitem_id"];
145 $ilObjMediaObjectGUI->setWidthPreset($this->object->getDefaultWidth());
146 $ilObjMediaObjectGUI->setHeightPreset($this->object->getDefaultHeight());
150 $ret_obj =
$tree->getParentId(
$_GET[
"mepitem_id"]);
153 $ilTabs->setBackTarget($lng->txt(
"back"),
154 $this->ctrl->getLinkTarget($this,
155 $_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia"));
157 if ($this->ctrl->getCmdClass() ==
"ilinternallinkgui")
159 $this->ctrl->setReturn($this,
"explorer");
163 $this->ctrl->setParameter($this,
"mepitem_id", $ret_obj);
164 $this->ctrl->setReturn($this,
165 $_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
166 $this->ctrl->setParameter($this,
"mepitem_id", $_GET[
"mepitem_id"]);
169 $ilObjMediaObjectGUI->setTabs();
173 $ret =& $this->ctrl->forwardCommand($ilObjMediaObjectGUI);
179 $mep_item->setTitle(
$ret->getTitle());
180 $mep_item->setType(
"mob");
181 $mep_item->setForeignId(
$ret->getId());
184 $parent = (
$_GET[
"mepitem_id"] ==
"")
186 :
$_GET[
"mepitem_id"];
187 $tree->insertNode($mep_item->getId(), $parent);
188 ilUtil::redirect(
"ilias.php?baseClass=ilMediaPoolPresentationGUI&cmd=listMedia&ref_id=".
189 $_GET[
"ref_id"].
"&mepitem_id=".
$_GET[
"mepitem_id"]);
198 case "ilobjfoldergui":
201 $this->ctrl->setReturn($this,
"listMedia");
208 $folder_gui->setFormAction(
"save",
209 $this->ctrl->getFormActionByClass(
"ilobjfoldergui"));
210 $folder_gui->createObject();
216 $parent = (
$_GET[
"mepitem_id"] ==
"")
218 :
$_GET[
"mepitem_id"];
219 $folder_gui->setFolderTree(
$tree);
220 $folder_gui->saveObject($parent);
227 $this->ctrl->setParameter($this,
"foldereditmode",
"1");
228 $folder_gui->setFormAction(
"update", $this->ctrl->getFormActionByClass(
"ilobjfoldergui"));
229 $folder_gui->editObject();
236 $this->ctrl->setReturn($this,
"listMedia");
237 $folder_gui->updateObject(
true);
241 if (
$_GET[
"foldereditmode"])
245 $this->ctrl->redirect($this,
"listMedia");
250 case "ileditclipboardgui":
252 $this->ctrl->setReturn($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
254 $clip_gui->setMultipleSelections(
true);
255 $clip_gui->setInsertButtonTitle($lng->txt(
"mep_copy_to_mep"));
256 $ilTabs->setTabActive(
"clipboard");
258 $ret =& $this->ctrl->forwardCommand($clip_gui);
262 case 'ilinfoscreengui':
268 case 'ilpermissiongui':
270 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
272 $ret =& $this->ctrl->forwardCommand($perm_gui);
278 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
280 $exp_gui->addFormat(
"xml");
281 $ret = $this->ctrl->forwardCommand($exp_gui);
287 $cmd = $this->ctrl->getCmd(
"frameset");
308 $this->ctrl->redirectByClass(
"ilobjmediaobjectgui",
"create");
326 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
328 if ($a_mode !=
"edit")
330 $this->form->setTarget(
"_top");
337 $ti->setRequired(
true);
338 $this->form->addItem($ti);
344 $this->form->addItem($ta);
346 if ($a_mode ==
"edit")
349 $ni =
new ilNumberInputGUI($this->lng->txt(
"mep_default_width"),
"default_width");
351 $ni->setMaxLength(5);
353 $this->form->addItem($ni);
356 $ni =
new ilNumberInputGUI($this->lng->txt(
"mep_default_height"),
"default_height");
358 $ni->setMaxLength(5);
360 $ni->setInfo($this->lng->txt(
"mep_default_width_height_info"));
361 $this->form->addItem($ni);
365 if ($a_mode ==
"create")
367 $this->form->addCommandButton(
"save", $lng->txt($a_new_type.
"_add"));
368 $this->form->addCommandButton(
"cancelCreation", $lng->txt(
"cancel"));
369 $this->form->setTitle($lng->txt($a_new_type.
"_new"));
373 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
375 $this->form->setTitle($lng->txt(
"edit"));
378 $this->form->setFormAction($ilCtrl->getFormAction($this));
387 $values[
"title"] = $this->
object->getTitle();
388 $values[
"desc"] = $this->
object->getDescription();
389 if ($this->object->getDefaultWidth() > 0)
391 $values[
"default_width"] = $this->
object->getDefaultWidth();
393 if ($this->object->getDefaultHeight() > 0)
395 $values[
"default_height"] = $this->
object->getDefaultHeight();
397 $this->form->setValuesByArray($values);
410 ilUtil::redirect(
"ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=".$newObj->getRefId().
"&cmd=edit");
422 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
424 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
428 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
447 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
457 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
459 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
475 if ($this->form->checkInput())
477 $this->
object->setTitle(
$_POST[
"title"]);
478 $this->
object->setDescription(
$_POST[
"desc"]);
479 $this->
object->setDefaultWidth(
$_POST[
"default_width"]);
480 $this->
object->setDefaultHeight(
$_POST[
"default_height"]);
481 $this->
update = $this->
object->update();
486 $this->form->setValuesByPost();
487 $tpl->setContent($this->form->getHtml());
492 $this->ctrl->redirect($this,
"edit");
502 $ilCtrl->setParameter($this,
"mep_mode",
"listMedia");
504 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
506 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
508 $ilTabs->setTabActive(
"objs_fold");
510 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
512 $ilToolbar->addButton($lng->txt(
"mep_create_mob"),
513 $ilCtrl->getLinkTarget($this,
"createMediaObject"));
516 if ($mset->get(
"mep_activate_pages"))
518 $ilToolbar->addButton($lng->txt(
"mep_create_content_snippet"),
519 $ilCtrl->getLinkTarget($this,
"createMediaPoolPage"));
522 $ilToolbar->addButton($lng->txt(
"mep_create_folder"),
523 $ilCtrl->getLinkTarget($this,
"createFolderForm"));
526 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
528 $tpl->setContent($mep_table_gui->getHTML());
539 $ilCtrl->setParameter($this,
"mep_mode",
"allMedia");
541 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
543 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
545 $ilTabs->setTabActive(
"mep_all_mobs");
548 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
553 if(isset(
$_GET[
'force_filter']) and
$_GET[
'force_filter'])
557 include_once(
"./Services/Table/classes/class.ilTablePropertiesStorage.php");
559 $tprop->storeProperty(
560 $mep_table_gui->getId(),
565 $mep_table_gui->resetFilter();
566 $mep_table_gui->resetOffset();
567 $mep_table_gui->writeFilterToSession();
574 $tpl->setContent($mep_table_gui->getHTML());
583 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
586 $mtab->writeFilterToSession();
587 $mtab->resetOffset();
596 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolTableGUI.php");
599 $mtab->resetFilter();
600 $mtab->resetOffset();
609 $this->tpl->getStandardTemplate();
618 if (
$_GET[
"mepitem_id"] ==
"")
622 $par_id = $this->
object->tree->getParentId(
$_GET[
"mepitem_id"]);
623 if ($par_id != $this->object->tree->getRootId())
667 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
669 $fs_gui->setMainFrameName(
"content");
670 $fs_gui->setSideFrameName(
"tree");
671 $fs_gui->setMainFrameSource(
672 $this->ctrl->getLinkTarget($this,
"listMedia"));
673 $this->ctrl->setParameter($this,
"expand",
"1");
674 $fs_gui->setSideFrameSource(
675 $this->ctrl->getLinkTarget($this,
"explorer"));
676 $fs_gui->setFramesetTitle($this->object->getTitle());
688 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
690 $fs_gui->setMainFrameName(
"content");
691 $fs_gui->setSideFrameName(
"tree");
692 $fs_gui->setMainFrameSource(
693 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
694 $this->ctrl->setParameter($this,
"expand",
"1");
695 $fs_gui->setSideFrameSource(
696 $this->ctrl->getLinkTarget($this,
"explorer"));
697 $fs_gui->setFramesetTitle($this->object->getTitle());
709 $ilCtrl->setParameter($this,
"obj_id",
"");
710 $ilCtrl->setParameter($this,
"mepitem_id",
"");
712 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()) &&
713 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
718 require_once (
"./Modules/MediaPool/classes/class.ilMediaPoolExplorer.php");
721 $exp->setTargetGet(
"mepitem_id");
722 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
"explorer"));
723 $exp->setTitle($this->lng->txt(
"cont_mep_structure"));
725 $exp->addFilter(
"dummy");
726 $exp->addFilter(
"fold");
727 $exp->setFiltered(
true);
731 if (
$_GET[
"mepexpand"] ==
"")
733 $mep_tree =& $this->
object->getTree();
734 $expanded = $mep_tree->readRootId();
738 $expanded =
$_GET[
"mepexpand"];
741 $exp->setExpand($expanded);
745 $output = $exp->getOutput();
767 if (!$ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
769 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
772 $this->tpl =&
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
773 include_once(
"Services/Style/classes/class.ilObjStyleSheet.php");
775 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
786 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
797 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
798 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
803 $mode = (
$_GET[
"cmd"] !=
"showMedia")
808 $this->ctrl->getLinkTarget($this,
"showFullscreen",
"",
false,
false);
809 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
810 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' => $fullscreen_link,
811 'ref_id' =>
$_GET[
"ref_id"],
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
812 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
816 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
818 $this->tpl->parseCurrentBlock();
837 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
839 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
844 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
852 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.confirm_deletion.html",
"Modules/MediaPool");
856 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
859 $this->tpl->setCurrentBlock(
"table_header");
860 $this->tpl->setVariable(
"TEXT",$this->lng->txt(
"objects"));
861 $this->tpl->parseCurrentBlock();
873 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
875 if (count($usages) > 0)
878 $ilCtrl->redirect($this,
"listMedia");
882 $this->tpl->setCurrentBlock(
"table_row");
884 $this->tpl->setVariable(
"TEXT_CONTENT",
$title);
886 $this->tpl->parseCurrentBlock();
891 $buttons = array(
"cancelRemove" => $this->lng->txt(
"cancel"),
892 "remove" => $this->lng->txt(
"confirm"));
893 foreach ($buttons as
$name => $value)
895 $this->tpl->setCurrentBlock(
"operation_btn");
896 $this->tpl->setVariable(
"BTN_NAME",
$name);
897 $this->tpl->setVariable(
"BTN_VALUE",$value);
898 $this->tpl->parseCurrentBlock();
910 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
912 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
915 $ilCtrl->setParameterByClass(
"ileditclipboardgui",
"returnCommand",
916 rawurlencode($ilCtrl->getLinkTarget($this,
917 "insertFromClipboard",
"",
false,
false)));
918 $ilCtrl->redirectByClass(
"ilEditClipboardGUI",
"getObject");
929 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
931 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
934 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
936 $not_inserted = array();
939 foreach ($ids as $id2)
941 $id = explode(
":", $id2);
947 if (ilObjMEdiaPool::isForeignIdInTree($this->object->getId(), $id))
955 $item->setType(
"mob");
956 $item->setForeignId($id);
959 if ($item->getId() > 0)
961 $this->
object->insertInTree($item->getId(),
$_GET[
"mepitem_id"]);
967 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
968 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
969 if (ilObjMEdiaPool::isItemIdInTree($this->object->getId(), $id))
980 $item->setType(
"pg");
983 if ($item->getId() > 0)
985 $this->
object->insertInTree($item->getId(),
$_GET[
"mepitem_id"]);
988 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
990 $page->setId($item->getId());
994 $page->setXMLContent($original->copyXMLContent());
1002 if (count($not_inserted) > 0)
1005 implode($not_inserted,
"<br>"),
true);
1007 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1016 session_unregister(
"ilMepRemove");
1017 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1027 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1029 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
1034 $this->
object->deleteChild($obj_id);
1038 session_unregister(
"ilMepRemove");
1039 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1048 global $ilUser, $ilAccess;
1055 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1061 if (
$type ==
"fold")
1064 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1067 foreach (
$_POST[
"id"] as $obj_id)
1073 $ilUser->addObjectToClipboard($fid,
"mob",
"");
1077 $ilUser->addObjectToClipboard($obj_id,
"incl",
"");
1081 $this->ctrl->redirect($this,
$_GET[
"mep_mode"] ?
$_GET[
"mep_mode"] :
"listMedia");
1093 $tree =& $this->
object->getTree();
1095 ?
$tree->getRootId()
1096 :
$_GET[
"mepitem_id"];
1098 foreach(
$path as $node)
1100 if ($node[
"child"] ==
$tree->getRootId())
1102 $this->ctrl->setParameter($this,
"mepitem_id",
"");
1103 $link = $this->ctrl->getLinkTarget($this,
"listMedia");
1104 $title = $this->
object->getTitle();
1105 $this->ctrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1106 $ilLocator->addItem(
$title, $link,
"",
$_GET[
"ref_id"]);
1110 $this->ctrl->setParameter($this,
"mepitem_id", $node[
"child"]);
1111 $link = $this->ctrl->getLinkTarget($this,
"listMedia");
1113 $this->ctrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1114 $ilLocator->addItem(
$title, $link);
1129 global $ilAccess,
$tpl;
1131 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1133 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
1137 $tpl->setContent($this->form->getHTML());
1159 $tpl->setContent($this->form->getHTML());
1171 $this->form->setValuesByArray($values);
1182 if ($this->form->checkInput())
1184 if ($this->object->createFolder(
$_POST[
"title"], (
int)
$_GET[
"mepitem_id"]))
1188 $ilCtrl->redirect($this,
"listMedia");
1191 $this->form->setValuesByPost();
1192 $tpl->setContent($this->form->getHtml());
1203 if ($this->form->checkInput())
1206 $item->setTitle(
$_POST[
"title"]);
1209 $ilCtrl->setParameter($this,
"mepitem_id",
1210 $this->object->getTree()->getParentId(
$_GET[
"mepitem_id"]));
1211 $ilCtrl->redirect($this,
"listMedia");
1214 $this->form->setValuesByPost();
1215 $tpl->setContent($this->form->getHtml());
1227 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1233 $ti->setRequired(
true);
1234 $this->form->addItem($ti);
1237 if ($a_mode ==
"create")
1239 $this->form->addCommandButton(
"saveFolder", $lng->txt(
"save"));
1240 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
1241 $this->form->setTitle($lng->txt(
"mep_new_folder"));
1245 $this->form->addCommandButton(
"updateFolder", $lng->txt(
"save"));
1246 $this->form->addCommandButton(
"cancelFolderUpdate", $lng->txt(
"cancel"));
1247 $this->form->setTitle($lng->txt(
"mep_edit_folder"));
1250 $this->form->setFormAction($ilCtrl->getFormAction($this));
1259 $ilCtrl->setParameter($this,
"mepitem_id",
1260 $this->object->getTree()->getParentId(
$_GET[
"mepitem_id"]));
1261 $ilCtrl->redirect($this,
"listMedia");
1270 $ilCtrl->redirect($this,
"listMedia");
1284 $tpl->setContent($this->form->getHTML());
1299 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1301 $mep_page_gui->getTabs();
1305 $tpl->setContent($this->form->getHTML());
1316 if ($this->form->checkInput())
1319 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1321 $item->setTitle(
$_POST[
"title"]);
1322 $item->setType(
"pg");
1325 if ($item->getId() > 0)
1328 $tree = $this->
object->getTree();
1329 $parent =
$_GET[
"mepitem_id"] > 0
1330 ?
$_GET[
"mepitem_id"]
1331 :
$tree->getRootId();
1332 $this->
object->insertInTree($item->getId(), $parent);
1335 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1337 $page->setId($item->getId());
1342 $ilCtrl->redirect($this,
"listMedia");
1345 $this->form->setValuesByPost();
1346 $tpl->setContent($this->form->getHtml());
1357 if ($this->form->checkInput())
1360 $item->setTitle(
$_POST[
"title"]);
1363 $ilCtrl->redirect($this,
"editMediaPoolPage");
1366 $this->form->setValuesByPost();
1367 $tpl->setContent($this->form->getHtml());
1378 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1384 $ti->setRequired(
true);
1385 $this->form->addItem($ti);
1388 if ($a_mode ==
"create")
1390 $this->form->addCommandButton(
"saveMediaPoolPage", $lng->txt(
"save"));
1391 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
1392 $this->form->setTitle($lng->txt(
"mep_new_content_snippet"));
1396 $this->form->addCommandButton(
"updateMediaPoolPage", $lng->txt(
"save"));
1397 $this->form->setTitle($lng->txt(
"mep_edit_content_snippet"));
1400 $this->form->setFormAction($ilCtrl->getFormAction($this));
1410 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
1413 $this->form->setValuesByArray($values);
1426 $ilTabs->clearTargets();
1429 $ilTabs->addTarget(
"mep_page_properties", $ilCtrl->getLinkTarget($this,
"editMediaPoolPage"),
1430 "editMediaPoolPage", get_class($this));
1431 $ilTabs->addTarget(
"cont_usage", $ilCtrl->getLinkTarget($this,
"showMediaPoolPageUsages"),
1432 "showMediaPoolPageUsages", get_class($this));
1433 $ilCtrl->setParameter($this,
"mepitem_id", $this->object->tree->getParentId(
$_GET[
"mepitem_id"]));
1434 $ilTabs->setBackTarget($lng->txt(
"mep_folder"), $ilCtrl->getLinkTarget($this,
"listMedia"));
1435 $ilCtrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1447 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1449 $mep_page_gui->getTabs();
1451 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1454 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageUsagesTableGUI.php");
1457 $tpl->setContent($table->getHTML());
1471 global $ilAccess, $ilTabs,
$ilCtrl;
1473 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id) ||
1474 $ilAccess->checkAccess(
'write',
'', $this->ref_id))
1476 $ilTabs->addTarget(
"objs_fold", $this->ctrl->getLinkTarget($this,
""),
1477 "listMedia",
"",
"_top");
1479 $ilCtrl->setParameter($this,
"mepitem_id",
"");
1480 $ilTabs->addTarget(
"mep_all_mobs", $this->ctrl->getLinkTarget($this,
"allMedia"),
1481 "allMedia",
"",
"_top");
1482 $ilCtrl->setParameter($this,
"mepitem_id",
$_GET[
"mepitem_id"]);
1486 if ($ilAccess->checkAccess(
'visible',
'', $this->ref_id))
1488 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
1489 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
1493 $ilTabs->addTarget(
"info_short",
1494 $this->ctrl->getLinkTargetByClass(
1495 array(
"ilobjmediapoolgui",
"ilinfoscreengui"),
"showSummary"),
1496 array(
"showSummary",
"infoScreen"),
1497 "",
"", $force_active);
1500 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1502 $ilTabs->addTarget(
"settings", $this->ctrl->getLinkTarget($this,
"edit"),
1503 "edit", array(
"",
"ilobjmediapoolgui"));
1506 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1508 $ilTabs->addTarget(
"clipboard", $this->ctrl->getLinkTarget($this,
"openClipboard"),
1509 "view",
"ileditclipboardgui");
1512 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1514 $ilTabs->addTarget(
"export", $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1518 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->object->getRefId()))
1520 $ilTabs->addTarget(
"perm_settings",
1521 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1534 $targets = explode(
'_',$a_target);
1535 if(count((array) $targets) > 1)
1538 $subitem_id = $targets[1];
1545 if ($ilAccess->checkAccess(
"read",
"",
$ref_id))
1547 $_GET[
"cmd"] =
"frameset";
1548 $_GET[
"baseClass"] =
"ilMediaPoolPresentationGUI";
1550 $_GET[
'mepitem_id'] = $subitem_id;
1551 include(
"ilias.php");
1554 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1556 $_GET[
"cmd"] =
"frameset";
1557 $_GET[
"target"] =
"";
1558 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1561 include(
"repository.php");
1565 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1575 $this->ctrl->setCmd(
"showSummary");
1576 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1587 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
1589 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1592 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1595 $info->enablePrivateNotes();
1597 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
1604 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1618 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
1621 $this->ctrl->forwardCommand($info);