ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilWikiPageTemplatesTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 function __construct($a_parent_obj, $a_parent_cmd, $a_wiki_id)
21 {
22 global $ilCtrl, $lng, $ilAccess, $lng;
23
24 parent::__construct($a_parent_obj, $a_parent_cmd);
25 include_once("./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
26 $templates = new ilWikiPageTemplate($a_wiki_id);
27 $this->setData($templates->getAllInfo());
28 $this->setTitle($lng->txt(""));
29
30 $this->addColumn($this->lng->txt(""), "", "1");
31 $this->addColumn($this->lng->txt("title"), "title");
32 $this->addColumn($this->lng->txt("wiki_templ_new_pages"), "");
33 $this->addColumn($this->lng->txt("wiki_templ_add_to_page"), "");
34
35 $this->setDefaultOrderDirection("asc");
36 $this->setDefaultOrderField("title");
37
38 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
39 $this->setRowTemplate("tpl.wiki_page_templates_row.html", "Modules/Wiki");
40
41 $this->addMultiCommand("remove", $lng->txt("wiki_remove_template_status"));
42 $this->addCommandButton("saveTemplateSettings", $lng->txt("save"));
43 }
44
48 protected function fillRow($a_set)
49 {
50 $this->tpl->setVariable("ID", $a_set["wpage_id"]);
51 $this->tpl->setVariable("TITLE", $a_set["title"]);
52 if ($a_set["new_pages"])
53 {
54 $this->tpl->setVariable("NEW_PAGES_CHECKED", 'checked="checked"');
55 }
56 if ($a_set["add_to_page"])
57 {
58 $this->tpl->setVariable("ADD_TO_PAGE_CHECKED", 'checked="checked"');
59 }
60 }
61
62}
63?>
Class ilTable2GUI.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
TableGUI class for wiki page templates.
__construct($a_parent_obj, $a_parent_cmd, $a_wiki_id)
Constructor.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40