noalyss Version-9
forecast_item_mtable-display_table.php
Go to the documentation of this file.
1<?php
2/*
3* This file is part of NOALYSS.
4*
5* NOALYSS is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation; either version 2 of the License, or
8* (at your option) any later version.
9*
10* NOALYSS is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with NOALYSS; if not, write to the Free Software
17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@noalyss.eu
21
22/**
23 * \file
24 * \brief display, add, delete and modify forecast_item, All rows are in $a_row
25 * \see Forecast_Item_MTable
26 */
27
28echo HtmlInput::filter_table("tb" . $this->object_name, '0,1,2,3,4', 1);
29?>
30<table id="<?= "tb" . $this->object_name ?>" class="result">
31 <thead>
32 <tr>
33
34 <th>
35 <?= _("Catégorie") ?>
36 </th>
37 <th>
38 <?= _("Texte") ?>
39 </th>
40 <th>
41 <?= _("Formule") ?>
42 </th>
43 <th>
44 <?= _("Montant") ?>
45 </th>
46 <th>
47 <?= _("Période") ?>
48 </th>
49 <th></th>
50 </tr>
51 </thead>
52 <tbdoy>
53 <?php
54 $nb_row = count($a_row);
55 for ($i = 0; $i < $nb_row; $i++):
56 $class = ($i % 2 == 0) ? "even" : "odd";
57 $this->display_row($a_row[$i]);
58 endfor; // end for i
59 ?>
60 </tbdoy>
61</table>
62<?php
63$this->create_js_script();
64?>
65<?php
66echo HtmlInput::button_action(" " . _("Ajout"),
67 sprintf("%s.input('-1','%s')",
68 $this->object_name,
69 $this->object_name), "xx", "smallbutton", BUTTONADD);
70?>
71<script>alternate_row_color('<?="tb" . $this->object_name?>')</script>
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
tr($p_string, $p_extra='')
Definition: ac_common.php:88
$class
static filter_table($p_table_id, $p_col, $start_row)
filter the rows in a table and keep the colored row in alternance
static button_action($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
button Html with javascript
$all table
const BUTTONADD
Definition: constant.php:102