noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 04/06: FOLLOWUP-FILTER : cosmetic


From: dwm
Subject: [Noalyss-commit] [noalyss] 04/06: FOLLOWUP-FILTER : cosmetic
Date: Sun, 25 Feb 2024 13:07:20 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 8936ba5bf3c4e91d8a4da292e4364c58df792cda
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Feb 18 14:53:37 2024 +0100

    FOLLOWUP-FILTER :  cosmetic
---
 include/ajax/ajax_follow_up.php                    |  2 +-
 include/template/follow_up_filter-display_list.php | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/include/ajax/ajax_follow_up.php b/include/ajax/ajax_follow_up.php
index b5554c410..31552014d 100644
--- a/include/ajax/ajax_follow_up.php
+++ b/include/ajax/ajax_follow_up.php
@@ -166,6 +166,6 @@ if ( $op == 'list_filter_followup') {
  * delete_filter_followup(p_dossier,filter_id)
  
*******************************************************************************************************************/
 if ( $op == 'delete_filter_followup') {
-    $cn->exec_delete("delete from action_gestion_id where af_id=$1 and 
af_user=$2",
+    $cn->exec_sql("delete from action_gestion_filter where af_id=$1 and 
af_user=$2",
     [$http->get("filter_id","number"),$g_user->getLogin()]);
 }
diff --git a/include/template/follow_up_filter-display_list.php 
b/include/template/follow_up_filter-display_list.php
index 01fe4f112..eb6373a79 100644
--- a/include/template/follow_up_filter-display_list.php
+++ b/include/template/follow_up_filter-display_list.php
@@ -29,16 +29,12 @@ $http = new HttpInput();
 $div = $http->request("ctl");
 $acces_code=$http->get("ac");
 echo \HtmlInput::title_box("liste ",$div);
-
+$dossier_id = Dossier::id();
 $a_list = $cn->get_array("select af_id, af_name,af_search 
 from action_gestion_filter 
 where af_user=$1 
 order by lower(af_name)", [$login]);
-if (count($a_list) == 0) {
-    echo_warning("Aucun filtre");
-    echo \HtmlInput::button_close($div);
-    return;
-}
+if (count($a_list) > 0) :
 
 
 ?>
@@ -57,7 +53,7 @@ echo \HtmlInput::filter_list("filter_list_ul");
 foreach ($a_list as $item) :
     $array = json_decode($item['af_search']);
     $url = "do.php?" . http_build_query($array);
-    $dossier_id = Dossier::id();
+
 ?>
 
 <li id="item_fu<?=$item['af_id']?>" class="list-group-item-action" 
style="background-color: transparent">
@@ -78,6 +74,13 @@ foreach ($a_list as $item) :
     ?>
 
 </ul>
+<?php
+else:
+    echo span("Aucun recherche sauvée",'class="notice"');
+
+endif;
+
+?>
 <ul  class="list-group m-2">
 
     <li class="list-group-item-action">



reply via email to

[Prev in Thread] Current Thread [Next in Thread]