noalyss Version-9
profile_menu_display_module.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 * @file
23 * @brief display the module, used to setup the module and menu, included from
24 * Profile_Menu
25 */
27?>
28 <div id="module_setting" class="content">
29 <table class="result">
30 <tr>
31 <?php
32 $dep=$http->post("dep","string", 0);
33 foreach ($ap_module as $row):
34 $js="";
36 if ( $row['me_code']=='new_line')
37 {
38 echo "</tr><tr>";
39 continue;
40 }
41 $style=($dep == $row['pm_id'])?" selectedcell":" tool ";
42 $url="XX";
43 if ( $row['me_url']!='')
44 {
45 $url=$row['me_url'];
46 }
47 elseif ($row['me_javascript'] != '')
48 {
49 $url=$row['me_javascript'];
50 }
51 elseif ( $row['me_file'] != "")
52 {
53 $url=$row['me_file'];
54 }
55 else
56 {
57 $url=HtmlInput::anchor(_('Menu'),'',
58 sprintf(" onclick = \" \$('menu_table').innerHTML='';display_sub_menu(%d,%d,%d,%d);menu_select('".$row['pm_id']."')\" ",
60 $this->p_id,
61 $row['pm_id'],0));
62 }
63 ?>
64 <td class="<?php echo $style?>" id="sub<?php echo $row['pm_id']?>">
65 <?php echo HtmlInput::anchor($row['me_code']." ".gettext($row['me_menu']),'',sprintf(" onclick =\"mod_menu (%d,%d) \" ",Dossier::id(),$row['pm_id']),' class="line" ')?>
66 <span>
67 <?php
68 echo Icon_Action::trash(uniqid(), sprintf (" remove_sub_menu(%d,%d)", Dossier::id(),$row['pm_id']))
69 ?>
70 </span>
71 <p>
72 <?php echo _($row['me_description']??"")?>
73 </p>
74 <p>
75 <?php echo $url?>
76 </p>
77 <p>
78 <?php echo _('ordre apparition') , " ",$row['p_order'];?>
79 <p>
80 <?php echo _('Default')," : ",
81 ($row['pm_default']==1)?_('Oui'):_('Non')
82 ?>
83 </p>
84
85 </td>
86 <?php
88 ?>
89 <td>
90 <?php
92 sprintf("add_menu({dossier:%d,p_id:%d,type:'%s',p_level:%d,dep:0})",
93 Dossier::id(),$this->p_id,'me',0)
94 ,"xx",'smallbutton')
95 ?>
96 </td>
97 </tr>
98 </table>
99 </div>
100
101<div id='sub_menu_div'>
102 <table id="menu_table" class="result">
103
104 </table>
105</div>
106
span($p_string, $p_extra='')
Definition: ac_common.php:43
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
$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
manage the http input (get , post, request) and extract from an array
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
$all table
if( $delta< 0) elseif( $delta==0)
$row[ 'pm_default'] endforeach
Dossier::id() $row['pm_id']
foreach($ap_module as $row) $style