[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 09/13: Calendar : highlight late action
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 09/13: Calendar : highlight late action |
Date: |
Sun, 07 Jun 2015 17:57:28 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b2c50ebde6e14de3c4fd9faa0abe531123e9186b
Author: Dany De Bontridder <address@hidden>
Date: Fri Jun 5 22:00:33 2015 +0200
Calendar : highlight late action
---
include/class_calendar.php | 9 ++++++---
include/template/calendar-list.php | 9 +++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/include/class_calendar.php b/include/class_calendar.php
index 8519d34..e2c43bb 100644
--- a/include/class_calendar.php
+++ b/include/class_calendar.php
@@ -299,12 +299,15 @@ class Calendar
// union the TODO list
$sql = "
select ag_id,ag_remind_date,to_char(ag_remind_date,'DD.MM.YY') as
str_date,ag_title,ag_hour,
- coalesce(name,'interne') as str_name
+ coalesce(name,'interne') as str_name,
+ case when ag_remind_date < now() then 'R'
+ when ag_remind_date = now() then 'N'
+ else 'F'
+ end as status
from action_gestion
left join vw_fiche_name on (f_id=f_id_dest)
where
- ag_remind_date >= now()
- and ag_dest in (select p_granted from user_sec_action_profile
where p_id =$1)
+ ag_dest in (select p_granted from user_sec_action_profile where
p_id =$1)
and ag_state IN (2, 3)
order by ag_remind_date,ag_hour
";
diff --git a/include/template/calendar-list.php
b/include/template/calendar-list.php
index ca9af88..e700f0c 100644
--- a/include/template/calendar-list.php
+++ b/include/template/calendar-list.php
@@ -35,11 +35,20 @@
<table class="result">
<?php
$nb_event=count($a_event);
+ $a_status=array('R'=>_('Retard'),'N'=>'Auj.','F'=>'');
for ($i=0;$i<$nb_event;$i++):
$class=($i % 2 == 0 )? 'even':'odd';
+ $idx=$a_event[$i]['status'];
+ $class=($idx=='R')?'notice':$class;
+
?>
<tr class="<?php echo $class?>">
<td>
+ <?php
+ echo $a_status[$idx];
+ ?>
+ </td>
+ <td>
<?php echo $a_event[$i]['str_date']; ?>
<?php echo $a_event[$i]['ag_hour']; ?>
- [Noalyss-commit] [noalyss] branch master updated (6abc662 -> 71a7a72), Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 01/13: Task #1126 - Réécriture de la partie administration Effacement des plugins et todo list, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 02/13: Task #1126 - Réécriture de la partie administration Cosmetic, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 03/13: Cosmetic, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 04/13: comment, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 05/13: Fix bug in todo list, add an empty table if nothing, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 07/13: Calendar : zoom and list mode, fix height, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 06/13: Calendar : zoom and list mode, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 08/13: Calendar : zoom and list mode, fix height, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 09/13: Calendar : highlight late action,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 11/13: Documentation, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 12/13: Esthétique, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 10/13: remove style for icon in menu, Dany De Bontridder, 2015/06/07
- [Noalyss-commit] [noalyss] 13/13: Task #1092 - Ageing report Balance agée : Possibilité d'entrer une date pour les opérations entrées après cette date, Dans les fiches, pour un seul client ou fournisseur Dans les catégories de fiches : pour une catégorie de clients ou de fournisseurs ou toutes les fiches Général pour toutes les fiches clients ou fournisseurs. export CSV, Dany De Bontridder, 2015/06/07