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')
 
   83                         $r[
'ref_id']= $node[
'child'];
 
   84                         $r[
'depth'] = $node[
'depth'] - $root[
'depth'];
 
   85                         $r[
'type']      = $node[
'type'];
 
   86                         $r[
'title']     = $node[
'title'];
 
   87                         $r[
'copy']      = $objDefinition->allowCopy($node[
'type']);
 
   88                         $r[
'perm_copy'] = $ilAccess->checkAccess(
'copy',
'',$node[
'child']);
 
   89                         $r[
'link']      = $objDefinition->allowLink($node[
'type']);
 
   90                         $r[
'perm_link'] = 
true;
 
   96                 $rows[] = array(
'last' => 
true);
 
  107                         $this->tpl->setCurrentBlock(
'footer_copy');
 
  108                         $this->tpl->setVariable(
'TXT_COPY_ALL',$this->lng->txt(
'copy_all'));
 
  109                         $this->tpl->parseCurrentBlock();
 
  110                         $this->tpl->setCurrentBlock(
'footer_link');
 
  111                         $this->tpl->setVariable(
'TXT_LINK_ALL',$this->lng->txt(
'link_all'));
 
  112                         $this->tpl->parseCurrentBlock();
 
  113                         $this->tpl->setCurrentBlock(
'footer_omit');
 
  114                         $this->tpl->setVariable(
'TXT_OMIT_ALL',$this->lng->txt(
'omit_all'));
 
  115                         $this->tpl->parseCurrentBlock();
 
  120                 for($i = 0; $i < $s[
'depth']; $i++)
 
  122                         $this->tpl->touchBlock(
'padding');
 
  123                         $this->tpl->touchBlock(
'end_padding');
 
  126                 $this->tpl->setVariable(
'TREE_ALT_IMG',$this->lng->txt(
'obj_'.$s[
'type']));
 
  127                 $this->tpl->setVariable(
'TREE_TITLE',$s[
'title']);
 
  135                 if($s[
'perm_copy'] and $s[
'copy'])
 
  137                         $this->tpl->setCurrentBlock(
'radio_copy');
 
  138                         $this->tpl->setVariable(
'TXT_COPY',$this->lng->txt(
'copy'));
 
  139                         $this->tpl->setVariable(
'NAME_COPY',
'cp_options['.$s[
'ref_id'].
'][type]');
 
  141                         $this->tpl->setVariable(
'ID_COPY',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_copy');
 
  142                         $this->tpl->setVariable(
'COPY_CHECKED',
'checked="checked"');
 
  143                         $this->tpl->parseCurrentBlock();
 
  147                         $this->tpl->setCurrentBlock(
'missing_copy_perm');
 
  148                         $this->tpl->setVariable(
'TXT_MISSING_COPY_PERM',$this->lng->txt(
'missing_perm'));
 
  149                         $this->tpl->parseCurrentBlock();
 
  154                 if($s[
'perm_link'] and $s[
'link'])
 
  156                         $this->tpl->setCurrentBlock(
'radio_link');
 
  157                         $this->tpl->setVariable(
'TXT_LINK',$this->lng->txt(
'link'));
 
  158                         $this->tpl->setVariable(
'NAME_LINK',
'cp_options['.$s[
'ref_id'].
'][type]');
 
  160                         $this->tpl->setVariable(
'ID_LINK',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_link');
 
  161                         if(!$s[
'copy'] or !$s[
'perm_copy'])
 
  163                                 $this->tpl->setVariable(
'LINK_CHECKED',
'checked="checked"');
 
  165                         $this->tpl->parseCurrentBlock();
 
  169                         $this->tpl->setCurrentBlock(
'missing_link_perm');
 
  170                         $this->tpl->setVariable(
'TXT_MISSING_LINK_PERM',$this->lng->txt(
'missing_perm'));
 
  171                         $this->tpl->parseCurrentBlock();
 
  175                 $this->tpl->setCurrentBlock(
'omit_radio');
 
  176                 $this->tpl->setVariable(
'TXT_OMIT',$this->lng->txt(
'omit'));
 
  177                 $this->tpl->setVariable(
'NAME_OMIT',
'cp_options['.$s[
'ref_id'].
'][type]');
 
  179                 $this->tpl->setVariable(
'ID_OMIT',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_omit');
 
  180                 if((!$s[
'copy'] or !$s[
'perm_copy']) and (!$s[
'link']))
 
  182                         $this->tpl->setVariable(
'OMIT_CHECKED',
'checked="checked"');
 
  184                 $this->tpl->parseCurrentBlock();