noalyss Version-9
profile_menu_display_submenu.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 a submenu contained in a array
26 * @param $a_module contains rows from profile_menu
27 * @param $p_module_id is the module / menu id main menu
28 * @see Profile_Menu::display_module_menu
29 */
30?>
31 <?php
33 for ($i=0;$i < $nb_module ; $i ++ ):
34 ?>
35 <td id="sub<?php echo $a_module[$i]['pm_id']?>" class="tool">
36 <?php
37 if ( $a_module[$i]['me_file'] != "") {
38 $url=$a_module[$i]['me_file'];
39 } else if ( $a_module[$i]['me_url'] != "") {
40 $url=h($a_module[$i]['me_url'] );
41 } else if ($a_module[$i]['me_javascript'] != "") {
42 $url="-> javascript";
43 } else {
44 $url = HtmlInput::anchor("sous-menu", "x",
45 sprintf(" onclick = \" display_sub_menu(%d,%d,%d,%d)\"",Dossier::id(),$this->p_id,$a_module[$i]['pm_id'],$p_level),
46 ' class="line" ');
47 }
48 ?>
49 <?php
50 echo HtmlInput::anchor($a_module[$i]['me_code']. " ".
51 gettext($a_module[$i]['me_menu']),'',
52 sprintf(" onclick =\"mod_menu (%d,%d) \" ",Dossier::id(),$a_module[$i]['pm_id']),
53 ' class="line" ')?>
54 <span>
55 <?php
56 echo Icon_Action::trash(uniqid(), sprintf (" remove_sub_menu(%d,%d)", Dossier::id()
57 ,$a_module[$i]['pm_id']));
58 ?>
59 </span>
60 <br/>
61 <?php echo $url;?>
62 <p>
63 <?php echo _('ordre apparition') , " ",$a_module[$i]['p_order'];?>
64 <p>
65 <?php echo _('Default')," : ",
66 ($a_module[$i]['pm_default']==1)?_('Oui'):_('Non')
67 ?>
68 </p>
69 </td>
70 <?php
72 ?>
73<td>
74 <?php
76 sprintf("add_menu({dossier:%d,p_id:%d,type:'%s',p_level:%d,dep:'%s'})",
77 Dossier::id(),$this->p_id,'me',$p_level,$p_module_id)
78 ,"xx",'smallbutton')
79 ?>
80
81</td>
span($p_string, $p_extra='')
Definition: ac_common.php:43
p($p_string)
Definition: ac_common.php:39
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
$p_level
h( $row[ 'oa_description'])
$url
$profile p_id
static id()
return the 'gDossier' value after a check
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:...
static button_action($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
button Html with javascript
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
$a_module[ $i][ 'pm_default'] endfor
$a_module[$i]['p_order']