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 $lng->loadLanguageModule(
'meta');
36 $this->
addColumn($this->lng->txt(
'search_title_description'),
'title',
'30%');
37 $this->
addColumn($this->lng->txt(
'didactic_applicable_for'),
'applicable',
'20%');
38 $this->
addColumn($this->lng->txt(
'didactic_scope'),
'scope',
'20%');
39 $this->
addColumn($this->lng->txt(
'active'),
'active',
'10%');
40 $this->
addColumn($this->lng->txt(
'actions'),
'',
'20%');
42 $this->
setTitle($this->lng->txt(
'didactic_available_templates'));
44 if ($ilAccess->checkAccess(
'write',
'', $_REQUEST[
"ref_id"])) {
45 $this->
addMultiCommand(
'activateTemplates', $this->lng->txt(
'activate'));
46 $this->
addMultiCommand(
'deactivateTemplates', $this->lng->txt(
'deactivate'));
54 $this->
setRowTemplate(
'tpl.didactic_template_overview_row.html',
'Services/DidacticTemplate');
57 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
65 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
67 $tpls->readInactive();
70 foreach ($tpls->getTemplates() as
$tpl) {
80 foreach (
$tpl->getAssignments() as $obj_type) {
81 $atxt .= ($this->lng->txt(
'objs_' . $obj_type) .
'<br/>');
103 if ($ilAccess->checkAccess(
'write',
'', $_REQUEST[
"ref_id"])) {
104 $this->tpl->setVariable(
'VAL_ID', $set[
'id']);
107 $this->tpl->setVariable(
'VAL_TITLE', $set[
'title']);
108 $this->tpl->setVariable(
'VAL_DESC', $set[
'description']);
110 foreach ((
array) explode(
"\n", $set[
'info']) as
$info) {
111 $trimmed_info = trim($info);
113 $this->tpl->setCurrentBlock(
'info');
114 $this->tpl->setVariable(
'VAL_INFO', $trimmed_info);
115 $this->tpl->parseCurrentBlock();
119 if ($set[
'automatic_generated']) {
120 $this->tpl->setVariable(
"VAL_AUTOMATIC_GENERATED", $this->lng->txt(
"didactic_auto_generated"));
124 $this->tpl->setVariable(
130 $this->tpl->setVariable(
133 $this->lng->txt(
'active') :
134 $this->lng->txt(
'inactive')
139 foreach ((
array) $set[
'assignments'] as $obj_type) {
140 $atxt .= ($this->lng->txt(
'objs_' . $obj_type) .
'<br/>');
142 $this->tpl->setVariable(
'VAL_APPLICABLE', $atxt);
144 $ilCtrl->setParameterByClass(
150 if (count($set[
'scope'])) {
151 $this->tpl->setCurrentBlock(
'scope_txt');
152 $this->tpl->setVariable(
'LOCAL_OR_GLOBAL', $this->lng->txt(
'didactic_scope_list_header'));
153 $this->tpl->parseCurrentBlock();
155 foreach ($set[
'scope'] as $ref_id) {
156 $this->tpl->setCurrentBlock(
'scope_entry');
159 $this->tpl->parseCurrentBlock();
162 $this->tpl->setCurrentBlock(
'scope_txt');
163 $this->tpl->setVariable(
'LOCAL_OR_GLOBAL', $set[
'local'] ? $this->lng->txt(
'meta_local') : $this->lng->txt(
'meta_global'));
164 $this->tpl->parseCurrentBlock();
168 if ($ilAccess->checkAccess(
'write',
'', $_REQUEST[
"ref_id"])) {
169 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
171 $actions->setId($set[
'id']);
172 $actions->setListTitle($this->lng->txt(
"actions"));
175 $this->lng->txt(
'settings'),
177 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'editTemplate')
182 $this->lng->txt(
'copy'),
184 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'copyTemplate')
189 $this->lng->txt(
'didactic_do_export'),
191 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'exportTemplate')
193 $this->tpl->setVariable(
'ACTION_DROPDOWN', $actions->getHTML());
197 $this->tpl->setCurrentBlock(
'action_link');
198 $this->tpl->setVariable(
200 $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'exportTemplate')
202 $this->tpl->setVariable(
'A_TEXT', $this->lng->txt(
'didactic_do_export'));
203 $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.
static _lookupTitle($a_id)
lookup object title
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)
static _lookupObjId($a_id)
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.
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.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")