Fix: La date de l'action affichée et la date de l'action et non sa date de création.
This commit is contained in:
parent
cb62d72032
commit
3b647a90e8
@ -135,9 +135,13 @@ if ($_GET["id"] > 0)
|
|||||||
if ($act->contact->id) print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$act->contact->id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.'</a>';
|
if ($act->contact->id) print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$act->contact->id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.'</a>';
|
||||||
else print $langs->trans("None");
|
else print $langs->trans("None");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.strftime('%d %B %Y %H:%M',$act->date).'</td>';
|
|
||||||
print '<td>'.$langs->trans("Author").'</td>';
|
// Auteur
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
print '<tr><td>'.$langs->trans("Author").'</td>';
|
||||||
|
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
||||||
|
|
||||||
|
// Date
|
||||||
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="3">'.dolibarr_print_date($act->date,'%d %B %Y %H:%M').'</td></tr>';
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|||||||
@ -148,6 +148,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
$actioncomm->delete($_GET["id"]);
|
$actioncomm->delete($_GET["id"]);
|
||||||
|
|
||||||
Header("Location: index.php");
|
Header("Location: index.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -156,14 +157,18 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
*/
|
*/
|
||||||
if ($_POST["action"] == 'update')
|
if ($_POST["action"] == 'update')
|
||||||
{
|
{
|
||||||
|
if (! $_POST["cancel"])
|
||||||
|
{
|
||||||
$action = new Actioncomm($db);
|
$action = new Actioncomm($db);
|
||||||
$action->fetch($_POST["id"]);
|
$action->fetch($_POST["id"]);
|
||||||
$action->percent = $_POST["percent"];
|
$action->percent = $_POST["percent"];
|
||||||
$action->contact->id = $_POST["contactid"];
|
$action->contact->id = $_POST["contactid"];
|
||||||
$action->note = $_POST["note"];
|
$action->note = $_POST["note"];
|
||||||
$action->update();
|
$action->update();
|
||||||
|
}
|
||||||
|
|
||||||
Header("Location: ".$_POST["from"]);
|
Header("Location: ".$_POST["from"]);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -385,7 +390,8 @@ if ($_GET["action"] == 'create')
|
|||||||
*/
|
*/
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
{
|
{
|
||||||
if ($error) {
|
if ($error)
|
||||||
|
{
|
||||||
print '<div class="error">'.$error.'</div><br>';
|
print '<div class="error">'.$error.'</div><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,9 +445,14 @@ if ($_GET["id"])
|
|||||||
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
||||||
$html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1);
|
$html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.strftime('%d %B %Y %H:%M',$act->date).'</td>';
|
|
||||||
print '<td>'.$langs->trans("Author").'</td>';
|
// Auteur
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
print '<tr><td>'.$langs->trans("Author").'</td>';
|
||||||
|
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
||||||
|
|
||||||
|
// Date
|
||||||
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="3">'.dolibarr_print_date($act->date,'%d %B %Y %H:%M').'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td nowrap>'.$langs->trans("PercentDone").'</td><td colspan="3"><input name="percent" value="'.$act->percent.'" size="4">%</td></tr>';
|
print '<tr><td nowrap>'.$langs->trans("PercentDone").'</td><td colspan="3"><input name="percent" value="'.$act->percent.'" size="4">%</td></tr>';
|
||||||
if ($act->objet_url)
|
if ($act->objet_url)
|
||||||
{
|
{
|
||||||
@ -453,7 +464,10 @@ if ($_GET["id"])
|
|||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
||||||
print '<textarea cols="60" rows="6" name="note">'.nl2br($act->note).'</textarea></td></tr>';
|
print '<textarea cols="60" rows="6" name="note">'.nl2br($act->note).'</textarea></td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans("Save").'"</td></tr>';
|
print '<tr><td align="center" colspan="4"><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
|
||||||
|
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -471,9 +485,14 @@ if ($_GET["id"])
|
|||||||
if ($act->contact->id) print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$act->contact->id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.'</a>';
|
if ($act->contact->id) print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$act->contact->id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.'</a>';
|
||||||
else print $langs->trans("None");
|
else print $langs->trans("None");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.strftime('%d %B %Y %H:%M',$act->date).'</td>';
|
|
||||||
print '<td>'.$langs->trans("Author").'</td>';
|
// Auteur
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
print '<tr><td>'.$langs->trans("Author").'</td>';
|
||||||
|
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$act->author->id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'</a></td></tr>';
|
||||||
|
|
||||||
|
// Date
|
||||||
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="3">'.dolibarr_print_date($act->date,'%d %B %Y %H:%M').'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td nowrap>'.$langs->trans("PercentDone").'</td><td colspan="3">'.$act->percent.' %</td></tr>';
|
print '<tr><td nowrap>'.$langs->trans("PercentDone").'</td><td colspan="3">'.$act->percent.' %</td></tr>';
|
||||||
if ($act->objet_url)
|
if ($act->objet_url)
|
||||||
{
|
{
|
||||||
@ -498,16 +517,13 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($_GET["action"] == 'edit')
|
if ($_GET["action"] != 'edit')
|
||||||
{
|
|
||||||
print '<a class="butAction" href="fiche.php?id='.$act->id.'">'.$langs->trans("Cancel").'</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?action=edit&id='.$act->id.'">'.$langs->trans("Edit").'</a>';
|
print '<a class="butAction" href="fiche.php?action=edit&id='.$act->id.'">'.$langs->trans("Edit").'</a>';
|
||||||
}
|
|
||||||
|
|
||||||
print '<a class="butActionDelete" href="fiche.php?action=delete&id='.$act->id.'">'.$langs->trans("Delete").'</a>';
|
print '<a class="butActionDelete" href="fiche.php?action=delete&id='.$act->id.'">'.$langs->trans("Delete").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user