From b5f057051b1e928ac2703de4719d318966bee5f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Jan 2016 15:45:05 +0100 Subject: [PATCH 1/4] Fix: Missing param into link --- htdocs/comm/action/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index e8a355dd1e3..19633aa13d7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -755,7 +755,7 @@ if ($action == 'create') { $events=array(); - $events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); + $events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); //For external user force the company to user company if (!empty($user->societe_id)) { print $form->select_thirdparty_list($user->societe_id,'socid','',1,1,0,$events); From a0fc26fbd8fb98fdc4688516cc86bfbb99e67f81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Jan 2016 17:09:59 +0100 Subject: [PATCH 2/4] Fix missing orde by --- htdocs/comm/action/peruser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index b7b108537f7..318e96f7122 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -686,7 +686,7 @@ else // Load array of colors by type $colorsbytype=array(); $labelbytype=array(); -$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm"; +$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; $resql=$db->query($sql); while ($obj = $db->fetch_object($resql)) { From 6acd31f8ade4ff9498befa90beb92be46cef0697 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Jan 2016 00:44:38 +0100 Subject: [PATCH 3/4] Fix: style required in create or edit mode only --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 2929b66e80c..cd3386d5d90 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4099,7 +4099,7 @@ abstract class CommonObject } if($extrafields->attribute_required[$key]) - $label = ''.$label.''; + $label = ''.$label.''; $out .= ''.$langs->trans($label).''; $out .=''; From cb24f2b3720611474f91799f53515dfce5e6f11b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Jan 2016 01:52:16 +0100 Subject: [PATCH 4/4] Fix missing type in list --- htdocs/comm/action/listactions.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 7b004dc6191..447a247ad56 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -289,6 +289,7 @@ if ($resql) print ''; print ''; print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder); + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"a.datep",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"a.datep2",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder); @@ -299,6 +300,11 @@ if ($resql) print ''; print ''; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + print ''; + //print ''; + } print ''; @@ -318,6 +324,10 @@ if ($resql) $now=dol_now(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; + $caction=new CActionComm($db); + $arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0)); + $var=true; while ($i < min($num,$limit)) { @@ -343,6 +353,13 @@ if ($resql) print $actionstatic->getNomUrl(1,28); print ''; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + $labeltype=$obj->type_code; + if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype]; + print ''; + } + // Start date print '
'; print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print ''.dol_trunc($labeltype,24).''; print dol_print_date($db->jdate($obj->dp),"dayhour");