noalyss Version-9
folder_display.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 folders the user has no access and permit to add them
26 * thanks ajax call.
27 *
28 * The received parameter are
29 * - $a_dossier, the result of Dossier::show_dossier
30 * - $user_id id of the user
31 *
32 */
33echo js_include('admin.js');
34if ( count($a_dossier) == 0 )
35{
36 echo '<h1 class="notice">'._('Aucun dossier à afficher').'</h1>';
37 return;
38}
39?>
40<table id="folder_display_tb" class="result">
41<?php
42$nb_dossier=count($a_dossier);
43for ($i=0;$i<$nb_dossier;$i++):
44 $class=($i%2==0)?"even":"odd";
45?>
46 <tr id="row_db_<?php echo $a_dossier[$i]['dos_id'];?>" class="<?php echo $class?>">
47 <td>
48 <?php
49 echo HtmlInput::button('add_folder',BUTTONADD, " onclick=\"folder_add({$user_id},{$a_dossier[$i]['dos_id']});\"", ' smallbutton');
50 ?>
51
52 </td>
53 <td>
54 <?php
55 echo $a_dossier[$i]['dos_id'];
56 ?>
57 </td>
58 <td>
59 <?php
60 echo h($a_dossier[$i]['dos_name']);
61 ?>
62 </td>
63 <td>
64 <?php
65 echo h($a_dossier[$i]['dos_description']);
66 ?>
67 </td>
68 </tr>
69<?php
71?>
72</table>
73<?php
74echo HtmlInput::button_close("folder_list_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'])
$class
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
$all table
const BUTTONADD
Definition: constant.php:102
if(count($a_dossier)==0) $nb_dossier
endfor
js_include($p_string)
create the HTML for including of a javascript file if a file is included twice, the second time it wi...