39require_once
'widget.php';
44}
catch (\Exception
$e) {
45 echo
$e->getMessage();
51if (
$action ==
'widget.display') {
54 $widget?->set_var_name(
$http->request(
"var_name"),
'string',
'');
57 }
catch (\Exception
$e) {
59 echo
$e->getMessage();
71 $count=
$cn->get_value(
"select count(*) from widget_dashboard where wd_code=$1",[
$w]);
72 if (
$count == 1 && file_exists(NOALYSS_INCLUDE.
"/widget/$w/ajax.php")) {
73 require NOALYSS_INCLUDE.
"/widget/$w/ajax.php";
81if (
$action ==
'widget.manage') {
82 echo \HtmlInput::title_box(
_(
"Elements"),
'widget_box_id',p_mod:
'none',p_draggable:
'y');
83 echo
'<div style="padding:0.3rem">';
84 echo
span(
_(
'Organiser les éléments en utilisant la souris (Drag & Drop) puis sauver'),
'class="text-muted text-center"');
88 echo
'<ul class="aligned-block">';
89 echo
'<li>'.\HtmlInput::button_action(
_(
'Fermer'),
'widget.remove_ident();removeDiv('.
"'widget_box_id'".
')').
'</li>';
90 echo
'<li>'.\HtmlInput::button_action(
_(
'Sauver'),
'widget.save()').
'</li>';
91 echo
'<li>'.\HtmlInput::button_action(
_(
'Ajouter'),
'widget.input()').
'</li>';
103if (
$action ==
'widget.save') {
106 parse_str(
$query, $aWigdet);
107 if (isset ($aWigdet[
'contain_widget']))
110 \Noalyss\Widget\Widget::save(array());
112 }
catch (\Exception
$e) {
114 echo
$e->getMessage();
122if (
$action ==
'widget.refresh') {
123 require NOALYSS_TEMPLATE.
"/dashboard.php";
126if (
$action ==
"widget.input") {
127 echo \HtmlInput::title_box(
_(
"Elements à ajouter"),
'widget_box_select_id',p_draggable:
'y');
128 echo
'<div style="padding:0.3rem">';
131 echo
'<ul class="aligned-block">';
132 echo
'<li>'.\HtmlInput::button_close(
'widget_box_select_id',
'button').
'</li>';
140if (
$action ==
'widget.insert') {
142 $param =
$http->request(
"param",
"string",
null);
143 $widget_code =
$http->request(
"widget_code");
144 $widget_id=
$cn->get_value(
"select wd_id from widget_dashboard where wd_code=$1 ",[$widget_code]);
145 if (empty($widget_id))
return;
147 $user_widget_id =
$cn->get_value(
"insert into user_widget(use_login,dashboard_widget_id,uw_parameter,uw_order)
148values ($1,$2,$3,1000) returning uw_id",[
$g_user->getLogin(),$widget_id,$param]);
150 $widget->input(
false);
span($p_string, $p_extra='')
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
global $g_user
if no group available , then stop
foreach($array as $idx=> $m) $w
_("actif, passif,charge,...")
create_script($p_string)
create the HTML for adding the script tags around of the script