4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
53 $this->
user = $DIC->user();
54 $this->obj_definition = $DIC[
"objDefinition"];
55 $this->tree = $DIC->repositoryTree();
56 $this->access = $DIC->access();
57 $lng = $DIC->language();
60 $objDefinition = $DIC[
"objDefinition"];
62 parent::__construct($a_parent_class, $a_parent_cmd);
68 $this->
setTitle($this->lng->txt($this->type .
'_wizard_page'));
71 $this->
addColumn($this->lng->txt(
'title'),
'',
'55%');
72 $this->
addColumn($this->lng->txt(
'copy'),
'',
'15%');
73 $this->
addColumn($this->lng->txt(
'link'),
'',
'15%');
74 $this->
addColumn($this->lng->txt(
'omit'),
'',
'15%');
78 $this->
setRowTemplate(
"tpl.obj_copy_selection_row.html",
"Services/Object");
86 $this->
addCommandButton(
'copyContainerToTargets', $this->lng->txt(
'obj_' . $this->type .
'_duplicate'));
87 if ($a_back_cmd ==
"") {
115 foreach (
$tree->getSubTree(
$root =
$tree->getNodeData($a_source)) as $node) {
116 if ($node[
'type'] ==
'rolf') {
119 if (!$ilAccess->checkAccess(
'visible',
'', $node[
'child'])) {
126 $r[
'source'] = $first;
127 $r[
'ref_id'] = $node[
'child'];
128 $r[
'depth'] = $node[
'depth'] -
$root[
'depth'];
129 $r[
'type'] = $node[
'type'];
130 $r[
'title'] = $node[
'title'];
131 $r[
'copy'] = $objDefinition->allowCopy($node[
'type']);
132 $r[
'perm_copy'] = $ilAccess->checkAccess(
'copy',
'', $node[
'child']);
133 $r[
'link'] = $objDefinition->allowLink($node[
'type']);
134 $r[
'perm_link'] =
true;
137 if (!trim(
$r[
'title']) &&
$r[
'type'] ==
'sess') {
139 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
148 $rows[] = array(
'last' =>
true);
158 $this->tpl->setCurrentBlock(
'footer_copy');
159 $this->tpl->setVariable(
'TXT_COPY_ALL', $this->lng->txt(
'copy_all'));
160 $this->tpl->parseCurrentBlock();
161 $this->tpl->setCurrentBlock(
'footer_link');
162 $this->tpl->setVariable(
'TXT_LINK_ALL', $this->lng->txt(
'link_all'));
163 $this->tpl->parseCurrentBlock();
164 $this->tpl->setCurrentBlock(
'footer_omit');
165 $this->tpl->setVariable(
'TXT_OMIT_ALL', $this->lng->txt(
'omit_all'));
166 $this->tpl->parseCurrentBlock();
171 for (
$i = 0;
$i <
$s[
'depth'];
$i++) {
172 $this->tpl->touchBlock(
'padding');
173 $this->tpl->touchBlock(
'end_padding');
175 $this->tpl->setVariable(
'TREE_IMG', ilObject::_getIcon(
ilObject::_lookupObjId($s[
'ref_id']),
"tiny", $s[
'type']));
176 $this->tpl->setVariable(
'TREE_ALT_IMG', $this->lng->txt(
'obj_' . $s[
'type']));
177 $this->tpl->setVariable(
'TREE_TITLE', $s[
'title']);
184 if ($s[
'perm_copy']
and $s[
'copy']) {
185 $this->tpl->setCurrentBlock(
'radio_copy');
186 $this->tpl->setVariable(
'TXT_COPY', $this->lng->txt(
'copy'));
187 $this->tpl->setVariable(
'NAME_COPY',
'cp_options[' . $s[
'ref_id'] .
'][type]');
189 $this->tpl->setVariable(
'ID_COPY', $s[
'depth'] .
'_' . $s[
'type'] .
'_' . $s[
'ref_id'] .
'_copy');
190 $this->tpl->setVariable(
'COPY_CHECKED',
'checked="checked"');
191 $this->tpl->parseCurrentBlock();
192 } elseif ($s[
'copy']) {
193 $this->tpl->setCurrentBlock(
'missing_copy_perm');
194 $this->tpl->setVariable(
'TXT_MISSING_COPY_PERM', $this->lng->txt(
'missing_perm'));
195 $this->tpl->parseCurrentBlock();
200 if ($s[
'perm_link']
and $s[
'link']) {
201 $this->tpl->setCurrentBlock(
'radio_link');
202 $this->tpl->setVariable(
'TXT_LINK', $this->lng->txt(
'link'));
203 $this->tpl->setVariable(
'NAME_LINK',
'cp_options[' . $s[
'ref_id'] .
'][type]');
205 $this->tpl->setVariable(
'ID_LINK', $s[
'depth'] .
'_' . $s[
'type'] .
'_' . $s[
'ref_id'] .
'_link');
206 if (!$s[
'copy']
or !$s[
'perm_copy']) {
207 $this->tpl->setVariable(
'LINK_CHECKED',
'checked="checked"');
209 $this->tpl->parseCurrentBlock();
210 } elseif ($s[
'link']) {
211 $this->tpl->setCurrentBlock(
'missing_link_perm');
212 $this->tpl->setVariable(
'TXT_MISSING_LINK_PERM', $this->lng->txt(
'missing_perm'));
213 $this->tpl->parseCurrentBlock();
217 $this->tpl->setCurrentBlock(
'omit_radio');
218 $this->tpl->setVariable(
'TXT_OMIT', $this->lng->txt(
'omit'));
219 $this->tpl->setVariable(
'NAME_OMIT',
'cp_options[' . $s[
'ref_id'] .
'][type]');
221 $this->tpl->setVariable(
'ID_OMIT', $s[
'depth'] .
'_' . $s[
'type'] .
'_' . $s[
'ref_id'] .
'_omit');
222 if ((!$s[
'copy']
or !$s[
'perm_copy'])
and (!$s[
'link'])) {
223 $this->tpl->setVariable(
'OMIT_CHECKED',
'checked="checked"');
225 $this->tpl->parseCurrentBlock();
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setEnableNumInfo($a_val)
Set enable num info.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static _lookupObjId($a_id)
getType()
Get object type of source.
static _appointmentToString($start, $end, $fulltime)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
static _lookupAppointment($a_obj_id)
lookup appointment
setEnableHeader($a_enableheader)
Set Enable Header.
__construct($a_parent_class, $a_parent_cmd, $a_type, $a_back_cmd)
setEnableTitle($a_enabletitle)
Set Enable Title.
setLimit($a_limit=0, $a_default_limit=0)