noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/19: Code change + typo


From: dwm
Subject: [Noalyss-commit] [noalyss] 01/19: Code change + typo
Date: Wed, 25 Sep 2024 06:45:01 -0400 (EDT)

sparkyx pushed a commit to branch unstable
in repository noalyss.

commit 0af5f4c56886fa113526c641704c0db1b1679f11
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Sep 19 17:04:09 2024 +0200

    Code change + typo
---
 include/lib/icard.class.php            |  3 ++-
 include/lib/manage_table_sql.class.php | 23 ++++++++++++++---------
 include/template/card_result.php       |  2 +-
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/include/lib/icard.class.php b/include/lib/icard.class.php
index 01b5a8dc0..246031414 100644
--- a/include/lib/icard.class.php
+++ b/include/lib/icard.class.php
@@ -402,7 +402,8 @@ class ICard extends HtmlInput
         $this->callback=$p_name;
     }
 
-    /**\brief set the javascript callback function
+    /**
+     * \brief set the javascript callback function
      * by default it is update_value called AFTER an item has been selected
      * \param $p_name callback function name
      */
diff --git a/include/lib/manage_table_sql.class.php 
b/include/lib/manage_table_sql.class.php
index e0f2b6b39..1bcda177a 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -824,11 +824,22 @@ function check()
         $ret=$this->table->seek($p_order, $p_array);
         return $ret;
     }
+
+    /**
+     * @brief echo the HTML to have a button add
+     * @return void
+     */
+    protected function create_button_add() {
+        echo HtmlInput::button_action(" "._("Ajout"),
+            sprintf("%s.input('-1','%s')",
+                $this->object_name,
+                $this->object_name), "xx", "smallbutton", BUTTONADD);
+    }
     /**
      * @brief display the data of the table
      * @param $p_order is the cond or order of the rows, 
      * if empty the primary key will be used
-     * @param $p_array array of the bind variables
+     * @param $p_array array of the bind variables of the SQL ($p_order)
      * @note the function create_js_script MUST be called before this function
      */
     function display_table($p_order="", $p_array=NULL)
@@ -837,10 +848,7 @@ function check()
         $nb=Database::num_row($ret);
         if ($this->can_append_row()==TRUE && $this->button_add_top == true)
         {
-            echo HtmlInput::button_action(" "._("Ajout"),
-                    sprintf("%s.input('-1','%s')", 
-                            $this->object_name,
-                            $this->object_name), "xx", "smallbutton", 
BUTTONADD);
+           echo $this->create_button_add();
         }
         $nb_order=count($this->a_order);
         $virg=""; $result="";
@@ -880,10 +888,7 @@ function check()
         echo "</table>";
         if ($this->can_append_row()==TRUE)
         {
-            echo HtmlInput::button_action(" "._("Ajout"),
-                    sprintf("%s.input('-1','%s')", 
-                            $this->object_name,
-                            $this->object_name), "xx", "smallbutton", 
BUTTONADD);
+            echo $this->create_button_add();
         }
         printf('<script> alternate_row_color("tb%s");</script>',
                 $this->object_name);
diff --git a/include/template/card_result.php b/include/template/card_result.php
index 4e5f7f5f5..1e6078e9d 100644
--- a/include/template/card_result.php
+++ b/include/template/card_result.php
@@ -67,7 +67,7 @@ if ( $accvis == 1 ) :
 <?php endfor; ?>
 </table>
 <span style="font-style: italic;">
-    <?php echo _("Nombre d'enregistrements trouvé:$total_card"); ?>
+    <?php printf ( _("Nombre d'enregistrements trouvés:%s"),$total_card); ?>
 </span>
 <br>
 </div>



reply via email to

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