3 * Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
4 * Copyright 2013, Franck Villaume - TrivialDev
6 * This file is a part of Fusionforge.
8 * Fusionforge is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Fusionforge 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.
18 * You should have received a copy of the GNU General Public License
19 * along with Fusionforge. If not, see <http://www.gnu.org/licenses/>.
22 class WidgetLayout_Row {
28 function WidgetLayout_Row($id, $rank) {
31 $this->columns = array();
34 function setLayout(&$layout) {
35 $this->layout =& $layout;
39 $this->columns[] =& $c;
43 function display($readonly, $owner_id, $owner_type) {
44 echo '<table id="mainwidget_table'.$this->id.'" class="fullwidth "><tbody>' . "\n";
45 echo '<tr style="vertical-align:top;">' . "\n";
46 $last = count($this->columns) - 1;
48 foreach($this->columns as $key => $nop) {
49 $this->columns[$key]->display($readonly, $owner_id, $owner_type, $is_last = ($i++ == $last));
52 echo '</tbody></table>' . "\n";
55 function getColumnIds() {
57 foreach($this->columns as $key => $nop) {
58 $ret[] = $this->columns[$key]->getColumnId();