5 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
28 $this->multiple =
false;
29 $this->page_back_title = $lng->txt(
"cont_back");
30 if (
$_GET[
"returnCommand"] !=
"")
32 $this->mode =
"getObject";
39 $ilCtrl->setParameter($this,
"returnCommand",
40 rawurlencode(
$_GET[
"returnCommand"]));
42 $ilCtrl->saveParameter($this, array(
"clip_item_id"));
52 return array(
"ilObjMediaObjectGUI");
62 $next_class = $ilCtrl->getNextClass($this);
63 $cmd = $ilCtrl->getCmd();
67 case "ilobjmediaobjectgui":
68 $ilCtrl->setReturn($this,
"view");
69 $ilTabs->clearTargets();
70 $ilTabs->setBackTarget($lng->txt(
"back"),
71 $ilCtrl->getLinkTarget($this,
"view"));
74 $ret =& $ilCtrl->forwardCommand($mob_gui);
78 $ilUser->addObjectToClipboard(
$ret->getId(),
"mob",
$ret->getTitle());
79 $ilCtrl->redirect($this,
"view");
97 $this->multiple = $a_multiple;
105 return $this->multiple;
115 $this->insertbuttontitle = $a_insertbuttontitle;
127 if ($this->insertbuttontitle ==
"")
129 return $lng->txt(
"insert");
132 return $this->insertbuttontitle;
142 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
144 $tpl->setCurrentBlock(
"btn_cell");
145 $tpl->setVariable(
"BTN_LINK",
146 $ilCtrl->getLinkTargetByClass(
"ilobjmediaobjectgui",
"create"));
147 $tpl->setVariable(
"BTN_TXT", $lng->txt(
"cont_create_mob"));
148 $tpl->parseCurrentBlock();
150 include_once(
"./Services/Clipboard/classes/class.ilClipboardTableGUI.php");
152 $tpl->setContent($table_gui->getHTML());
161 $this->mode =
"getObject";
176 $ilias->raiseError($lng->txt(
"no_checkbox"),$ilias->error_obj->MESSAGE);
179 foreach(
$_POST[
"id"] AS $obj_id)
181 $id = explode(
":", $obj_id);
184 $ilUser->removeObjectFromClipboard($id[1],
"mob");
185 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
189 if ($id[0] ==
"incl")
191 $ilUser->removeObjectFromClipboard($id[1],
"incl");
194 $ilCtrl->redirect($this,
"view");
207 $ilias->raiseError($lng->txt(
"no_checkbox"),$ilias->error_obj->MESSAGE);
212 if(count(
$_POST[
"id"]) > 1)
214 $ilias->raiseError($lng->txt(
"cont_select_max_one_item"),$ilias->error_obj->MESSAGE);
224 return $_SESSION[
"ilEditClipboard_mob_id"];
235 $tpl->setTitle($lng->txt(
"clipboard"));
244 $this->page_back_title = $a_title;
257 $tabs_gui->setBackTarget($this->page_back_title,
258 $ilCtrl->getParentReturn($this));