22 $this->parent_gui = $a_parent_gui;
23 $this->parent_cmd = $a_parent_cmd;
34 if (!is_array($a_ids) || count($a_ids) == 0)
41 $a_ids = array_unique((array) $a_ids);
43 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
46 if(!$a_supress_message)
48 $msg = $lng->txt(
"info_delete_sure");
50 if (!$ilSetting->get(
'enable_trash'))
52 $msg .=
"<br/>".$lng->txt(
"info_delete_warning_no_trash");
55 $cgui->setHeaderText($msg);
57 $cgui->setFormAction($ilCtrl->getFormAction($this->parent_gui));
58 $cgui->setCancel($lng->txt(
"cancel"),
"cancelDelete");
59 $cgui->setConfirm($lng->txt(
"confirm"),
"confirmedDelete");
61 $form_name =
"cgui_".md5(uniqid());
62 $cgui->setFormName($form_name);
70 $alt = ($objDefinition->isPlugin($type))
72 : $lng->txt(
"icon").
" ".$lng->txt(
"obj_".$type);
76 $cgui->addItem(
"id[]", $ref_id,
$title,
84 if (is_array($deps) && count($deps) > 0)
86 include_once(
"./Services/Repository/classes/class.ilRepDependenciesTableGUI.php");
88 $deps_html =
"<br/><br/>".$tab->getHTML();
91 $tpl->setContent($cgui->getHTML().$deps_html);
105 global
$lng, $ilAccess, $tree;
110 if(
sizeof($all_refs) > 1)
112 $lng->loadLanguageModule(
"rep");
117 foreach($all_refs as $mref_id)
120 if($mref_id != $a_ref_id && !$tree->isDeleted($mref_id))
122 if($ilAccess->checkAccess(
"read",
"", $mref_id))
125 if($ilAccess->checkAccess(
"delete",
"", $mref_id))
131 $items[] = array(
"id" => $mref_id,
132 "path" => array_shift($this->
buildPath(array($mref_id))),
133 "delete" => $may_delete);
145 $tpl =
new ilTemplate(
"tpl.rep_multi_ref.html",
true,
true,
"Services/Repository");
147 $tpl->setVariable(
"TXT_INTRO", $lng->txt(
"rep_multiple_reference_deletion_intro"));
151 $tpl->setVariable(
"TXT_INSTRUCTION", $lng->txt(
"rep_multiple_reference_deletion_instruction"));
156 $var_name =
"mref_id[]";
158 foreach($items as $item)
162 $tpl->setCurrentBlock(
"cbox");
163 $tpl->setVariable(
"ITEM_NAME", $var_name);
164 $tpl->setVariable(
"ITEM_VALUE", $item[
"id"]);
165 $tpl->parseCurrentBlock();
169 $tpl->setCurrentBlock(
"item_info");
170 $tpl->setVariable(
"TXT_ITEM_INFO", $lng->txt(
"rep_no_permission_to_delete"));
171 $tpl->parseCurrentBlock();
174 $tpl->setCurrentBlock(
"item");
175 $tpl->setVariable(
"ITEM_TITLE", $item[
"path"]);
176 $tpl->parseCurrentBlock();
179 if($may_delete_any > 1)
181 $tpl->setCurrentBlock(
"cbox");
182 $tpl->setVariable(
"ITEM_NAME",
"sall_".$a_ref_id);
183 $tpl->setVariable(
"ITEM_VALUE",
"");
184 $tpl->setVariable(
"ITEM_ADD",
" onclick=\"il.Util.setChecked('".
185 $a_form_name.
"', '".$var_name.
"', document.".$a_form_name.
186 ".sall_".$a_ref_id.
".checked)\"");
187 $tpl->parseCurrentBlock();
189 $tpl->setCurrentBlock(
"item");
190 $tpl->setVariable(
"ITEM_TITLE", $lng->txt(
"select_all"));
191 $tpl->parseCurrentBlock();
197 $tpl->setCurrentBlock(
"add_info");
198 $tpl->setVariable(
"TXT_ADDITIONAL_INFO",
199 sprintf($lng->txt(
"rep_object_references_cannot_be_read"), $counter));
200 $tpl->parseCurrentBlock();
216 $objects = $tree->getSavedNodeData($a_ref_id);
218 if (count($objects) == 0)
223 include_once(
"./Services/Repository/classes/class.ilTrashTableGUI.php");
225 $ttab->setData($objects);
227 $tpl->setContent($ttab->getHTML());
240 if (!is_array($a_ref_ids) || count($a_ref_ids) == 0)
249 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
269 if (!is_array($a_ref_ids) || count($a_ref_ids) == 0)
276 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
280 if ($ilSetting->get(
'enable_trash'))
304 if (!is_array($a_ref_ids) || count($a_ref_ids) == 0)
311 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
337 include_once
'Services/Link/classes/class.ilLink.php';
348 $path_full = $tree->getPathFull($ref_id);
349 foreach($path_full as $idx =>
$data)
353 $path .=
" » ";
355 if($ref_id !=
$data[
'ref_id'])
361 $path .= (
'<a target="_top" href="'.
363 $data[
'title'].
'</a>');
381 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
383 if(!is_array($a_ids))
385 $a_ids = array($a_ids);
389 $cgui->setFormAction($ilCtrl->getFormAction($this->parent_gui));
390 $cgui->setCancel($lng->txt(
"cancel"),
"trash");
391 $cgui->setConfirm($lng->txt(
"confirm"),
"removeFromSystem");
392 $cgui->setFormName(
"trash_confirmation");
393 $cgui->setHeaderText($lng->txt(
"info_delete_sure"));
395 foreach($a_ids as $id)
400 $alt = ($objDefinition->isPlugin($type))
402 : $lng->txt(
"icon").
" ".$lng->txt(
"obj_".$type);
404 $cgui->addItem(
"trash_id[]", $id,
$title,
409 $tpl->setContent($cgui->getHTML());