4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
24 public function __construct($a_parent_class,$a_parent_cmd,$a_type,$a_back_cmd)
29 $this->type = $a_type;
34 $this->
setTitle($this->lng->txt($this->type.
'_wizard_page'));
37 $this->
addColumn($this->lng->txt(
'title'),
'',
'55%');
38 $this->
addColumn($this->lng->txt(
'copy'),
'',
'15%');
39 $this->
addColumn($this->lng->txt(
'link'),
'',
'15%');
40 $this->
addColumn($this->lng->txt(
'omit'),
'',
'15%');
43 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
44 $this->
setRowTemplate(
"tpl.obj_copy_selection_row.html",
"Services/Object");
51 $this->
addCommandButton(
'copyContainer', $this->lng->txt(
'obj_'.$this->type.
'_duplicate'));
71 global $tree,$objDefinition, $ilAccess;
74 foreach($tree->getSubTree($root = $tree->getNodeData($a_source)) as $node)
76 if($node[
'type'] ==
'rolf')
80 if(!$ilAccess->checkAccess(
'visible,read',
'',$node[
'child']))
89 $r[
'ref_id']= $node[
'child'];
90 $r[
'depth'] = $node[
'depth'] - $root[
'depth'];
91 $r[
'type'] = $node[
'type'];
92 $r[
'title'] = $node[
'title'];
93 $r[
'copy'] = $objDefinition->allowCopy($node[
'type']);
94 $r[
'perm_copy'] = $ilAccess->checkAccess(
'copy',
'',$node[
'child']);
95 $r[
'link'] = $objDefinition->allowLink($node[
'type']);
96 $r[
'perm_link'] =
true;
99 if(!trim($r[
'title']) && $r[
'type'] ==
'sess')
102 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
111 $rows[] = array(
'last' =>
true);
122 $this->tpl->setCurrentBlock(
'footer_copy');
123 $this->tpl->setVariable(
'TXT_COPY_ALL',$this->lng->txt(
'copy_all'));
124 $this->tpl->parseCurrentBlock();
125 $this->tpl->setCurrentBlock(
'footer_link');
126 $this->tpl->setVariable(
'TXT_LINK_ALL',$this->lng->txt(
'link_all'));
127 $this->tpl->parseCurrentBlock();
128 $this->tpl->setCurrentBlock(
'footer_omit');
129 $this->tpl->setVariable(
'TXT_OMIT_ALL',$this->lng->txt(
'omit_all'));
130 $this->tpl->parseCurrentBlock();
135 for($i = 0; $i < $s[
'depth']; $i++)
137 $this->tpl->touchBlock(
'padding');
138 $this->tpl->touchBlock(
'end_padding');
141 $this->tpl->setVariable(
'TREE_ALT_IMG',$this->lng->txt(
'obj_'.$s[
'type']));
142 $this->tpl->setVariable(
'TREE_TITLE',$s[
'title']);
150 if($s[
'perm_copy'] and $s[
'copy'])
152 $this->tpl->setCurrentBlock(
'radio_copy');
153 $this->tpl->setVariable(
'TXT_COPY',$this->lng->txt(
'copy'));
154 $this->tpl->setVariable(
'NAME_COPY',
'cp_options['.$s[
'ref_id'].
'][type]');
156 $this->tpl->setVariable(
'ID_COPY',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_copy');
157 $this->tpl->setVariable(
'COPY_CHECKED',
'checked="checked"');
158 $this->tpl->parseCurrentBlock();
162 $this->tpl->setCurrentBlock(
'missing_copy_perm');
163 $this->tpl->setVariable(
'TXT_MISSING_COPY_PERM',$this->lng->txt(
'missing_perm'));
164 $this->tpl->parseCurrentBlock();
169 if($s[
'perm_link'] and $s[
'link'])
171 $this->tpl->setCurrentBlock(
'radio_link');
172 $this->tpl->setVariable(
'TXT_LINK',$this->lng->txt(
'link'));
173 $this->tpl->setVariable(
'NAME_LINK',
'cp_options['.$s[
'ref_id'].
'][type]');
175 $this->tpl->setVariable(
'ID_LINK',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_link');
176 if(!$s[
'copy'] or !$s[
'perm_copy'])
178 $this->tpl->setVariable(
'LINK_CHECKED',
'checked="checked"');
180 $this->tpl->parseCurrentBlock();
184 $this->tpl->setCurrentBlock(
'missing_link_perm');
185 $this->tpl->setVariable(
'TXT_MISSING_LINK_PERM',$this->lng->txt(
'missing_perm'));
186 $this->tpl->parseCurrentBlock();
190 $this->tpl->setCurrentBlock(
'omit_radio');
191 $this->tpl->setVariable(
'TXT_OMIT',$this->lng->txt(
'omit'));
192 $this->tpl->setVariable(
'NAME_OMIT',
'cp_options['.$s[
'ref_id'].
'][type]');
194 $this->tpl->setVariable(
'ID_OMIT',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_omit');
195 if((!$s[
'copy'] or !$s[
'perm_copy']) and (!$s[
'link']))
197 $this->tpl->setVariable(
'OMIT_CHECKED',
'checked="checked"');
199 $this->tpl->parseCurrentBlock();