noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
fiche_def-input_detail-2.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS 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 NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright Author Dany De Bontridder danydb@aevalys.eu 4/08/24
20/*!
21 * \file
22 * \brief manage attribut
23 */
24$cn = Dossier::connect();
25
26$existing_attribut = $cn->get_array('
27 select jnt_id,ad_id,ad_text,jnt_order
28 from attr_def
29 join jnt_fic_attr jfa using (ad_id )
30 where
31 fd_id=$1 order by jnt_order ', [$this->id]);
32
34 select ad_id,ad_text,ad_default_order
35 from attr_def
36 where
37 ad_id not in (select ad_id from jnt_fic_attr jfa where fd_id=$1) order by 2', [$this->id]);
38
39?>
40 <?php Noalyss\Dbg::echo_file(__FILE__);?>
41<div class="row">
42 <div class="col">
43 <h3>Attributs de la classe</h3>
44 <ul id="attribut_card" class="list-unstyled" style="cursor: move;">
45 <?php
46 $i = 0;
47 foreach ($existing_attribut as $item):
48
49 Fiche_Def::print_existing_attribut($item['ad_id'], $item['ad_text']);
50 ?>
51
52
53 <?php
55 ?>
56 </ul>
57 </div>
58 <div class=" col-2">
59 <h4> Ranger les attributs</h4>
60 <p>
61 Déplacer les attributs de la fiche en cliquant et déplacer sans relacher le bouton de la souris.
62 </p>
63
64 <p>
65 Supprimer un attribut n'est pas réversible:() les données de ces attributs
66 seront définitivement perdus.
67 </p>
68 <p>
69 Ajouter des attributs depuis les attributs disponibles en cliquant sur la flèche.
70 </p>
71 <p>
72 <input type="button" class="button" onclick="categoryCardDefinition.save();return false" value="Sauve">
73 </p>
74
75 </div>
76
77 <div class="col border-dark">
78 <h3>Attributs disponibles</h3>
79 <?php
80 echo HtmlInput::filter_list("avail_attribut_id", '0', '0');
81 ?>
82 <ul id="avail_attribut_id" style="width: 90%" class="list-unstyled">
83 <?php
84 $i = 0;
85 foreach ($available_attribut as $item):
86 $class = ($i % 2 == 0) ? 'even' : 'odd';
87 $i++;
88 Fiche_Def::print_available_attribut($item['ad_id'], $item['ad_text'], $class);
89 ?>
90 <?php
91 endforeach;
92 ?>
93
94 </ul>
95
96 </div>
97
98</div>
99</div>
100<div class="row">
101
102 <script>
103
104 (function () {
105 Sortable.create('attribut_card', {tag: 'li',hoverclass:'hoverclass-drag'});
106 })();
107
108 var categoryCardDefinition=new CategoryCardDefinition(<?=Dossier::id()?>,<?=$this->id?>);
109 </script>
p($p_string)
Definition ac_common.php:39
if(isset($tot['tva'][$a]))($tot['tva'][$a])?></td ><?php else endforeach
$opd_description style
static print_existing_attribut($attribut_id, $attribut_text)
display existing attribut
static echo_file($msg, $print=true)
display the file
Definition dbg.php:88
vous n