diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 78322b2ecd2..f007695d6b8 100755
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -113,6 +113,8 @@ if ($_GET["action"] == 'delete')
* View
*/
+$form = new Form($db);
+
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
llxHeader('',$langs->trans("Agenda"),$help_url);
@@ -141,7 +143,9 @@ if ($objectid > 0)
print '
| '.$langs->trans("Ref").' | '.$act->id.' | ';
+ print '| '.$langs->trans("Ref").' | ';
+ print $form->showrefnav($act,'id','',($user->societe_id?0:1),'id','ref','');
+ print ' |
';
// Type
print '| '.$langs->trans("Type").' | '.$act->type.' |
';
@@ -149,53 +153,115 @@ if ($objectid > 0)
// Title
print '| '.$langs->trans("Title").' | '.$act->label.' |
';
- // Location
- print '| '.$langs->trans("Location").' | '.$act->location.' |
';
+ // Full day event
+ print '| '.$langs->trans("EventOnFullDay").' | '.yn($act->fulldayevent).' |
';
- // Societe - contact
- print '| '.$langs->trans("Company").' | '.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None"));
- if ($act->societe->id && $act->type_code == 'AC_TEL')
- {
- if ($act->societe->fetch($act->societe->id))
- {
- print " ".dol_print_phone($act->societe->tel);
- }
- }
+ // Date start
+ print ' |
| '.$langs->trans("DateActionStart").' | ';
+ if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour');
+ else print dol_print_date($act->datep,'day');
+ if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
print ' | ';
- print ''.$langs->trans("Contact").' | ';
- print '';
- if ($act->contact->id > 0)
- {
- print $act->contact->getNomUrl(1);
- if ($act->contact->id && $act->type_code == 'AC_TEL')
- {
- if ($act->contact->fetch($act->contact->id))
- {
- print " ".dol_print_phone($act->contact->phone_pro);
- }
- }
- }
- else
- {
- print $langs->trans("None");
- }
+ print ' | '."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ' | ';
+ print '
';
+ // Date end
+ print '| '.$langs->trans("DateActionEnd").' | ';
+ if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour');
+ else print dol_print_date($act->datef,'day');
+ if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
print ' |
';
- // Project
- if ($conf->projet->enabled)
- {
- print '| '.$langs->trans("Project").' | ';
- if ($act->fk_project)
- {
- $project=new Project($db);
- $project->fetch($act->fk_project);
- print $project->getNomUrl(1);
- }
- print ' |
';
- }
+ // Status
+ print '| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
+ print $act->getLibStatut(4);
+ print ' |
';
- print '
';
+
+
+ // Third party - Contact
+ print '| '.$langs->trans("ActionOnCompany").' | '.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None"));
+ if ($act->societe->id && $act->type_code == 'AC_TEL')
+ {
+ if ($act->societe->fetch($act->societe->id))
+ {
+ print " ".dol_print_phone($act->societe->tel);
+ }
+ }
+ print ' | ';
+ print ''.$langs->trans("Contact").' | ';
+ print '';
+ if ($act->contact->id > 0)
+ {
+ print $act->contact->getNomUrl(1);
+ if ($act->contact->id && $act->type_code == 'AC_TEL')
+ {
+ if ($act->contact->fetch($act->contact->id))
+ {
+ print " ".dol_print_phone($act->contact->phone_pro);
+ }
+ }
+ }
+ else
+ {
+ print $langs->trans("None");
+ }
+
+ print ' |
';
+
+ // Project
+ if ($conf->projet->enabled)
+ {
+ print '| '.$langs->trans("Project").' | ';
+ if ($act->fk_project)
+ {
+ $project=new Project($db);
+ $project->fetch($act->fk_project);
+ print $project->getNomUrl(1);
+ }
+ print ' |
';
+ }
+
+ // Priority
+ print '| '.$langs->trans("Priority").' | ';
+ print ($act->priority?$act->priority:'');
+ print ' |
';
+
+
+ print '
';
// Affected by
$var=false;
- print '| '.$langs->trans("ActionAffectedTo").' | ';
+ print ' |
| '.$langs->trans("ActionAffectedTo").' | ';
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):($actioncomm->usertodo->id > 0 ? $actioncomm->usertodo : $user),'affectedto',1);
print ' |
';
// Realised by
- print '| '.$langs->trans("ActionDoneBy").' | ';
+ print ' |
| '.$langs->trans("ActionDoneBy").' | ';
$form->select_users(GETPOST("doneby")?GETPOST("doneby"):($percent==100?$actioncomm->userdone:0),'doneby',1);
print ' |
';
print '
';
- print '';
// Input by
$var=false;
- print '| '.$langs->trans("ActionAskedBy").' | ';
+ print ' |
| '.$langs->trans("ActionAskedBy").' | ';
print $act->author->getNomUrl(1);
print ' |
';
// Affected to
- print '| '.$langs->trans("ActionAffectedTo").' | ';
+ print ' |
| '.$langs->trans("ActionAffectedTo").' | ';
print $form->select_dolusers($act->usertodo->id>0?$act->usertodo->id:-1,'affectedto',1);
print ' |
';
// Realised by
- print '| '.$langs->trans("ActionDoneBy").' | ';
+ print ' |
| '.$langs->trans("ActionDoneBy").' | ';
print $form->select_dolusers($act->userdone->id> 0?$act->userdone->id:-1,'doneby',1);
print ' |
';
- print '
';
// Input by
$var=false;
- print '| '.$langs->trans("ActionAskedBy").' | ';
+ print ' |
| '.$langs->trans("ActionAskedBy").' | ';
if ($act->author->id > 0) print $act->author->getNomUrl(1);
else print ' ';
print ' |
';
// Affecte a
- print '| '.$langs->trans("ActionAffectedTo").' | ';
+ print ' |
| '.$langs->trans("ActionAffectedTo").' | ';
if ($act->usertodo->id > 0) print $act->usertodo->getNomUrl(1);
print ' |
';
// Done by
- print '| '.$langs->trans("ActionDoneBy").' | ';
+ print ' |
| '.$langs->trans("ActionDoneBy").' | ';
if ($act->userdone->id > 0) print $act->userdone->getNomUrl(1);
print ' |
';
- print '