4 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
25 $this->parent_object = $a_parent_obj;
27 $this->lng->loadLanguageModule(
'didactic');
43 $next_class = $ilCtrl->getNextClass($this);
44 $cmd = $ilCtrl->getCmd();
62 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
65 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
68 if(!count($tpls) && !$value)
74 $toolbar->
addText($this->lng->txt(
'didactic_selected_tpl_option'));
77 $options =
array(0 => $this->lng->txt(
'didactic_default_type'));
80 foreach($tpls as
$tpl)
83 if($tpl->isEffective(
$_GET[
'ref_id']))
85 $options[$tpl->getId()] = $tpl->getPresentationTitle();
87 if($tpl->isExclusive())
94 if($excl_tpl && $value != 0)
100 if(!in_array($value, array_keys(
$options)) || ($excl_tpl && $value == 0))
102 $options[$value] = $this->lng->txt(
'not_available');
110 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
115 $tpl_selection->setOptions(
$options);
116 $tpl_selection->setValue($value);
120 $toolbar->
addFormButton($this->lng->txt(
'change'),
'confirmTemplateSwitch');
131 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
134 $new_tpl_id = (int) $_REQUEST[
'tplid'];
139 $ilCtrl->returnToParent($this);
142 $ilTabs->clearTargets();
143 $ilTabs->clearSubTabs();
145 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
147 $confirm->setFormAction($ilCtrl->getFormAction($this));
148 $confirm->setHeaderText($this->lng->txt(
'didactic_confirm_apply_new_template'));
149 $confirm->setConfirm($this->lng->txt(
'apply'),
'switchTemplate');
150 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
154 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
160 $dtpl->getPresentationTitle().
161 '<div class="il_Description">'.
162 $dtpl->getPresentationDescription().
' '.
171 $this->lng->txt(
'default').
' '.
172 '<div class="il_Description">'.
174 $this->lng->txt(
'didactic_default_type_info'),
181 $tpl->setContent($confirm->getHTML());
191 $ilCtrl->returnToParent($this);
201 $new_tpl_id = (int) $_REQUEST[
'tplid'];
203 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
207 $ilCtrl->returnToParent($this);
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
appendToolbarSwitch(ilToolbarGUI $toolbar, $a_obj_type, $a_ref_id)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static switchTemplate($a_ref_id, $a_new_tpl_id)
executeCommand()
Execute command.
GUI class for didactic template settings inside repository objects.
if(!is_array($argv)) $options
__construct($a_parent_obj)
Constructor.
cancel()
Return to parent gui.
Create styles array
The data for the language used.
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
Create new PHPExcel object
obj_idprivate
static getLogger($a_component_id)
Get component logger.
switchTemplate()
Switch Template.
Confirmation screen class.