diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index eeb01cfb116..03c087e1a4e 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -133,7 +133,7 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) { $assignedtouser=json_decode($_SESSION['assignedtouser'], true); } - $assignedtouser[GETPOST('assignedtouser')]=array('id'=>GETPOST('assignedtouser'), 'transparency'=>GETPOST('transparency'),'mandatory'=>1); + $assignedtouser[GETPOST('assignedtouser')]=array('id'=>GETPOST('assignedtouser'), 'transparency'=>GETPOST('transparency'), 'mandatory'=>1); $_SESSION['assignedtouser']=json_encode($assignedtouser); } $donotclearsession=1; @@ -439,7 +439,7 @@ if ($action == 'update') if (! empty($_SESSION['assignedtouser'])) // Now concat assigned users { // Restore array with key with same value than param 'id' - $tmplist1=json_decode($_SESSION['assignedtouser'], true); $tmplist2=array(); + $tmplist1=json_decode($_SESSION['assignedtouser'], true); foreach($tmplist1 as $key => $val) { if ($val['id'] > 0 && $val['id'] != $assignedtouser) $listofuserid[$val['id']]=$val; @@ -449,7 +449,6 @@ if ($action == 'update') $assignedtouser=(! empty($object->userownerid) && $object->userownerid > 0 ? $object->userownerid : 0); if ($assignedtouser) $listofuserid[$assignedtouser]=array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>($user->id == $assignedtouser ? $transparency : '')); // Owner first } - $object->userassigned=array(); $object->userownerid=0; // Clear old content $i=0; foreach($listofuserid as $key => $val) @@ -460,6 +459,7 @@ if ($action == 'update') } $object->transparency = $transparency; // We set transparency on event (even if we can also store it on each user, standard says this property is for event) + // TODO store also transparency on owner user if (! empty($conf->global->AGENDA_ENABLE_DONEBY)) { @@ -954,11 +954,11 @@ if ($id > 0) $object->location = GETPOST('location'); $object->socid = GETPOST("socid"); $socpeopleassigned = GETPOST("socpeopleassigned",'array'); - foreach ($socpeopleassigned as $id) $object->socpeopleassigned[$id] = array('id' => $id); + foreach ($socpeopleassigned as $tmpid) $object->socpeopleassigned[$id] = array('id' => $tmpid); $object->contactid = GETPOST("contactid",'int'); $object->fk_project = GETPOST("projectid",'int'); - $object->note = GETPOST("note"); + $object->note = GETPOST("note",'none'); } if ($result1 < 0 || $result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0) @@ -1136,11 +1136,21 @@ if ($id > 0) $listofuserid=array(); // User assigned if (empty($donotclearsession)) { - if ($object->userownerid > 0) $listofuserid[$object->userownerid]=array('id'=>$object->userownerid, 'type'=>'user', 'transparency'=>$object->userassigned[$user->id]['transparency'], 'answer_status'=>$object->userassigned[$user->id]['answer_status'], 'mandatory'=>$object->userassigned[$user->id]['mandatory']); // Owner first + if ($object->userownerid > 0) + { + $listofuserid[$object->userownerid]=array( + 'id'=>$object->userownerid, + 'type'=>'user', + //'transparency'=>$object->userassigned[$user->id]['transparency'], + 'transparency'=>$object->transparency, // Force transparency on ownerfrom event + 'answer_status'=>$object->userassigned[$object->userownerid]['answer_status'], + 'mandatory'=>$object->userassigned[$object->userownerid]['mandatory'] + ); + } if (! empty($object->userassigned)) // Now concat assigned users { // Restore array with key with same value than param 'id' - $tmplist1=$object->userassigned; $tmplist2=array(); + $tmplist1=$object->userassigned; foreach($tmplist1 as $key => $val) { if ($val['id'] && $val['id'] != $object->userownerid) @@ -1384,11 +1394,19 @@ if ($id > 0) $listofuserid=array(); if (empty($donotclearsession)) { - if ($object->userownerid > 0) $listofuserid[$object->userownerid]=array('id'=>$object->userownerid,'transparency'=>$object->transparency); // Owner first + if ($object->userownerid > 0) + { + $listofuserid[$object->userownerid]=array( + 'id'=>$object->userownerid, + 'transparency'=>$object->transparency, // Force transparency on onwer from preoperty of event + 'answer_status'=>$object->userassigned[$object->userownerid]['answer_status'], + 'mandatory'=>$object->userassigned[$object->userownerid]['mandatory'] + ); + } if (! empty($object->userassigned)) // Now concat assigned users { // Restore array with key with same value than param 'id' - $tmplist1=$object->userassigned; $tmplist2=array(); + $tmplist1=$object->userassigned; foreach($tmplist1 as $key => $val) { if ($val['id'] && $val['id'] != $object->userownerid) $listofuserid[$val['id']]=$val; @@ -1403,6 +1421,7 @@ if ($id > 0) $listofuserid=json_decode($_SESSION['assignedtouser'], true); } } + $listofcontactid=array(); // not used yet $listofotherid=array(); // not used yet print '
| '; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { if ($actionstatic->type_picto) print img_picto('', $actionstatic->type_picto); else { - if ($actionstatic->type_code == 'AC_RDV') print img_picto('', 'object_group').' '; - if ($actionstatic->type_code == 'AC_TEL') print img_picto('', 'object_phoning').' '; - if ($actionstatic->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax').' '; - if ($actionstatic->type_code == 'AC_EMAIL') print img_picto('', 'object_email').' '; + if ($actionstatic->type_code == 'AC_RDV') print img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_TEL') print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_EMAIL') print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_INT') print img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; + elseif (! preg_match('/_AUTO/', $actionstatic->type_code)) print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; } } $labeltype=$obj->type_code; @@ -603,15 +607,16 @@ if ($resql) print dol_trunc($labeltype,28); print ' | '; } + + // Label if (! empty($arrayfields['a.label']['checked'])) { - // Label print ''; print $actionstatic->label; print ' | '; } + // Start date if (! empty($arrayfields['a.datep']['checked'])) { - // Start date print '';
print dol_print_date($db->jdate($obj->dp),"dayhour");
$late=0;
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 93031ef9725..23315ef2778 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -4361,7 +4361,7 @@ abstract class CommonObject
/**
- * Function to get extra fields of a member into $this->array_options
+ * Function to get extra fields of an object into $this->array_options
* This method is in most cases called by method fetch of objects but you can call it separately.
*
* @param int $rowid Id of line. Use the id of object if not defined. Deprecated. Function must be called without parameters.
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 25a794745f2..533a18524e3 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1692,10 +1692,10 @@ class Form
// Show my availability
if ($showproperties)
{
- if ($user->id == $value['id'] && is_array($listofuserid) && count($listofuserid) && in_array($user->id, array_keys($listofuserid)))
+ if ($ownerid == $value['id'] && is_array($listofuserid) && count($listofuserid) && in_array($ownerid, array_keys($listofuserid)))
{
$out.=' ';
- $out.=' - '.$langs->trans("MyAvailability").': id]['transparency']?' checked':'').'>'.$langs->trans("Busy");
+ $out.=' - '.$langs->trans("Availability").': '.$langs->trans("Busy");
$out.=' ';
}
}
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 3fcf4a15bdd..7a0dc9b6cb6 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -246,7 +246,7 @@ class FormActions
if ($action->type_code == 'AC_EMAIL') print img_picto('', 'object_email').' ';
}
}
- print $action->type;
+ print $action->type_short ? $action->type_short : $action->type;
print ' | ';
print ''.$label.' | '; print ''.dol_print_date($action->datep, 'dayhour', 'tzuserrel'); diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index 4b2386e04d0..24f5bc100f6 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -66,6 +66,7 @@ ActionAC_OTH=Other ActionAC_OTH_AUTO=Automatically inserted events ActionAC_MANUAL=Manually inserted events ActionAC_AUTO=Automatically inserted events +ActionAC_OTH_AUTOShort=Auto Stats=Sales statistics StatusProsp=Prospect status DraftPropals=Draft commercial proposals diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index fc992bd5cf9..859e31706d8 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3539,7 +3539,7 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; } .cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); } +.cal_event_busy a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); } .cal_event_busy { } .cal_peruserviewname { max-width: 100px; height: 22px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 59f5ac9208c..a02cd7f60ac 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3608,7 +3608,7 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; } .cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } -.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); } +.cal_event_busy a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); } .cal_event_busy { } .cal_peruserviewname { max-width: 100px; height: 22px; } |