Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00036 class ilContainerLinkListGUI
00037 {
00038 var $ctrl;
00039
00044 function ilContainerLinkListGUI()
00045 {
00046 global $ilCtrl;
00047
00048 $this->ctrl =& $ilCtrl;
00049 }
00050
00051 function &executeCommand()
00052 {
00053 $next_class = $this->ctrl->getNextClass($this);
00054 $cmd = $this->ctrl->getCmd();
00055
00056
00057 switch($next_class)
00058 {
00059 default:
00060 $this->$cmd();
00061
00062 break;
00063 }
00064 return true;
00065 }
00066
00067 function show()
00068 {
00069 global $lng, $tree;
00070
00071 $tpl = new ilTemplate("tpl.container_link_help.html", true, true);
00072
00073 $type_ordering = array(
00074 "cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres",
00075 "glo", "webr", "file", "exc",
00076 "tst", "svy", "mep", "qpl", "spl");
00077
00078 $childs = $tree->getChilds($_GET["ref_id"]);
00079 foreach($childs as $child)
00080 {
00081 if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm")))
00082 {
00083 $cnt["lres"]++;
00084 }
00085 else
00086 {
00087 $cnt[$child["type"]]++;
00088 }
00089 }
00090
00091 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
00092 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
00093 foreach($type_ordering as $type)
00094 {
00095 $tpl->setCurrentBlock("row");
00096 $tpl->setVariable("ROWCOL", "tblrow".((($i++)%2)+1));
00097 if ($type != "lres")
00098 {
00099 $tpl->setVariable("TYPE", $lng->txt("objs_".$type).
00100 " (".((int)$cnt[$type]).")");
00101 }
00102 else
00103 {
00104 $tpl->setVariable("TYPE", $lng->txt("learning_resources").
00105 " (".((int)$cnt["lres"]).")");
00106 }
00107 $tpl->setVariable("TXT_LINK", "[list-".$type."]");
00108 $tpl->parseCurrentBlock();
00109 }
00110 $tpl->show();
00111 exit;
00112
00113 }
00114
00115 }
00116 ?>