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();
46 switch ($next_class) {
60 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
63 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
66 if (!count($tpls) && !$value) {
71 $toolbar->
addText($this->lng->txt(
'didactic_selected_tpl_option'));
74 $options =
array(0 => $this->lng->txt(
'didactic_default_type'));
77 foreach ($tpls as
$tpl) {
79 if ($tpl->isEffective(
$_GET[
'ref_id'])) {
80 $options[$tpl->getId()] = $tpl->getPresentationTitle();
82 if ($tpl->isExclusive()) {
88 if ($excl_tpl && $value != 0) {
93 if (!in_array($value, array_keys(
$options)) || ($excl_tpl && $value == 0)) {
94 $options[$value] = $this->lng->txt(
'not_available');
101 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
106 $tpl_selection->setOptions(
$options);
107 $tpl_selection->setValue($value);
111 $toolbar->
addFormButton($this->lng->txt(
'change'),
'confirmTemplateSwitch');
122 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
125 $new_tpl_id = (int) $_REQUEST[
'tplid'];
129 $ilCtrl->returnToParent($this);
132 $ilTabs->clearTargets();
133 $ilTabs->clearSubTabs();
135 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
137 $confirm->setFormAction($ilCtrl->getFormAction($this));
138 $confirm->setHeaderText($this->lng->txt(
'didactic_confirm_apply_new_template'));
139 $confirm->setConfirm($this->lng->txt(
'apply'),
'switchTemplate');
140 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
143 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
149 $dtpl->getPresentationTitle() .
150 '<div class="il_Description">' .
151 $dtpl->getPresentationDescription() .
' ' .
158 $this->lng->txt(
'default') .
' ' .
159 '<div class="il_Description">' .
161 $this->lng->txt(
'didactic_default_type_info'),
167 $tpl->setContent($confirm->getHTML());
177 $ilCtrl->returnToParent($this);
187 $new_tpl_id = (int) $_REQUEST[
'tplid'];
189 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
193 $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.
__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.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Confirmation screen class.