From 473ab1830600637bc41f3008877247882806e460 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 6 Jun 2016 15:48:41 +0200
Subject: [PATCH] Fix link on workboard Fix warning picto is missing on task
 list

---
 htdocs/comm/action/class/actioncomm.class.php | 1 +
 htdocs/projet/class/project.class.php         | 9 ++++-----
 htdocs/projet/tasks/list.php                  | 4 +++-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index c0e1f11579c..6b77e2414da 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -932,6 +932,7 @@ class ActionComm extends CommonObject
 	        $response->warning_delay = $conf->agenda->warning_delay/60/60/24;
 	        $response->label = $langs->trans("ActionsToDo");
 	        $response->url = DOL_URL_ROOT.'/comm/action/listactions.php?status=todo&amp;mainmenu=agenda';
+	        if ($user->rights->agenda->allactions->read) $response->url.='&amp;filtert=-1';
 	        $response->img = img_object($langs->trans("Actions"),"action");
 
             // This assignment in condition is not a bug. It allows walking the results.
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 1de8027dd0e..43b738021ee 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -1627,8 +1627,8 @@ class Project extends CommonObject
             $response = new WorkboardResponse();
             $response->warning_delay = $conf->projet->warning_delay/60/60/24;
             $response->label = $langs->trans("OpenedProjects");
-            if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/index.php?search_status=1&mainmenu=project';
-            else $response->url = DOL_URL_ROOT.'/projet/index.php?mode=mine&search_status=1&mainmenu=project';
+            if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project';
+            else $response->url = DOL_URL_ROOT.'/projet/list.php?mode=mine&search_status=1&mainmenu=project';
             $response->img = img_object($langs->trans("Projects"),"project");
     
             // This assignment in condition is not a bug. It allows walking the results.
@@ -1719,9 +1719,8 @@ class Project extends CommonObject
 	{
 	    global $conf;
 	
-        if (! ($this->statut == 1)) {
-            return false;
-        }
+        if (! ($this->statut == 1)) return false;
+        if (! $this->datee) return false;
 
         $now = dol_now();
 
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index 8ec4eeffedb..c37812a511f 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2005      Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2006-2015 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2006-2016 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2006-2010 Regis Houssin        <regis.houssin@capnetworks.com>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -550,6 +550,7 @@ if ($resql)
     	$projectstatic->title = $obj->projecttitle;
     	$projectstatic->public = $obj->public;
     	$projectstatic->statut = $obj->projectstatus;
+    	$projectstatic->datee = $obj->date_end;
     	
     	$taskstatic->id = $obj->id;
     	$taskstatic->ref = $obj->ref;
@@ -568,6 +569,7 @@ if ($resql)
         	{
         		print '<td class="nowrap">';
         		print $projectstatic->getNomUrl(1, 'task');
+        		if ($projectstatic->hasDelay()) print img_warning("Late");
         		print '</td>';
         	}
     		// Title
-- 
GitLab