noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
Noalyss\Widget\Todo_List Class Reference

widget Todo List More...

+ Inheritance diagram for Noalyss\Widget\Todo_List:
+ Collaboration diagram for Noalyss\Widget\Todo_List:

Public Member Functions

 display ()
 display the content for the current connected user of the widget with the parameter
 
- Public Member Functions inherited from Noalyss\Widget\Widget
 __construct (protected int $user_widget_id=0, protected string $widget_code="", protected $db=null)
 
 button_zoom ()
 compute the button ZOOM to put in the title
 
 close_div ()
 
 display_parameter ()
 MUST BE overrided if the widget needs extra parameters, display the content of extra-parameter.
 
 get_div_domid ()
 compute the DIV ID
 
 get_parameter ()
 get the parameter of the widget and returns an array
 
 get_user_widget_id ()
 
 get_widget_code ()
 
 input ($flnumber=true)
 display a description of the widget and allow to save it for the current user, call input_param function of the widget if it exists
 
 input_parameter ()
 MUST BE overrided if the widget needs extra parameters, create a FORM to add extra-parameter.
 
 make_form ($html_input)
 open a form with the DOMID "widget_code"_param, it appears once only for each widget in the dialog box for adding widget to the dashboard
 
 open_div ()
 output the DIV HTML with class and id for the widget
 
 set_user_widget_id (int $user_widget_id)
 
 set_widget_code (string $widget_code)
 
 title ( $title)
 display the title and the icon for zooming
 

Private Member Functions

 display_new_note ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Noalyss\Widget\Widget
static ajax_display (Widget $widget)
 display a box and fills it with the content of an ajax calls , the ajax calls Widget::display
 
static build_user_widget ($user_widget_id, $widget_code)
 Build a widget thank the user_widget_id (SQL :PK : USER_WIDGET.UW_ID) and $widget_code.
 
static display_available ()
 @brier display activated widgets
 
static get_enabled_widget ()
 returns an array of widget for the connected user, ordered
 
static save ($array)
 save widget order from an array
 
static scanfolder ()
 scan folder to find install.php file , include them if the code is not in DB
 
static select_available ()
 show all the widget that can be added
 

Detailed Description

widget Todo List

Note
this widget is included in Noalyss Core and a part of the code (javascript + css + ajax) are still included in NOALYSS Code, this code should move here and will be part of a "cleansing code" process

Definition at line 35 of file todo_list.php.

Member Function Documentation

◆ display()

Noalyss\Widget\Todo_List::display ( )

display the content for the current connected user of the widget with the parameter

Returns
mixed

Reimplemented from Noalyss\Widget\Widget.

Definition at line 39 of file todo_list.php.

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();
47 $a_todo = \Todo_List::to_object($cn, $array);
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 }
_("actif, passif,charge,...")

References $array, $cn, $nb, $row, $today, _, display_new_note(), and Todo_List\to_object().

+ Here is the call graph for this function:

◆ display_new_note()

Noalyss\Widget\Todo_List::display_new_note ( )
private

Definition at line 70 of file todo_list.php.

71 {
72 require_once 'todo_list-display_new_note.php';
73 }

Referenced by display().


The documentation for this class was generated from the following file: