[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 12/38: Task #02326: Suivi : possibilité de ch
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 12/38: Task #02326: Suivi : possibilité de charger plusieurs documents |
Date: |
Sun, 18 Feb 2024 07:30:43 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit 057c2e6acc457242c1b53e99f1257717421a17b1
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Feb 3 14:16:14 2024 +0100
Task #02326: Suivi : possibilité de charger plusieurs documents
---
include/class/document.class.php | 7 +++++--
include/class/follow_up.class.php | 3 ++-
include/template/follow_up-display.php | 21 ++++++++++++++++++++-
3 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/include/class/document.class.php b/include/class/document.class.php
index 6a6881d25..82b0b8055 100644
--- a/include/class/document.class.php
+++ b/include/class/document.class.php
@@ -451,7 +451,6 @@ class Document
* all the needed data are in $_FILES we don't increment the seq
* $_FILES : array containing by default $_FILES
* @param int $p_ag_id ACTION_GESTION.AG_ID
- * @param int $agc_id ACTION_GESTION_COMMENT.AGC_ID
* @returns array of int DOCUMENT.D_ID (id of saved documents )
*
*/
@@ -498,8 +497,12 @@ class Document
// insert into the table
$sql="insert into document (ag_id,
d_lob,d_filename,d_mimetype,d_number,d_description)"
. " values ($1,$2,$3,$4,$5,$6) returning d_id";
- $document_saved[]=$this->db->get_value($sql,
+ $document_id=$this->db->get_value($sql,
array($p_ag_id, $this->d_lob, $this->d_filename,
$this->d_mimetype, 1, $this->d_description));
+
+
+ $document_saved[]=$document_id;
+
}
} /* end for */
$this->db->commit();
diff --git a/include/class/follow_up.class.php
b/include/class/follow_up.class.php
index c4f260a09..8a3b426aa 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -995,7 +995,8 @@ class Follow_Up
where agc_id = $4 "
, array(strip_tags($this->ag_description),
$this->ag_description, $_SESSION[SESSION_KEY.'g_user'],
$this->ag_description_id));
-
+ $this->db->exec_sql("insert into
action_comment_document(document_id,action_gestion_comment_id) values ($1,$2)",
+ [$document_id,$this->ag_description_id]);
}
$this->insert_operation();
$this->insert_action();
diff --git a/include/template/follow_up-display.php
b/include/template/follow_up-display.php
index f3851b047..e9156d542 100644
--- a/include/template/follow_up-display.php
+++ b/include/template/follow_up-display.php
@@ -3,6 +3,7 @@
//This file is part of NOALYSS and is under GPL
//see licence.txt
$uniq=uniqid("tab",TRUE);
+$dossier_id=Dossier::id();
?>
<div>
<?php
@@ -345,7 +346,25 @@ function small(p_id_textarea){
echo $description->input();
echo '</div>';
}
+ // link to files to download
+ $aFile=$this->db->get_array('select
d_id,d_filename,d_description,d_mimetype
+ from action_comment_document
+ join document on (d_id=document_id) where
action_gestion_comment_id=$1'
+ , array($this->ag_id));
+ if ( ! empty ($aFile)) {
+ echo '<div style="left:10%">';
+ echo _("Fichiers :");
+ foreach ($aFile as $file)
+ {
+ $url="export.php?".http_build_query(array("act"=>'RAW:document'
+ ,"gDossier"=>$dossier_id
+ ,"d_id"=>$file["d_id"]));
+ printf('<a class="print_line" href="%s">%s</a>',
+ $url,h($file['d_filename']));
+ }
+ echo '</div>';
+ }
//---------------------------------- Comment
-----------------------------------------------------------------------
@@ -391,7 +410,7 @@ function small(p_id_textarea){
echo '</span>';
}
}
- $dossier_id=Dossier::id();
+
if ( count($acomment) > 0
&& Document_Option::can_add_comment($ag_id)
&& Document_Option::option_comment($this->dt_id) == "SOME_FIXED")
- [Noalyss-commit] [noalyss] branch devel updated (23653dddb -> 910ae8b9f), dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 06/38: Task #2219 Suivi Cosmétique et PHP8.1 Compatibility, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 01/38: Cosmetic : Alignement, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 15/38: bug follow-up, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 12/38: Task #02326: Suivi : possibilité de charger plusieurs documents,
dwm <=
- [Noalyss-commit] [noalyss] 04/38: Tableau de bord : position des détail, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 02/38: Correction : prevent direct access to $_REQUEST, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 03/38: version 9.2, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 08/38: Task #2128 : Comptabilité française : report, montre le solde de l'année et depuis le début pour les fiches, postes en HTML et PDF, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 05/38: SUIVI : détail , montre nom et prénom, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 19/38: version 9.2, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 33/38: CARD : add button to epxort to PDF, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 26/38: Task #2321: erreur de numérotation, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 29/38: cosmetic, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 10/38: Filtre ne fonctionne pas tva_search_id est vide, dwm, 2024/02/18