ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilPageLayoutTableGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2008 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once("Services/Table/classes/class.ilTable2GUI.php");
25 
34 {
35 
36  function __construct($a_parent_obj, $a_parent_cmd)
37  {
38  global $ilCtrl, $lng;
39 
40  parent::__construct($a_parent_obj, $a_parent_cmd);
41  $this->addColumn("", "", "2%");
42 
43  $this->addColumn($lng->txt("active"), "", "6%");
44  $this->addColumn($lng->txt("thumbnail"), "", "22%");
45  $this->addColumn($lng->txt("title"), "", "40%");
46  $this->addColumn($lng->txt("description"), "", "30%");
47 
48  $this->addMultiCommand("activate", $lng->txt("activate"));
49  $this->addMultiCommand("deactivate", $lng->txt("deactivate"));
50  $this->addMultiCommand("deletePgl", $lng->txt("delete"));
51 
52  $this->getPageLayouts();
53 
54  $this->setSelectAllCheckbox("pglayout");
55  $this->setEnableHeader(true);
56  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
57  $this->setRowTemplate("tpl.stys_pglayout_table_row.html",
58  "Services/Style");
59  $this->setTitle($lng->txt("page_layouts"));
60 
61  //build form
62  /*
63  $opts = ilUtil::formSelect(12,"new_type",array($lng->txt("page_layout")));
64  $this->tpl->setCurrentBlock("add_object");
65  $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
66  $this->tpl->setVariable("BTN_NAME", "createPgGUI");
67  $this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
68  $this->tpl->parseCurrentBlock();
69  */
70  }
71 
75  function getPageLayouts() {
77  }
78 
83  protected function fillRow($a_set)
84  {
85  global $lng, $ilCtrl;
86  if ($a_set['active']) {
87  $this->tpl->setVariable("IMG_ACTIVE",ilUtil::getImagePath("icon_led_on_s.png"));
88  } else {
89  $this->tpl->setVariable("IMG_ACTIVE",ilUtil::getImagePath("icon_led_off_s.png"));
90  }
91  $this->tpl->setVariable("VAL_TITLE", $a_set['title']);
92  $this->tpl->setVariable("VAL_DESCRIPTION", $a_set['description']);
93  $this->tpl->setVariable("CHECKBOX_ID", $a_set['layout_id']);
94 
95  $ilCtrl->setParameterByClass("ilobjstylesettingsgui", "obj_id", $a_set['layout_id']);
96  $this->tpl->setVariable("HREF_EDIT_PGLAYOUT",$ilCtrl->getLinkTargetByClass("ilobjstylesettingsgui","editPg"));
97 
98  $pgl_obj = new ilPageLayout($a_set['layout_id']);
99  $this->tpl->setVariable("VAL_PREVIEW_HTML",$pgl_obj->getPreview());
100 
101 
102  }
103 
104 }
105 ?>