ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilStyleMediaQueryTableGUI.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
24include_once("Services/Table/classes/class.ilTable2GUI.php");
25
35{
39 function __construct($a_parent_obj, $a_parent_cmd, $a_style_obj)
40 {
41 global $ilCtrl, $lng, $ilAccess, $lng, $rbacsystem;
42
43 parent::__construct($a_parent_obj, $a_parent_cmd);
44
45 $this->setTitle($lng->txt("sty_media_queries"));
46 $this->setDescription($lng->txt("sty_media_query_info"));
47 $this->style_obj = $a_style_obj;
48
49 $this->addColumn("", "", "1"); // checkbox
50 $this->addColumn($this->lng->txt("sty_order"));
51 $this->addColumn($this->lng->txt("sty_query"), "");
52 $this->addColumn($this->lng->txt("actions"), "");
53 $this->setEnableHeader(true);
54 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
55 $this->setRowTemplate("tpl.style_media_query_row.html", "Services/Style");
56 //$this->setSelectAllCheckbox("file");
57 $this->getItems();
58
59 // action commands
60 if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
61 {
62 $this->addCommandButton("saveMediaQueryOrder", $lng->txt("sty_save_order"));
63 $this->addMultiCommand("deleteMediaQueryConfirmation", $lng->txt("delete"));
64 }
65
66 $this->setEnableTitle(true);
67 }
68
72 function getItems()
73 {
74 $this->setData($this->style_obj->getMediaQueries());
75 }
76
80 protected function fillRow($a_set)
81 {
82 global $lng, $ilCtrl, $ilAccess, $rbacsystem;
83
84 $this->tpl->setVariable("MQUERY", $a_set["mquery"]);
85 $this->tpl->setVariable("MQID", $a_set["id"]);
86 $this->tpl->setVariable("ORDER_NR", $a_set["order_nr"]);
87
88 if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"]))
89 {
90 $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
91 $ilCtrl->setParameter($this->parent_obj, "mq_id", $a_set["id"]);
92 $this->tpl->setVariable("LINK_EDIT_MQUERY",
93 $ilCtrl->getLinkTarget($this->parent_obj, "editMediaQuery"));
94 }
95 }
96}
97?>
$_GET["client_id"]
TableGUI class for style editor (image list)
__construct($a_parent_obj, $a_parent_cmd, $a_style_obj)
Constructor.
getItems()
Get items of current folder.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
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
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDescription($a_val)
Set description.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40