noalyss Version-9
dashboard.php
Go to the documentation of this file.
1<?php
2//This file is part of NOALYSS and is under GPL
3//see licence.txt
4?><!-- left div -->
5<div class="row" style="margin-right: 0px;margin-left:0px">
6<div id="calendar_box_div" class="box">
7<?php echo HtmlInput::title_box(_('Calendrier'),'cal_div','zoom',"calendar_zoom($obj)",'n');?>
8<?php echo $cal->display('short',0); ?>
9</div>
10
11<div id="todo_listg_div" class="box"> <?php echo HtmlInput::title_box(_('Pense-Bête'),"todo_listg_div",'zoom',"zoom_todo()",'n')?>
12
13<?php
14/*
15 * Todo list
16 */
17echo dossier::hidden();
19$array=$todo->load_all();
21
22echo HtmlInput::button('add',_('Ajout'),'onClick="add_todo()"','smallbutton');
23 echo '<table id="table_todo" class="sortable" width="100%">';
24 echo '<tr><th class=" sorttable_sorted_reverse" id="todo_list_date">Date</th><th>Titre</th><th></th>';
25if ( ! empty ($array) ) {
26 $nb=0;
27 $today=date('d.m.Y');
28
29 foreach ($a_todo as $row) {
30 if ( $nb % 2 == 0 ) $odd='odd '; else $odd='even ';
31 $nb++;
32 echo $row->display_row($odd);
33 }
34}
35 echo '</table>';
36?>
37</div>
38
39<div id="situation_div" class="box">
41</div>
42
43<!-- Mini rapport -->
44<?php
45/*
46 * Mini Report
47 */
48$report=$g_user->get_mini_report();
49
51
52if ( $rapport->exist() == false ) {
53 $g_user->set_mini_report(0);
54 $report=0;
55}
56
57if ( $report != 0 ) : ?>
58<div id="report_div" class="box"><?php echo HtmlInput::title_box($rapport->get_name(),'report_div','none','','n');?>
59<?php
60 $exercice=$g_user->get_exercice();
61 if ( $exercice == 0 ) {
62 alert(_('Aucune periode par defaut'));
63 } else {
64 $periode=new Periode($cn);
66
67 $result=$rapport->get_row($limit['start'],$limit['end'],'periode');
68 $ix=0;
69 if ( !empty ($result ) && count ($result) > 0)
70 {
71 echo '<table class="result">';
72 foreach ($result as $row) {
73 $ix++;
74 $class=($ix%2==0)?' class="even" ':' class="odd" ';
75 echo '<tr '.$class.'>';
76
77 echo '<td> '.$row['desc'].'</td>'.
78 '<td style="text-align:right">'.nbm($row['montant'])." &euro;</td>";
79 echo '</tr>';
80 }
81 echo '</table>';
82 } else {
83 echo _('Aucun résultat');
84 }
85 }
86 ?>
87 </div>
88<?php
90?>
91 <div id="report_div" class="box"> <?php echo HtmlInput::title_box(_('Aucun rapport défini'),'report_div','none','','n')?>
92<p>
93 <a href="javascript:void(0)" class="cell" onclick="set_preference('<?php echo dossier::id()?>')"><?php echo _('Cliquez ici pour mettre à jour vos préférences')?></a>
94<p>
95</div>
96<?php
97endif;
98?>
99
100
101
102
103
104<div id="last_operation_box_div" class="box">
105<?php echo HtmlInput::title_box(_('Dernières opérations'),"last_operation_box_div",'zoom','popup_recherche('.dossier::id().')','n')?>
106
107<table class="result" >
108<?php
109$Ledger=new Acc_Ledger($cn,0);
110$last_ledger=array();
111$last_ledger=$Ledger->get_last(20);
112
113for($i=0;$i<count($last_ledger);$i++):
114 $class=($i%2==0)?' class="even" ':' class="odd" ';
115?>
116<tr <?php echo $class ?>>
117 <td class="box">
118 <?php echo smaller_date($last_ledger[$i]['jr_date_fmt'])?>
119 </td>
120 <td class="box">
121 <?php echo $last_ledger[$i]['jr_pj_number']?>
122
123 </td>
124<td class="box">
125 <?php echo h(mb_substr($last_ledger[$i]['jr_comment']??"",0,40,'UTF-8'))?>
126</td>
127<td class="box">
128<?php echo HtmlInput::detail_op($last_ledger[$i]['jr_id'], $last_ledger[$i]['jr_internal'])?>
129</td>
130<td class="num box">
131<?php echo nbm($last_ledger[$i]['jr_montant'])?>
132</td>
133
134</tr>
135<?php endfor;?>
136</table>
137
138</div>
139<div id="last_operation_management_div" class="box">
140 <?php
141 echo HtmlInput::title_box(_('Suivi'),"last_operation_management_div",'zoom','action_show('.dossier::id().')','n');
142 ?>
143 <?php
144 $gestion=new Follow_Up($cn);
145 $array=$gestion->get_last(MAX_ACTION_SHOW);
146 $len_array=count($array);
147 ?>
148 <table class="result" >
149 <?php
150 for ($i=0;$i < $len_array;$i++) :
151 ?>
152 <tr class=" <?php echo ($i%2==0)?'even':'odd'?>">
153 <td class="box">
154 <?php echo smaller_date($array[$i]['ag_timestamp_fmt']) ;?>
155 </td>
156 <td class="box">
157 <?php echo HtmlInput::detail_action($array[$i]['ag_id'], $array[$i]['ag_ref'], 1) ?>
158 </td>
159 <td class="box">
160 <?php echo mb_substr(h($array[$i]['quick_code']),0,15)?>
161 </td>
162 <td class="box cut">
163 <?php echo h($array[$i]['ag_title'])?>
164 </td>
165 </tr>
166 <?php
167 endfor;
168 ?>
169 </table>
170</div>
171</div><!-- class="row" -->
172<div id="add_todo_list" class="box" style="display:none">
173
174<form method="post">
175<?php
176$wDate=new IDate('p_date_todo');
177$wDate->id='p_date_todo';
178$wTitle=new IText('p_title');
179$wDesc=new ITextArea('p_desc');
180$wDesc->heigh=5;
181$wDesc->width=40;
182echo HtmlInput::title_box(_("Note"),"add_todo_list","hide",'',"n");
183echo _("Date")." ".$wDate->input().'<br>';
184echo _("Titre")." ".$wTitle->input().'<br>';
185echo _("Description")."<br>".$wDesc->input().'<br>';
186echo dossier::hidden();
187echo HtmlInput::hidden('tl_id',0);
188echo HtmlInput::submit('save_todo_list',_('Sauve'),'onClick="Effect.Fold(\'add_todo_list\');return true;"');
189echo HtmlInput::button('hide',_('Annuler'),'onClick="Effect.Fold(\'add_todo_list\');return true;"');
190?>
191</form>
192</div>
193</div>
194
195
smaller_date($p_date)
shrink the date, make a date shorter for the printing
Definition: ac_common.php:837
tr($p_string, $p_extra='')
Definition: ac_common.php:88
p($p_string)
Definition: ac_common.php:39
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
nbm($p_number, $p_dec=2)
format the number with a sep.
Definition: ac_common.php:137
alert($p_msg, $buffer=false)
alert in javascript
Definition: ac_common.php:738
global $g_user
if no group available , then stop
h( $row[ 'oa_description'])
if($notitle==0) $cal
foreach(array( 'l', 'gDossier') as $a) if(is_numeric($l)==false) $Ledger
$opd_description style
$wDesc
$input_from id
Definition: balance.inc.php:63
margin left
$class
Class rapport Create, view, modify and parse report.
static detail_action($ag_id, $p_mesg, $p_modify=1)
return an anchor to view the detail of an action
static detail_op($p_jr_id, $p_mesg)
return a string containing the html code for calling the modifyOperation
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
static hidden($p_name, $p_value, $p_id="")
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Definition: idate.class.php:34
Html Input.
Definition: itext.class.php:30
For the periode tables parm_periode and jrn_periode.
This class manages the table todo_list.
static to_object($p_cn, $p_array)
$all table
const MAX_ACTION_SHOW
Definition: constant.php:149
$result
Definition: dashboard.php:67
$rapport
Definition: dashboard.php:50
$ix
Definition: dashboard.php:68
$a_todo
Definition: dashboard.php:20
if( $exercice==0) else
Definition: dashboard.php:63
$array
Definition: dashboard.php:19
$todo
Definition: dashboard.php:18
$exercice
Definition: dashboard.php:60
$limit
Definition: dashboard.php:65
$report
Definition: dashboard.php:48
endfor