4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
6 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
7 include_once
'./Services/Container/classes/class.ilContainerSorting.php';
8 include_once
'./Services/Container/classes/class.ilContainer.php';
9 include_once
'./Services/Container/classes/class.ilContainerSorting.php';
10 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
33 public function __construct($a_parent_obj,$a_parent_cmd,$a_sorting =
false)
40 if($ilAccess->checkAccess(
'write',
'',$this->getParentObject()->object->getRefId()))
42 $this->editable =
true;
49 $this->
setTitle($lng->txt(
'web_resources'));
56 $this->
addColumn($lng->txt(
'position'),
'',
'10px');
57 $this->
addColumn($lng->txt(
'title'),
'',
'90%');
64 $this->
addColumn($lng->txt(
'title'),
'',
'90%');
71 $this->
addColumn($lng->txt(
'title'),
'',
'100%');
77 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
78 $this->
setRowTemplate(
"tpl.webr_link_row.html",
'Modules/WebResource');
91 $this->link_sort_enabled = $a_status;
116 foreach($items as $link)
124 $tmp[
'position'] = $counter++;
125 $tmp[
'title'] = $link[
'title'];
126 $tmp[
'description'] = $link[
'description'];
127 $tmp[
'target'] = $link[
'target'];
128 $tmp[
'link_id'] = $link[
'link_id'];
142 $ilCtrl->setParameterByClass(get_class($this->
getParentObject()),
'link_id', $a_set[
'link_id']);
144 $this->tpl->setVariable(
'TITLE',$a_set[
'title']);
145 if(strlen($a_set[
'description']))
147 $this->tpl->setVariable(
'DESCRIPTION',$a_set[
'description']);
150 $this->tpl->setVariable(
'TARGET',
151 $ilCtrl->getLinkTarget($this->parent_obj,
"callLink"));
160 $this->tpl->setVariable(
'VAL_POS',sprintf(
'%.2f',$a_set[
'position']));
161 $this->tpl->setVariable(
'VAL_ITEM',$a_set[
'link_id']);
165 $actions->setSelectionHeaderClass(
"small");
166 $actions->setItemLinkClass(
"xsmall");
168 $actions->setListTitle($lng->txt(
'actions'));
169 $actions->setId($a_set[
'link_id']);
174 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'editLink')
177 $lng->txt(
'webr_deactivate'),
179 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'deactivateLink')
184 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'confirmDeleteLink')
186 $this->tpl->setVariable(
'ACTION_HTML',$actions->getHTML());