noalyss Version-9
calendar-list.php
Go to the documentation of this file.
1<?php
2/*
3 * * Copyright (C) 2015 Dany De Bontridder <dany@alchimerys.be>
4*
5* This program is free software; you can redistribute it and/or
6* modify it under the terms of the GNU General Public License
7* as published by the Free Software Foundation; either version 2
8* of the License, or (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program; if not, write to the Free Software
17* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 *
20 */
21
22
23/**
24 * @file
25 * @brief display the calendar as a list. Included from the Calendar::zoom_list()
26 */
27?>
28<div class="content" id="user_cal" style="width:100%">
29<?php
31 $short=$http->get('from',"string", 0);
32 $js=sprintf("calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s','notitle':%d})",
33 dossier::id(),'per_div','calendar_zoom_div','cal',$notitle);
34 echo HtmlInput::anchor(_('Calendrier'),''," onclick=\"{$js}\"") ;
36
37?>
38 <table class="result">
39<?php
40 $nb_event=count($a_event);
41 $a_status=array('R'=>_('Retard'),'N'=>'Auj.','F'=>'');
42 for ($i=0;$i<$nb_event;$i++):
43 $class=($i % 2 == 0 )? 'even':'odd';
44 $idx=$a_event[$i]['status'];
45 $class=($idx=='R')?'notice':$class;
46
47?>
48 <tr class="<?php echo $class?>">
49 <td>
50 <?php
51 echo $a_status[$idx];
52 if ($a_event[$i]['delta_days'] != 0 ) echo $a_event[$i]['delta_days']," "._('jours');
53 ?>
54 </td>
55 <td>
56 <?php echo $a_event[$i]['str_date']; ?>
57 &nbsp;
58 <?php echo $a_event[$i]['ag_hour']; ?>
59 </td>
60 <td>
61 <?php echo HtmlInput::detail_action($a_event[$i]["ag_id"],$a_event[$i]["str_name"]);?>
62 </td>
63 <td>
64 <?php echo h($a_event[$i]['ag_title']); ?>
65 </td>
66 </tr>
67
68<?php
69 endfor;
70?>
71 </table>
72
73
74</div>
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
h( $row[ 'oa_description'])
$opd_description style
$input_from id
Definition: balance.inc.php:63
$class
$a_status
$http
$nb_event
for($i=0;$i< $nb_event;$i++)($i % 2==0)? 'even' $idx
$short
static detail_action($ag_id, $p_mesg, $p_modify=1)
return an anchor to view the detail of an action
static button_action_add()
static anchor($p_text, $p_url="", $p_js="", $p_style=' class="line" ', $p_title="click", array $p_attribute=[])
Return a simple anchor with a url or a javascript if $p_js is not null then p_url will be javascript:...
manage the http input (get , post, request) and extract from an array
$all table
endfor