4 define (
"IL_LIST_AS_TRIGGER",
"trigger");
5 define (
"IL_LIST_FULL",
"full");
7 include_once
'payment/classes/class.ilGeneralSettings.php';
77 $this->rbacsystem = $rbacsystem;
78 $this->ilias = $ilias;
82 $this->path_enabled =
false;
87 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
100 $this->container_obj =& $container_obj;
112 return $this->container_obj;
124 $this->static_link_enabled =
true;
125 $this->delete_enabled =
true;
126 $this->cut_enabled =
true;
127 $this->subscribe_enabled =
true;
128 $this->link_enabled =
false;
129 $this->copy_enabled =
false;
130 $this->payment_enabled =
false;
131 $this->progress_enabled =
false;
132 $this->notice_properties_enabled =
true;
133 $this->info_screen_enabled =
false;
135 $this->gui_class_name =
"";
138 include_once(
'class.ilObjectAccess.php');
151 $this->properties_enabled = $a_status;
173 $this->preconditions_enabled = $a_status;
191 $this->notice_properties_enabled = $a_status;
213 $this->description_enabled = $a_status;
247 $this->search_fragment_enabled = $a_status;
259 $this->path_linked = $a_status;
277 $this->enabled_relevance = $a_status;
287 $this->relevance = $a_rel;
307 $this->icons_enabled = $a_status;
327 $this->checkboxes_enabled = $a_status;
347 $this->expand_enabled = $a_status;
362 $this->is_expanded = $a_status;
377 $this->position_enabled =
true;
378 $this->position_field_index = $a_field_index;
379 $this->position_value = $a_position_value;
390 $this->delete_enabled = $a_status;
402 return $this->delete_enabled;
413 $this->cut_enabled = $a_status;
424 return $this->cut_enabled;
435 $this->copy_enabled = $a_status;
457 $this->subscribe_enabled = $a_status;
468 return $this->subscribe_enabled;
478 $this->payment_enabled = $a_status;
489 return $this->payment_enabled;
499 $this->link_enabled = $a_status;
510 return $this->link_enabled;
521 $this->path_enabled = $a_path;
531 return $this->path_enabled;
542 $this->commands_enabled = $a_status;
543 $this->std_cmd_only = $a_std_only;
563 $this->info_screen_enabled = $a_info_screen;
573 $this->sub_item_html[] = $a_html;
595 $this->progress_enabled = $a_status;
619 $this->substitutions_enabled = $a_status;
643 $this->item_detail_links_enabled = $a_status;
666 $this->item_detail_links = $a_detail_links;
667 $this->item_detail_links_intro = $a_intro_txt;
679 if(!count($this->item_detail_links))
683 if(strlen($this->item_detail_links_intro))
685 $this->tpl->setCurrentBlock(
'item_detail_intro');
686 $this->tpl->setVariable(
'ITEM_DETAIL_INTRO_TXT',$this->item_detail_links_intro);
687 $this->tpl->parseCurrentBlock();
690 foreach($this->item_detail_links as $info)
692 $this->tpl->setCurrentBlock(
'item_detail_link');
693 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_TARGET',$info[
'target']);
694 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_DESC',$info[
'desc']);
695 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_HREF',$info[
'link']);
696 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_NAME',$info[
'name']);
697 $this->tpl->parseCurrentBlock();
699 $this->tpl->setCurrentBlock(
'item_detail_links');
700 $this->tpl->parseCurrentBlock();
711 $this->title = $a_title;
730 $this->description = $a_description;
740 return $this->description;
750 $this->search_fragment = $a_text;
769 $this->separate_commands = $a_val;
802 $this->additional_information = $a_val;
824 $this->details_level = $a_level;
845 if (isset($this->access_cache[$a_permission][
"-".$a_cmd][$a_ref_id]))
847 return $this->access_cache[$a_permission][
"-".$a_cmd][$a_ref_id];
849 $access = $ilAccess->checkAccess($a_permission,$a_cmd,$a_ref_id,$a_type,$a_obj_id);
850 if ($ilAccess->getPreventCachingLastResult())
852 $this->prevent_access_caching =
true;
854 $this->access_cache[$a_permission][
"-".$a_cmd][$a_ref_id] = $access;
866 function initItem($a_ref_id, $a_obj_id, $a_title =
"", $a_description =
"")
868 $this->access_cache = array();
869 $this->ref_id = $a_ref_id;
870 $this->obj_id = $a_obj_id;
873 #$this->description = $a_description;
876 $this->adm_commands_included =
false;
877 $this->prevent_access_caching =
false;
891 if($this->static_link_enabled)
893 include_once(
'classes/class.ilLink.php');
919 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
922 require_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
929 return $davServer->getMountURI($this->ref_id).
930 '" folder="'.$davServer->getFolderURI($this->ref_id);
935 return 'repository.php?ref_id='.$this->getCommandId().
'&cmd='.$a_cmd;
938 $cmd_link = $this->ctrl->getLinkTargetByClass($this->gui_class_name,
956 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
999 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1002 require_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
1003 global $ilias,
$lng;
1006 require_once(
'Services/WebDAV/classes/class.ilDAVLocks.php');
1008 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1010 $locks =& $davLocks->getLocksOnObjectObj($this->obj_id);
1011 if (count($locks) > 0)
1013 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
1017 "property" => $lng->txt(
"in_use_by"),
1018 "value" => $lockUser->getLogin(),
1019 "link" =>
"./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI',
1031 if (preg_match(
'/^(\\.|\\.\\.)$/', $this->title))
1033 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_interoperability"),
1034 "value" => $lng->txt(
"filename_special_filename"),
1035 'propertyNameVisible' =>
false);
1037 else if (preg_match(
'/^\\./', $this->title))
1039 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_visibility"),
1040 "value" => $lng->txt(
"filename_hidden_unix_file"),
1041 'propertyNameVisible' =>
false);
1043 else if (preg_match(
'/~$/', $this->title))
1045 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_visibility"),
1046 "value" => $lng->txt(
"filename_hidden_backup_file"),
1047 'propertyNameVisible' =>
false);
1049 else if (preg_match(
'/[\\/]/', $this->title))
1051 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_interoperability"),
1052 "value" => $lng->txt(
"filename_special_characters"),
1053 'propertyNameVisible' =>
false);
1055 else if (preg_match(
'/[\\\\\\/:*?"<>|]/', $this->title))
1057 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_interoperability"),
1058 "value" => $lng->txt(
"filename_windows_special_characters"),
1059 'propertyNameVisible' =>
false);
1061 else if (preg_match(
'/\\.$/', $this->title))
1063 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_interoperability"),
1064 "value" => $lng->txt(
"filename_windows_empty_extension"),
1065 'propertyNameVisible' =>
false);
1067 else if (preg_match(
'/^(\\.|\\.\\.)$/', $this->title))
1069 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_interoperability"),
1070 "value" => $lng->txt(
"filename_special_filename"),
1071 'propertyNameVisible' =>
false);
1073 else if (preg_match(
'/#/', $this->title))
1075 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"filename_interoperability"),
1076 "value" => $lng->txt(
"filename_windows_webdav_issue"),
1077 'propertyNameVisible' =>
false);
1082 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1085 global $ilias,
$lng, $ilUser;
1086 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1092 $isContainer = in_array($this->type, array(
'cat',
'fold',
'crs',
'grp'));
1098 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"event"),
1099 "value" => $lng->txt(
'state_changed_inside'),
1100 'propertyNameVisible' =>
false);
1108 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"event"),
1109 "value" => $lng->txt(($state == 1) ?
'state_unread' :
'state_changed'),
1110 'propertyNameVisible' =>
false);
1124 $a_alert =
false, $a_newline =
false)
1126 $this->cust_prop[] = array(
"property" => $a_property,
"value" => $a_value,
1127 "alert" => $a_alert,
"newline" => $a_newline);
1135 if (is_array($this->cust_prop))
1137 foreach($this->cust_prop as $prop)
1150 $this->notice_prop = array();
1151 if($infos = $this->ldap_mapping->getInfoStrings($this->obj_id,
true))
1153 foreach($infos as $info)
1155 $this->notice_prop[] = array(
'value' => $info);
1158 return $this->notice_prop ? $this->notice_prop : array();
1165 $this->cust_commands[] =
1166 array(
"link" => $a_link,
"lang_var" => $a_lang_var,
1167 "frame" => $a_frame);
1198 $ref_commands = array();
1199 foreach($this->commands as
$command)
1201 $permission = $command[
"permission"];
1202 $cmd = $command[
"cmd"];
1203 $lang_var = $command[
"lang_var"];
1204 $txt = $command[
"txt"];
1209 if ($ilias->account->getId() == ANONYMOUS_USER_ID &&
1210 $command[
'enable_anonymous'] ==
'false')
1218 $ilBench->start(
"ilObjectListGUI",
"4110_get_commands_check_access");
1221 $ilBench->stop(
"ilObjectListGUI",
"4110_get_commands_check_access");
1228 $access_granted =
true;
1232 $access_granted =
false;
1233 $info_object = $ilAccess->getInfo();
1236 $ref_commands[] = array(
1237 "permission" => $permission,
1239 "link" => $cmd_link,
1240 "frame" => $cmd_frame,
1241 "lang_var" => $lang_var,
1243 "granted" => $access_granted,
1244 "access_info" => $info_object,
1245 "img" => $cmd_image,
1246 "default" => $command[
"default"]
1250 return $ref_commands;
1278 $this->tpl->setCurrentBlock(
"item_title");
1279 $this->tpl->setVariable(
"TXT_TITLE", $this->
getTitle());
1280 $this->tpl->parseCurrentBlock();
1284 if ($this->default_command[
"frame"] !=
"")
1286 $this->tpl->setCurrentBlock(
"title_linked_frame");
1287 $this->tpl->setVariable(
"TARGET_TITLE_LINKED", $this->default_command[
"frame"]);
1288 $this->tpl->parseCurrentBlock();
1292 #var_dump("<pre>",$this->default_command['link'],"</pre>");
1293 $this->default_command[
"link"] =
1296 #var_dump("<pre>",$this->default_command['link'],"</pre>");
1300 $this->tpl->setCurrentBlock(
"item_title_linked");
1301 $this->tpl->setVariable(
"TXT_TITLE_LINKED", $this->
getTitle());
1302 $this->tpl->setVariable(
"HREF_TITLE_LINKED", $this->default_command[
"link"]);
1303 $this->tpl->parseCurrentBlock();
1306 if ($this->bold_title ==
true)
1308 $this->tpl->touchBlock(
'bold_title_start');
1309 $this->tpl->touchBlock(
'bold_title_end');
1321 $fields_shown =
false;
1322 foreach($this->substitutions->getParsedSubstitutions($this->ref_id,$this->obj_id) as
$data)
1326 $data[
'name'] =
'<strong>'.$data[
'name'].
'</strong>';
1327 $data[
'value'] =
'<strong>'.$data[
'value'].
'</strong>';
1329 $this->tpl->touchBlock(
"std_prop");
1330 $this->tpl->setCurrentBlock(
'item_property');
1331 if(
$data[
'show_field'])
1333 $this->tpl->setVariable(
'TXT_PROP',
$data[
'name']);
1335 $this->tpl->setVariable(
'VAL_PROP',
$data[
'value']);
1336 $this->tpl->parseCurrentBlock();
1338 if(
$data[
'newline'])
1340 $this->tpl->touchBlock(
'newline_prop');
1342 $fields_shown =
false;
1347 $this->tpl->touchBlock(
'newline_prop');
1364 if(!$this->substitutions->isDescriptionEnabled())
1370 $this->tpl->setCurrentBlock(
"item_description");
1372 $this->tpl->parseCurrentBlock();
1383 $this->tpl->setCurrentBlock(
'search_fragment');
1384 $this->tpl->setVariable(
'TXT_SEARCH_FRAGMENT',$this->
getSearchFragment().
' ...');
1385 $this->tpl->parseCurrentBlock();
1404 $width2 = (int) (100 - $width1);
1406 $this->tpl->setCurrentBlock(
'relevance');
1407 #$this->tpl->setVariable('TXT_RELEVANCE',$lng->txt('search_relevance'));
1408 $this->tpl->setVariable(
'VAL_REL',sprintf(
"%.02f %%",$this->
getRelevance()));
1409 $this->tpl->setVariable(
'WIDTH_A',$width1);
1410 $this->tpl->setVariable(
'WIDTH_B',$width2);
1413 $this->tpl->parseCurrentBlock();
1424 $this->mode = $a_mode;
1442 $this->condition_depth = $a_depth;
1454 if ($a_mode == $this->mode)
1471 global $ilAccess,
$lng;
1478 if ($this->ilias->account->getId() == ANONYMOUS_USER_ID)
1480 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id, $this->type, $this->obj_id))
1482 $props[] = array(
"alert" =>
true,
1483 "value" => $lng->txt(
"no_access_item_public"),
1489 if (is_array($props) && count($props) > 0)
1491 foreach($props as $prop)
1496 $this->tpl->touchBlock(
"separator_prop");
1500 if ($prop[
"alert"] ==
true)
1502 $this->tpl->touchBlock(
"alert_prop");
1506 $this->tpl->touchBlock(
"std_prop");
1508 if ($prop[
"newline"] ==
true && $cnt > 1)
1510 $this->tpl->touchBlock(
"newline_prop");
1513 if (isset($prop[
"property"]) && $prop[
'propertyNameVisible'] !==
false)
1516 $this->tpl->setCurrentBlock(
"prop_name");
1517 $this->tpl->setVariable(
"TXT_PROP", $prop[
"property"]);
1518 $this->tpl->parseCurrentBlock();
1520 $this->tpl->setCurrentBlock(
"item_property");
1524 $this->tpl->setVariable(
"LINK_PROP", $prop[
'link']);
1525 $this->tpl->setVariable(
"LINK_VAL_PROP", $prop[
"value"]);
1529 $this->tpl->setVariable(
"VAL_PROP", $prop[
"value"]);
1532 $this->tpl->parseCurrentBlock();
1536 $this->tpl->setCurrentBlock(
"item_properties");
1537 $this->tpl->parseCurrentBlock();
1544 foreach($this->notice_prop as $property)
1546 $this->tpl->setCurrentBlock(
'notice_item');
1547 $this->tpl->setVariable(
'NOTICE_ITEM_VALUE',$property[
'value']);
1548 $this->tpl->parseCurrentBlock();
1550 $this->tpl->setCurrentBlock(
'notice_property');
1551 $this->tpl->parseCurrentBlock();
1562 include_once
'payment/classes/class.ilPaymentObject.php';
1565 $this->payment_enabled &&
1570 $this->ctpl->setCurrentBlock(
'payment');
1572 $this->ctpl->setVariable(
'PAYMENT_ALT_IMG', $this->lng->txt(
'payment_system') .
': ' . $this->lng->txt(
'payment_payed_access'));
1573 $this->ctpl->parseCurrentBlock();
1577 $this->ctpl->setCurrentBlock(
'payment');
1579 $this->ctpl->setVariable(
'PAYMENT_ALT_IMG', $this->lng->txt(
'payment_system') .
': ' . $this->lng->txt(
'payment_in_sc'));
1580 $this->ctpl->parseCurrentBlock();
1586 $this->ctpl->setCurrentBlock(
'payment');
1588 $this->ctpl->setVariable(
'PAYMENT_ALT_IMG', $this->lng->txt(
'payment_system') .
': ' . $this->lng->txt(
'payment_buyable'));
1589 $this->ctpl->parseCurrentBlock();
1598 include_once
'Services/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
1600 $this->current_selection_list->setListTitle($this->lng->txt(
"shop_actions"));
1601 $this->current_selection_list->setId(
"act_".$this->ref_id);
1602 $this->current_selection_list->setSelectionHeaderClass(
"small");
1603 $this->current_selection_list->setItemLinkClass(
"xsmall");
1604 $this->current_selection_list->setLinksMode(
"il_ContainerItemCommand2");
1606 $this->current_selection_list->setUseImages(
false);
1607 $this->current_selection_list->setAdditionalToggleElement(
"lg_div_".$this->ref_id,
"ilContainerListItemOuterHighlight");
1609 $commands = $this->
getCommands($this->ref_id, $this->obj_id);
1612 if($command[
'default'] ===
true)
1615 if(is_null($command[
'link']))
1620 $command[
'link'] =
'ilias.php?baseClass=ilSAHSPresentationGUI&ref_id='.$this->ref_id;
1624 $command[
'link'] =
'ilias.php?baseClass=ilLMPresentationGUI&ref_id='.$this->ref_id;
1628 $command[
'link'] =
'repository.php?ref_id='.$this->ref_id;
1634 if(strpos($command[
'link'],
'_'.
$type.
'_') !==
false)
1636 $demo_link = str_replace(
'_'.
$type.
'_',
'_'.$type.
'purchasetypedemo_', $command[
'link']);
1637 $buy_link = str_replace(
'_'.
$type.
'_',
'_'.$type.
'purchasetypebuy_', $command[
'link']);
1641 $demo_link = $command[
'link'].(strpos($command[
'link'],
'?') ===
false ?
'?' :
'&').
'purchasetype=demo';
1642 $buy_link = $command[
'link'].(strpos($command[
'link'],
'?') ===
false ?
'?' :
'&').
'purchasetype=buy';
1645 #$this->current_selection_list->addItem($this->lng->txt('payment_demo'), "", $command['link'].'&purchasetype=demo', $a_img, $this->lng->txt('payment_demo'), $command['frame']);
1646 #$this->current_selection_list->addItem($this->lng->txt('buy'), "", $command['link'].'&purchasetype=buy', $a_img, $this->lng->txt('buy'), $command['frame']);
1647 $this->current_selection_list->addItem($this->lng->txt(
'payment_demo'),
"", $demo_link, $a_img, $this->lng->txt(
'payment_demo'), $command[
'frame']);
1648 $this->current_selection_list->addItem($this->lng->txt(
'buy'),
"", $buy_link, $a_img, $this->lng->txt(
'buy'), $command[
'frame']);
1653 $this->ctrl->clearParametersByClass($this->gui_class_name);
1655 $this->ctpl->setVariable(
"COMMAND_SELECTION_LIST",
1656 $this->current_selection_list->getHTML());
1664 global $ilAccess,
$lng, $objDefinition,$tree;
1666 include_once(
"classes/class.ilConditionHandler.php");
1668 $missing_cond_exist =
false;
1671 if ($this->condition_depth > 0)
1683 for($i = 0; $i < count($conditions); $i++)
1689 foreach($conditions as $condition)
1691 if($tree->isDeleted($condition[
'trigger_ref_id']))
1695 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
1702 $cond_txt = $lng->txt(
"condition_".$condition[
"operator"]).
" ".
1703 $condition[
"value"];
1706 $class = $objDefinition->getClassName($condition[
"trigger_type"]);
1707 $location = $objDefinition->getLocation($condition[
"trigger_type"]);
1712 $missing_cond_exist =
true;
1714 $full_class =
"ilObj".$class.
"ListGUI";
1715 include_once(
$location.
"/class.".$full_class.
".php");
1716 $item_list_gui =
new $full_class($this);
1718 $item_list_gui->enablePath(
true);
1719 $item_list_gui->setConditionDepth($this->condition_depth + 1);
1720 $trigger_html = $item_list_gui->getListItemHTML($condition[
'trigger_ref_id'],
1723 $this->tpl->setCurrentBlock(
"precondition");
1724 if ($trigger_html ==
"")
1726 $trigger_html = $this->lng->txt(
"precondition_not_accessible");
1729 $this->tpl->setVariable(
"TRIGGER_ITEM", $trigger_html);
1730 $this->tpl->parseCurrentBlock();
1733 if ($missing_cond_exist)
1735 $this->tpl->setCurrentBlock(
"preconditions");
1736 $this->tpl->setVariable(
"TXT_PRECONDITIONS", $lng->txt(
"preconditions"));
1737 $this->tpl->parseCurrentBlock();
1753 $this->ctpl->setCurrentBlock(
"item_frame");
1754 $this->ctpl->setVariable(
"TARGET_COMMAND", $a_frame);
1755 $this->ctpl->parseCurrentBlock();
1758 $this->ctpl->setCurrentBlock(
"item_command");
1759 $this->ctpl->setVariable(
"HREF_COMMAND", $a_href);
1760 $this->ctpl->setVariable(
"TXT_COMMAND", $a_text);
1761 $this->ctpl->parseCurrentBlock();
1763 $this->current_selection_list->addItem($a_text,
"", $a_href, $a_img, $a_text, $a_frame);
1775 if ($this->std_cmd_only)
1788 $this->adm_commands_included =
true;
1796 $this->ctrl->setParameter($this->container_obj,
"ref_id",
1797 $this->container_obj->object->getRefId());
1798 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
1799 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"delete");
1800 $this->
insertCommand($cmd_link, $this->lng->txt(
"delete"),
"",
1802 $this->adm_commands_included =
true;
1817 if ($this->std_cmd_only)
1826 global $objDefinition;
1834 $this->adm_commands_included =
true;
1845 $this->ctrl->setParameter($this->container_obj,
"ref_id",
1846 $this->container_obj->object->getRefId());
1847 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
1848 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"link");
1849 $this->
insertCommand($cmd_link, $this->lng->txt(
"link"),
"",
1851 $this->adm_commands_included =
true;
1864 if ($this->std_cmd_only)
1877 $this->adm_commands_included =
true;
1888 $this->ctrl->setParameter($this->container_obj,
"ref_id",
1889 $this->container_obj->object->getRefId());
1890 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
1891 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"cut");
1892 $this->
insertCommand($cmd_link, $this->lng->txt(
"move"),
"",
1894 $this->adm_commands_included =
true;
1904 if($this->std_cmd_only)
1911 $this->ctrl->setParameterByClass(
'ilobjectcopygui',
'source_id',$this->
getCommandId());
1912 $cmd_copy = $this->ctrl->getLinkTargetByClass(
'ilobjectcopygui',
'initTargetSelection');
1914 $this->adm_commands_included =
true;
1926 global $ilAccess, $objDefinition;
1928 if ($this->std_cmd_only)
1945 $this->adm_commands_included =
true;
1962 if ($this->std_cmd_only)
1967 if((
int)$ilSetting->get(
'disable_my_offers'))
1974 if ($this->ilias->account->getId() != ANONYMOUS_USER_ID)
2003 if (!$this->ilias->account->isDesktopItem($this->getCommandId(),
$type))
2007 if ($this->
checkCommandAccess(
"read",
"", $this->ref_id, $this->type, $this->obj_id))
2011 $this->ctrl->setParameter($this->container_obj,
"type",
$type);
2012 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2013 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"addToDesk");
2014 $this->
insertCommand($cmd_link, $this->lng->txt(
"to_desktop"),
"",
2023 $this->ctrl->setParameter($this->container_obj,
"type",
$type);
2024 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2025 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"removeFromDesk");
2026 $this->
insertCommand($cmd_link, $this->lng->txt(
"unsubscribe"),
"",
2039 if ($this->std_cmd_only)
2045 $this->
insertCommand($cmd_link, $this->lng->txt(
"info_short"), $cmd_frame,
2066 $id_ref = ($this->reference_ref_id > 0)
2067 ? $this->reference_ref_id
2069 include_once(
"./Services/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2071 $this->current_selection_list->setAsynch($a_use_asynch && !$a_get_asynch_commands);
2072 $this->current_selection_list->setAsynchUrl($a_asynch_url);
2073 $this->current_selection_list->setListTitle($lng->txt(
"actions"));
2074 $this->current_selection_list->setId(
"act_".$id_ref);
2075 $this->current_selection_list->setSelectionHeaderClass(
"small");
2076 $this->current_selection_list->setItemLinkClass(
"xsmall");
2077 $this->current_selection_list->setLinksMode(
"il_ContainerItemCommand2");
2079 $this->current_selection_list->setUseImages(
false);
2080 $this->current_selection_list->setAdditionalToggleElement(
"lg_div_".$id_ref,
"ilContainerListItemOuterHighlight");
2082 include_once
'./payment/classes/class.ilPaymentObject.php';
2084 $this->ctrl->setParameterByClass($this->gui_class_name,
"ref_id", $this->ref_id);
2086 $commands = $this->
getCommands($this->ref_id, $this->obj_id);
2089 $only_default =
false;
2090 if ($a_use_asynch && !$a_get_asynch_commands)
2092 $only_default =
true;
2095 $this->default_command =
false;
2099 if ($command[
"granted"] ==
true )
2101 if (!$command[
"default"] ===
true)
2103 if (!$this->std_cmd_only && !$only_default)
2110 if ($command[
"lang_var"] ==
"edit" && $command[
"img"] ==
"")
2115 $cmd_link = $command[
"link"];
2116 $txt = ($command[
"lang_var"] ==
"")
2118 : $this->lng->txt($command[
"lang_var"]);
2120 $command[
"frame"], $command[
"img"]);
2129 elseif($command[
"default"] ===
true)
2131 $items =& $command[
"access_info"];
2132 foreach ($items as $item)
2145 if (is_array($this->cust_commands))
2147 foreach ($this->cust_commands as $command)
2149 $this->
insertCommand($command[
"link"], $this->lng->txt($command[
"lang_var"]),
2163 if ($this->delete_enabled)
2169 if ($this->link_enabled)
2175 if ($this->cut_enabled)
2181 if ($this->copy_enabled)
2187 if ($this->subscribe_enabled)
2193 if($this->cut_enabled or $this->link_enabled)
2200 $this->ctrl->clearParametersByClass($this->gui_class_name);
2202 if ($a_use_asynch && $a_get_asynch_commands)
2204 return $this->current_selection_list->getHTML(
true);
2207 $this->ctpl->setVariable(
"COMMAND_SELECTION_LIST",
2208 $this->current_selection_list->getHTML());
2217 $script = substr(strrchr($_SERVER[
"PHP_SELF"],
"/"),1);
2219 if (substr($script,0,14) !=
"repository.php" &&
2220 is_int(strpos($a_link,
"repository.php")))
2238 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
2240 $path_gui->enableTextOnly(!$this->path_linked);
2241 $path_gui->setUseImages(
false);
2243 $this->tpl->setCurrentBlock(
"path_item");
2244 $this->tpl->setVariable(
'PATH_ITEM',$path_gui->getPath(ROOT_FOLDER_ID,$this->ref_id));
2245 $this->tpl->parseCurrentBlock();
2247 $this->tpl->setCurrentBlock(
"path");
2248 $this->tpl->setVariable(
"TXT_LOCATION", $lng->txt(
"locator"));
2249 $this->tpl->parseCurrentBlock();
2271 global
$lng, $objDefinition;
2276 $this->tpl->setCurrentBlock(
"check");
2277 $this->tpl->setVariable(
"VAL_ID", $this->
getCommandId());
2278 $this->tpl->parseCurrentBlock();
2283 $this->tpl->setCurrentBlock(
'expand');
2287 $this->ctrl->setParameter($this->container_obj,
'expand',-1 * $this->obj_id);
2288 $this->tpl->setVariable(
'EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj));
2289 $this->ctrl->clearParameters($this->container_obj);
2291 $this->tpl->setVariable(
'EXP_ALT',$this->lng->txt(
'collapse'));
2295 $this->ctrl->setParameter($this->container_obj,
'expand',$this->obj_id);
2296 $this->tpl->setVariable(
'EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj));
2297 $this->ctrl->clearParameters($this->container_obj);
2299 $this->tpl->setVariable(
'EXP_ALT',$this->lng->txt(
'expand'));
2302 $this->tpl->parseCurrentBlock();
2310 $this->tpl->touchBlock(
"i_1");
2312 $this->tpl->setCurrentBlock(
"icon");
2313 if (!$objDefinition->isPlugin($this->getIconImageType()))
2315 $this->tpl->setVariable(
"ALT_ICON", $lng->txt(
"icon").
" ".$lng->txt(
"obj_".$this->
getIconImageType()));
2319 include_once(
"./Services/Component/classes/class.ilPlugin.php");
2320 $this->tpl->setVariable(
"ALT_ICON", $lng->txt(
"icon").
" ".
2324 $this->tpl->setVariable(
"SRC_ICON",
2326 $this->tpl->parseCurrentBlock();
2330 $this->tpl->touchBlock(
"d_".$cnt);
2338 foreach ($this->sub_item_html as $sub_html)
2340 $this->tpl->setCurrentBlock(
"subitem");
2341 $this->tpl->setVariable(
"SUBITEM", $sub_html);
2342 $this->tpl->parseCurrentBlock();
2351 if ($this->position_enabled)
2353 $this->tpl->setCurrentBlock(
"position");
2354 $this->tpl->setVariable(
"POS_ID", $this->position_field_index);
2355 $this->tpl->setVariable(
"POS_VAL", $this->position_value);
2356 $this->tpl->parseCurrentBlock();
2366 return $this->adm_commands_included;
2375 if($this->acache->getLastAccessStatus() ==
"miss" &&
2376 !$this->prevent_access_caching)
2378 $this->acache->storeEntry($ilUser->getId().
":".
$this->ref_id,
2394 $a_use_asynch =
false, $a_get_asynch_commands =
false, $a_asynch_url =
"")
2400 $this->adm_commands_included =
false;
2406 $ilBench->start(
"ilObjectListGUI",
"1000_getListHTML_init$type");
2407 $this->tpl =
new ilTemplate (
"tpl.container_list_item.html",
true,
true,
false,
"DEFAULT",
false,
true);
2408 $this->ctpl =
new ilTemplate (
"tpl.container_list_item_commands.html",
true,
true,
false,
"DEFAULT",
false,
true);
2409 $this->
initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
2410 $ilBench->stop(
"ilObjectListGUI",
"1000_getListHTML_init$type");
2412 if ($a_use_asynch && $a_get_asynch_commands)
2418 include_once(
"./Services/Object/classes/class.ilListItemAccessCache.php");
2420 $cres = $this->acache->getEntry($ilUser->getId().
":".$a_ref_id);
2421 if($this->acache->getLastAccessStatus() ==
"hit")
2423 $this->access_cache = unserialize($cres);
2427 $ilBench->start(
"ilObjectListGUI",
"2000_getListHTML_check_visible");
2431 $ilBench->stop(
"ilObjectListGUI",
"2000_getListHTML_check_visible");
2434 $ilBench->stop(
"ilObjectListGUI",
"2000_getListHTML_check_visible");
2438 $ilBench->start(
"ilObjectListGUI",
"4000_insert_commands");
2439 $this->
insertCommands($a_use_asynch, $a_get_asynch_commands, $a_asynch_url);
2440 $ilBench->stop(
"ilObjectListGUI",
"4000_insert_commands");
2447 $ilBench->start(
"ilObjectListGUI",
"5000_insert_pay");
2449 $ilBench->stop(
"ilObjectListGUI",
"5000_insert_pay");
2461 $this->tpl->setVariable(
"COMMANDS", $this->ctpl->get());
2466 $ilBench->start(
"ilObjectListGUI",
"3000_insert_title_desc");
2475 $ilBench->stop(
"ilObjectListGUI",
"3000_insert_title_desc");
2487 $ilBench->start(
"ilObjectListGUI",
"6000_insert_properties$type");
2492 $ilBench->stop(
"ilObjectListGUI",
"6000_insert_properties$type");
2495 $ilBench->start(
"ilObjectListGUI",
"6500_insert_notice_properties$type");
2500 $ilBench->stop(
"ilObjectListGUI",
"6500_insert_notice_properties$type");
2503 $ilBench->start(
"ilObjectListGUI",
"7000_insert_preconditions");
2508 $ilBench->stop(
"ilObjectListGUI",
"7000_insert_preconditions");
2511 $ilBench->start(
"ilObjectListGUI",
"8000_insert_path");
2513 $ilBench->stop(
"ilObjectListGUI",
"8000_insert_path");
2515 $ilBench->start(
"ilObjectListGUI",
"8500_item_detail_links");
2520 $ilBench->stop(
"ilObjectListGUI",
"8500_item_detail_links");
2532 $this->cust_prop = array();
2533 $this->cust_commands = array();
2534 $this->sub_item_html = array();
2535 $this->position_enabled =
false;
2537 $id_ref = ($this->reference_ref_id > 0)
2538 ? $this->reference_ref_id
2541 $this->tpl->setVariable(
"DIV_ID",
'id = "lg_div_'.$id_ref.
'"');
2544 return $this->tpl->get();
2552 return $this->ctpl->get();
2570 $this->bold_title = $a_bold_title;