diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 6338501afbd..85ce14aba3c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -597,7 +597,7 @@ class ActionComm extends CommonObject /** * Export events from database into a cal file. - * @param format 'ical' or 'vcal' + * @param format 'vcal', 'ical/ics', 'rss' * @param type 'event' or 'journal' * @param cachedelay Do not rebuild file if date older than cachedelay seconds * @param filename Force filename @@ -782,8 +782,8 @@ class ActionComm extends CommonObject } // Write file + if ($format == 'vcal') $result=build_calfile($format,$title,$desc,$eventarray,$outputfiletmp); if ($format == 'ical') $result=build_calfile($format,$title,$desc,$eventarray,$outputfiletmp); - if ($format == 'vcal') $result=build_calfile($format,$title,$desc,$eventarray,$outputfiletmp); if ($format == 'rss') $result=build_rssfile($format,$title,$desc,$eventarray,$outputfiletmp); if ($result >= 0) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 446fbc7cd01..b9dd6a77846 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -491,9 +491,6 @@ if (GETPOST('action') == 'create') // Title print '
| '.$langs->trans("Note").' | '; - require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),280,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90); - $doleditor->Create(); - print ' |
| '.$langs->trans("Description").' | '; + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),280,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90); + $doleditor->Create(); + print ' |
| '.$act->objet_url.' | '; } - // Note - print '|||
| '.$langs->trans("Note").' | '; - // Editeur wysiwyg - require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90); - $doleditor->Create(); - print ' | ||
| '.$langs->trans("Description").' | '; + // Editeur wysiwyg + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90); + $doleditor->Create(); + print ' | ||
| '.$langs->trans("ActionOnCompany").' | '.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")); if ($act->societe->id && $act->type_code == 'AC_TEL') { @@ -939,8 +951,8 @@ if ($id) print ' | '.$act->objet_url.' | ||
| '.$langs->trans("Note").' | '; + // Description + print ' | |||
| '.$langs->trans("Description").' | '; print dol_htmlentitiesbr($act->note); print ' | ';
if ($action->type_code != 'BIRTHDAY')
{
- $tmpyearstart = date('Y',$action->date_start_in_calendar);
- $tmpmonthstart = date('m',$action->date_start_in_calendar);
- $tmpdaystart = date('d',$action->date_start_in_calendar);
- $tmpyearend = date('Y',$action->date_end_in_calendar);
- $tmpmonthend = date('m',$action->date_end_in_calendar);
- $tmpdayend = date('d',$action->date_end_in_calendar);
- // Hour start
- if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour)
- {
- print dol_print_date($action->date_start_in_calendar,'%H:%M');
- if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar)
- {
- if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend)
- print '-';
- //else
- //print '...';
- }
- }
- if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar)
- {
- if ($tmpyearstart != $tmpyearend || $tmpmonthstart != $tmpmonthend || $tmpdaystart != $tmpdayend)
- {
- print '...';
- }
- }
- // Hour end
- if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar)
- {
- if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
- print dol_print_date($action->date_end_in_calendar,'%H:%M');
- }
- print ' '; + if (empty($action->fulldayevent)) + { + // Show hours (start ... end) + $tmpyearstart = date('Y',$action->date_start_in_calendar); + $tmpmonthstart = date('m',$action->date_start_in_calendar); + $tmpdaystart = date('d',$action->date_start_in_calendar); + $tmpyearend = date('Y',$action->date_end_in_calendar); + $tmpmonthend = date('m',$action->date_end_in_calendar); + $tmpdayend = date('d',$action->date_end_in_calendar); + // Hour start + if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) + { + print dol_print_date($action->date_start_in_calendar,'%H:%M'); + if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar) + { + if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) + print '-'; + //else + //print '...'; + } + } + if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar) + { + if ($tmpyearstart != $tmpyearend || $tmpmonthstart != $tmpmonthend || $tmpdaystart != $tmpdayend) + { + print '...'; + } + } + // Hour end + if ($action->date_end_in_calendar && $action->date_start_in_calendar != $action->date_end_in_calendar) + { + if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) + print dol_print_date($action->date_end_in_calendar,'%H:%M'); + } + print ' '; + } + // If action related to company / contact $linerelatedto='';$length=16; if (! empty($action->societe->id) && ! empty($action->contact->id)) $length=8; | ||