[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENT
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENTS |
Date: |
Mon, 26 Oct 2020 18:27:33 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 1e574aac74b763a6434a8728e6bdb25d2c830dba
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Mon Oct 12 18:38:38 2020 +0200
Follow-Up create doc new Tags COMMENTS
---
include/class/document.class.php | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/include/class/document.class.php b/include/class/document.class.php
index 2752d88..dc029f8 100644
--- a/include/class/document.class.php
+++ b/include/class/document.class.php
@@ -548,7 +548,6 @@ class Document
$p_tag=strtoupper($p_tag);
$p_tag=str_replace('=','',$p_tag);
$r="Tag inconnu";
-
switch ($p_tag)
{
case 'DATE':
@@ -1168,10 +1167,13 @@ class Document
if ( ! isset ($p_array['repo'])) return "";
$ret=$this->db->get_value('select r_phone from
public.stock_repository where r_id=$1',array($p_array['repo']));
return $ret;
+ // Follow up
+ //Title
case 'TITLE':
if ( isset($p_array['ag_title'])) return
$p_array['ag_title'];
return "";
break;
+ // Description
case 'DESCRIPTION':
if ( isset($p_array['ag_id'])) {
// retrieve first comment
@@ -1183,17 +1185,39 @@ class Document
}
return "";
break;
+ // Comment
case 'COMMENT':
if ( isset($p_array['ag_id'])) {
// retrieve first comment
- $aComment=$this->db->get_array("select agc_comment "
+ $description=$this->db->get_array("select agc_comment ,"
+ . " to_char(agc_date,'DD-MM-YY HH24:MI') as str_date ,"
+ . " tech_user "
+ . " from action_gestion_comment "
+ . "where ag_id=$1 order by 1 asc limit 2"
+ ,[$p_array['ag_id']]);
+ if ( count($description) == 2 ) {
+ return $description[1]['agc_comment'];
+ }
+ }
+ return "";
+ break;
+ // Comments
+ case 'COMMENTS':
+ if ( isset($p_array['ag_id'])) {
+ // retrieve first comment
+ $aComment=$this->db->get_array("select agc_comment ,"
+ ." to_char(agc_date,'DD-MM-YY HH24:MI') as str_date ,"
+ . " tech_user "
. " from action_gestion_comment "
. "where ag_id=$1 order by 1"
,[$p_array['ag_id']]);
$nb_comment=count($aComment);
$description="";
for ($i=0;$i< $nb_comment;$i++) {
- $description.=$aComment[$i]['agc_comment']."\n";
+ $description.= sprintf(_('le %s , %s écrit %s'."\n"),
+ $aComment[$i]['str_date'],
+ $aComment[$i]['tech_user'],
+ $aComment[$i]['agc_comment']);
}
return $description;
}
- [Noalyss-commit] [noalyss] 56/119: Cosmetic for cells for tag and contact, (continued)
- [Noalyss-commit] [noalyss] 56/119: Cosmetic for cells for tag and contact, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 58/119: Missing file, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 72/119: Tag Limit column size , replace input_switch by check_box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 61/119: Search Card Paginate, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return a string instead, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 81/119: Search card :typo, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 90/119: select_box cosmetic font, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENTS,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 93/119: Follow-up new column "Status", Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 98/119: Follow up add followup action, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 103/119: Improve : Quick filter on history, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 84/119: Merge extension-crm, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 96/119: Cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 100/119: Notice, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 101/119: Grand livre waiting box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 107/119: Follow-Up : comment optional, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 108/119: fix SQL bug, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 113/119: Bug : create card failed, Dany De Bontridder, 2020/10/26