noalyss Version-9
follow_up_filter-display_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 a list of filter for followup
26 */
27global $cn;
29$div = $http->request("ctl");
30$acces_code=$http->get("ac");
31echo \HtmlInput::title_box("liste ",$div);
33$a_list = $cn->get_array("select af_id, af_name,af_search
34from action_gestion_filter
35where af_user=$1
36order by lower(af_name)", [$login]);
37if (count($a_list) > 0) :
38
39
40?>
41<p>
42 Cliquez sur un lien pour affiche le résultat de la recherche
43</p>
44<?php
45echo \HtmlInput::filter_list("filter_list_ul");
46
47?>
48
49
50<ul id="filter_list_ul" class="list-group m-2">
51
52<?php
53foreach ($a_list as $item) :
54 $array = json_decode($item['af_search']);
55 $url = "do.php?" . http_build_query($array);
56
57?>
58
59<li id="item_fu<?=$item['af_id']?>" class="list-group-item-action" style="background-color: transparent">
60 <a href="<?=$url?>" class="line">
61 <span class="search-content">
62 <?php
63 echo h($item['af_name']);
64 ?>
65
66 </span>
67 </a>
68 <?php
69 echo \Icon_Action::trash(uniqid(), sprintf("delete_filter_followup('%s','%s')",
70 $dossier_id, $item['af_id']));
71 ?>
72 <?php
74 ?>
75
76</ul>
77<?php
78else:
79 echo span("Aucun recherche sauvée",'class="notice"');
80
82
83?>
84<ul class="list-group m-2">
85
86 <li class="list-group-item-action">
87 <?php
88 $url = "do.php?".http_build_query(["ac"=> $acces_code,"gDossier"=>$dossier_id]);
89 ?>
90 <a href="<?=$url?>" >
91 Aucun filtre
92 </a>
93 </li>
94</ul>
95
96<ul class="aligned-block">
97 <li>
98<?php
99echo \HtmlInput::button_close("$div");
100?>
101 </li>
102</ul>
span($p_string, $p_extra='')
Definition: ac_common.php:43
p($p_string)
Definition: ac_common.php:39
h( $row[ 'oa_description'])
$opd_description style
static id()
return the 'gDossier' value after a check
manage the http input (get , post, request) and extract from an array