noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
Noalyss\Widget\Bookmark Class Reference
+ Inheritance diagram for Noalyss\Widget\Bookmark:
+ Collaboration diagram for Noalyss\Widget\Bookmark:

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
 

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

Definition at line 26 of file bookmark.php.

Member Function Documentation

◆ display()

Noalyss\Widget\Bookmark::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 28 of file bookmark.php.

29 {
30 global $g_user;
31 $this->open_div();
32
33
34 $this->title(_("Favoris") . '✨');
35 $bookmark_sql="select distinct b_id,b_action,b_order,me_code,me_description, javascript"
36 . " from bookmark "
37 . "join v_menu_description_favori on (code=b_action or b_action=me_code)"
38 . "where "
39 . "login=$1 order by me_code";
40 $a_bookmark=$this->db->get_array($bookmark_sql,array($g_user->login));
41
42 $dossier_id=\Dossier::id();
43 if (count($a_bookmark) >0 ) {
44 $p=0;
45 foreach ($a_bookmark as $item) {
46 $a_code= explode('/',$item['b_action']);
47 $idx=count($a_code);
48 $code=$a_code[$idx-1];
49 $url=http_build_query(array("ac"=>$item['b_action'],"gDossier"=>$dossier_id));
50 $p++;
51 $class=($p&1)?' odd ':'even';
52 $description=h($item['me_description']);
53 echo <<<EOF
54<div class="row {$class} hover">
55 <div class="col-3">
56
57
58 <a class="line" href="do.php?{$url}">{$code} </a>
59 </div>
60 <div class="col-7">
61
62
63 <a class="mtitle" href="do.php?{$url}">{$description}</a>
64 </div>
65</div>
66EOF;
67
68 }
69 }
70 $this->close_div();
71
72 }
global $g_user
if no group available , then stop
$dossier_id
h( $row[ 'oa_description'])
if(! isset($_GET['ac'])) if(isset( $_GET[ 'bookmark_add'])) if(isset($_GET['bookmark_delete']) &&isset($_GET['book'])) $bookmark_sql
$a_bookmark
_("actif, passif,charge,...")
$p
Definition calendar.php:9
$anc_filter title
$SecUser db

References $a_bookmark, $bookmark_sql, $class, $code, $description, $dossier_id, $g_user, $idx, $p, $url, _, Noalyss\Widget\Widget\close_div(), db, h, Noalyss\Widget\Widget\open_div(), and title.

+ Here is the call graph for this function:

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