noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
todo_list.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// Copyright Author Dany De Bontridder danydb@aevalys.eu 10/08/24
20/*!
21 * \file
22 * \brief widget Todo List
23 * \note this widget is included in Noalyss Core and a part of the code (javascript + css + ajax)
24 * are still included in NOALYSS Code, this code should move here and will be part of a "cleansing code" process
25 */
26
27namespace Noalyss\Widget;
28
29/**
30 * \class Todo_List
31 * \brief widget Todo List
32 * @note this widget is included in Noalyss Core and a part of the code (javascript + css + ajax)
33 * are still included in NOALYSS Code, this code should move here and will be part of a "cleansing code" process
34 */
35class Todo_List extends Widget
36{
37
38
39 function display()
40 {
41 global $cn;
42 echo '<div class="box widget-box" id="todo_list" >';
43 echo \HtmlInput::title_box(_('Pense-BĂȘte'), "todo_listg_div", 'zoom', "zoom_todo()", 'n',raw:'&#x1F4DC;');
44 echo \Dossier::hidden();
45 $todo = new \Todo_List($cn);
46 $array = $todo->load_all();
48
49 echo \HtmlInput::button('add', _('Ajout'), 'onClick="add_todo()"', 'smallbutton');
50 echo '<table id="table_todo" class="sortable" style="width:100%">';
51 echo '<tr><th class=" sorttable_sorted_reverse" id="todo_list_date">Date</th><th>Titre</th><th></th>';
52 if (!empty ($array)) {
53 $nb = 0;
54 $today = date('d.m.Y');
55
56 foreach ($a_todo as $row) {
57 if ($nb % 2 == 0) $odd = 'odd '; else $odd = 'even ';
58 $nb++;
59 echo $row->display_row($odd);
60 }
61 }
62 echo '</table>';
63 echo $this->display_new_note();
64 echo '</div>';
65 }
66
67 /**************************************************************************
68 * Ajout d'une nouvelle note
69 *************************************************************************/
70 private function display_new_note()
71 {
72 require_once 'todo_list-display_new_note.php';
73 }
74
75}
76
77
_("actif, passif,charge,...")
widget Todo List
Definition todo_list.php:36
display()
display the content for the current connected user of the widget with the parameter
Definition todo_list.php:39
Main class for widget.
Definition widget.php:32
static to_object($p_cn, $p_array)