39require_once
'widget.php';
44}
catch (\Exception
$e) {
45 echo
$e->getMessage();
49if (
$action ==
'widget.display') {
54 }
catch (\Exception
$e) {
55 echo
$e->getMessage();
64 $count=
$cn->get_value(
"select count(*) from widget_dashboard where wd_code=$1",[
$w]);
65 if (
$count == 1 && file_exists(NOALYSS_INCLUDE.
"/widget/$w/ajax.php")) {
66 require NOALYSS_INCLUDE.
"/widget/$w/ajax.php";
74if (
$action ==
'widget.manage') {
75 echo \HtmlInput::title_box(
_(
"Elements"),
'widget_box_id',p_mod:
'none',p_draggable:
'y');
76 echo
'<div style="padding:0.3rem">';
77 echo
span(
_(
'Organiser les éléments en utilisant la souris (Drag & Drop) puis sauver'),
'class="text-muted text-center"');
81 echo
'<ul class="aligned-block">';
82 echo
'<li>'.\HtmlInput::button_action(
_(
'Fermer'),
'widget.remove_ident();removeDiv('.
"'widget_box_id'".
')').
'</li>';
83 echo
'<li>'.\HtmlInput::button_action(
_(
'Sauver'),
'widget.save()').
'</li>';
84 echo
'<li>'.\HtmlInput::button_action(
_(
'Ajouter'),
'widget.input()').
'</li>';
99 parse_str(
$query, $aWigdet);
100 if (isset ($aWigdet[
'contain_widget']))
103 \Noalyss\Widget\Widget::save(array());
105 }
catch (\Exception
$e) {
107 echo
$e->getMessage();
115if (
$action ==
'widget.refresh') {
116 require NOALYSS_TEMPLATE.
"/dashboard.php";
119if (
$action ==
"widget.input") {
120 echo \HtmlInput::title_box(
_(
"Elements à ajouter"),
'widget_box_select_id',p_draggable:
'y');
121 echo
'<div style="padding:0.3rem">';
124 echo
'<ul class="aligned-block">';
125 echo
'<li>'.\HtmlInput::button_close(
'widget_box_select_id',
'button').
'</li>';
133if (
$action ==
'widget.insert') {
135 $param =
$http->request(
"param",
"string",
null);
136 $widget_code =
$http->request(
"widget_code");
137 $widget_id=
$cn->get_value(
"select wd_id from widget_dashboard where wd_code=$1 ",[$widget_code]);
138 if (empty($widget_id))
return;
140 $user_widget_id =
$cn->get_value(
"insert into user_widget(use_login,dashboard_widget_id,uw_parameter,uw_order)
141values ($1,$2,$3,1000) returning uw_id",[
$g_user->getLogin(),$widget_id,$param]);
143 $widget->input(
false);
span($p_string, $p_extra='')
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