noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 04/06: Improve calendar list, add the differe


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 04/06: Improve calendar list, add the difference in days + tiers name
Date: Wed, 01 Jul 2015 07:01:59 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit ff5dbdbaa468fd5f1e46e6a3538717c61d6f35dc
Author: Dany De Bontridder <address@hidden>
Date:   Wed Jul 1 08:51:26 2015 +0200

    Improve calendar list, add the difference in days + tiers name
---
 include/class_calendar.php         |    3 ++-
 include/template/calendar-list.php |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/class_calendar.php b/include/class_calendar.php
index e2c43bb..5903ed2 100644
--- a/include/class_calendar.php
+++ b/include/class_calendar.php
@@ -303,7 +303,8 @@ class Calendar
              case when ag_remind_date < now() then 'R' 
                 when ag_remind_date = now() then 'N' 
                 else 'F'
-              end as status
+              end as status,
+              coalesce (ag_remind_date::date,current_date) - current_date as 
delta_days
               from action_gestion 
                left join vw_fiche_name  on (f_id=f_id_dest)
               where 
diff --git a/include/template/calendar-list.php 
b/include/template/calendar-list.php
index e700f0c..252b0b3 100644
--- a/include/template/calendar-list.php
+++ b/include/template/calendar-list.php
@@ -46,6 +46,7 @@
             <td>
                 <?php
                 echo $a_status[$idx];
+                if ($a_event[$i]['delta_days'] != 0 ) echo 
$a_event[$i]['delta_days']," "._('jours');
                 ?>
             </td>
             <td>
@@ -54,7 +55,7 @@
                 <?php echo $a_event[$i]['ag_hour']; ?>
             </td>
             <td>
-                <?php echo 
HtmlInput::detail_action($a_event[$i]["ag_id"],$a_event[$i]["ag_title"]);?>
+                <?php echo 
HtmlInput::detail_action($a_event[$i]["ag_id"],$a_event[$i]["str_name"]);?>
             </td>
             <td>
                 <?php echo h($a_event[$i]['ag_title']); ?>



reply via email to

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