4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
20 public function __construct($a_parent_obj, $a_parent_cmd =
"")
22 parent::__construct($a_parent_obj, $a_parent_cmd);
23 $this->
setId(
'tbl_didactic_tpl_settings');
34 $lng->loadLanguageModule(
'search');
35 $this->
addColumn($this->lng->txt(
'search_title_description'),
'title',
'40%');
36 $this->
addColumn($this->lng->txt(
'didactic_applicable_for'),
'applicable',
'20%');
37 $this->
addColumn($this->lng->txt(
'active'),
'active',
'20%');
38 $this->
addColumn($this->lng->txt(
'actions'),
'',
'20%');
40 $this->
setTitle($this->lng->txt(
'didactic_available_templates'));
42 if($ilAccess->checkAccess(
'write',
'',$_REQUEST[
"ref_id"]))
44 $this->
addMultiCommand(
'activateTemplates', $this->lng->txt(
'activate'));
45 $this->
addMultiCommand(
'deactivateTemplates', $this->lng->txt(
'deactivate'));
53 $this->
setRowTemplate(
'tpl.didactic_template_overview_row.html',
'Services/DidacticTemplate');
56 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
64 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
66 $tpls->readInactive();
69 foreach($tpls->getTemplates() as
$tpl)
96 if($ilAccess->checkAccess(
'write',
'',$_REQUEST[
"ref_id"]))
98 $this->tpl->setVariable(
'VAL_ID',$set[
'id']);
101 $this->tpl->setVariable(
'VAL_TITLE', $set[
'title']);
102 $this->tpl->setVariable(
'VAL_DESC', $set[
'description']);
104 foreach((
array) explode(
"\n", $set[
'info']) as
$info)
106 $trimmed_info = trim($info);
109 $this->tpl->setCurrentBlock(
'info');
110 $this->tpl->setVariable(
'VAL_INFO',$trimmed_info);
111 $this->tpl->parseCurrentBlock();
115 if($set[
'automatic_generated'])
117 $this->tpl->setVariable(
"VAL_AUTOMATIC_GENERATED", $this->lng->txt(
"didactic_auto_generated"));
121 $this->tpl->setVariable(
'VAL_IMAGE',
126 $this->tpl->setVariable(
'VAL_ENABLED_TXT',
128 $this->lng->txt(
'active') :
129 $this->lng->txt(
'inactive')
134 foreach((
array) $set[
'assignments'] as $obj_type)
136 $atxt .= ($this->lng->txt(
'objs_'.$obj_type).
'<br/>');
138 $this->tpl->setVariable(
'VAL_APPLICABLE', $atxt);
140 $ilCtrl->setParameterByClass(
146 if($ilAccess->checkAccess(
'write',
'',$_REQUEST[
"ref_id"]))
148 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
150 $actions->setId($set[
'id']);
151 $actions->setListTitle($this->lng->txt(
"actions"));
154 $this->lng->txt(
'settings'),
156 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'editTemplate')
161 $this->lng->txt(
'copy'),
163 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'copyTemplate')
168 $this->lng->txt(
'didactic_do_export'),
170 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'exportTemplate')
172 $this->tpl->setVariable(
'ACTION_DROPDOWN', $actions->getHTML());
178 $this->tpl->setCurrentBlock(
'action_link');
179 $this->tpl->setVariable(
181 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'exportTemplate')
183 $this->tpl->setVariable(
'A_TEXT', $this->lng->txt(
'didactic_do_export'));
184 $this->tpl->parseCurrentBlock();
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
Description of ilDidacticTemplateSettingsTableGUI.
static getInstance()
Get singelton instance.
__construct($a_parent_obj, $a_parent_cmd="")
Constructor.
getParentObject()
Get parent object.
parse()
Parse didactic templates.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.