The event array of an object is visible even if no event yet recorded.

This commit is contained in:
Laurent Destailleur 2017-09-13 14:18:36 +02:00
parent 1a056d29d2
commit 149ab80b3a
18 changed files with 28 additions and 27 deletions

View File

@ -1762,7 +1762,7 @@ else
/* Already in tab Agenda/Events
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'member', $socid);
$somethingshown = $formactions->showactions($object, 'member', $socid, 1);
*/
print '</div></div></div>';

View File

@ -410,7 +410,7 @@ if ($rowid && $action != 'edit')
/*
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'invoice', $socid);
$somethingshown = $formactions->showactions($object, 'invoice', $socid, 1);
*/
print '</div></div></div>';

View File

@ -2373,7 +2373,7 @@ if ($action == 'create')
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'propal', $socid);
$somethingshown = $formactions->showactions($object, 'propal', $socid, 1);
print '</div></div></div>';
}

View File

@ -2592,7 +2592,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'order', $socid);
$somethingshown = $formactions->showactions($object, 'order', $socid, 1);
print '</div></div></div>';
}

View File

@ -4331,7 +4331,7 @@ else if ($id > 0 || ! empty($ref))
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'invoice', $socid);
$somethingshown = $formactions->showactions($object, 'invoice', $socid, 1);
print '</div></div></div>';
}

View File

@ -2146,7 +2146,7 @@ else
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'contract', $socid);
$somethingshown = $formactions->showactions($object, 'contract', $socid, 1);
print '</div></div></div>';

View File

@ -2126,7 +2126,7 @@ else if ($id || $ref)
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'shipping',$socid);
$somethingshown = $formactions->showactions($object,'shipping',$socid,1);
print '</div></div></div>';
}

View File

@ -1708,7 +1708,7 @@ else if ($id > 0 || ! empty($ref))
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'fichinter',$socid);
$somethingshown = $formactions->showactions($object,'fichinter',$socid,1);
print '</div></div></div>';
}

View File

@ -2732,7 +2732,8 @@ elseif (! empty($object->id))
print '</form>';
print "<br>";
}
if ($action != 'makeorder')
if ($action != 'makeorder')
{
print '<div class="fichecenter"><div class="fichehalfleft">';
@ -2791,7 +2792,7 @@ if ($action != 'makeorder')
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'order_supplier',$socid,0,'listaction'.($genallowed?'largetitle':''));
$somethingshown = $formactions->showactions($object,'order_supplier',$socid,1,'listaction'.($genallowed?'largetitle':''));

View File

@ -203,7 +203,7 @@ if (!empty($object->id))
// List of actions on element
/*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'project',0);*/
$somethingshown = $formactions->showactions($object,'project',0);*/
// List of todo actions
//show_actions_todo($conf,$langs,$db,$object,null,0,$actioncode);

View File

@ -2815,7 +2815,7 @@ else
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'invoice_supplier',$socid,0,'listaction'.($genallowed?'largetitle':''));
$somethingshown = $formactions->showactions($object,'invoice_supplier',$socid,1,'listaction'.($genallowed?'largetitle':''));
print '</div></div></div>';
//print '</td></tr></table>';

View File

@ -202,13 +202,13 @@ if ($result > 0)
}
$linkback = '<a href="' . DOL_URL_ROOT . '/fourn/facture/paiement.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
dol_banner_tab($object,'id',$linkback,1,'rowid','ref');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
/*print '<tr>';
@ -278,7 +278,7 @@ if ($result > 0)
print '</table>';
print '</div>';
print '<br>';
/**
@ -315,7 +315,7 @@ if ($result > 0)
while ($i < $num)
{
$objp = $db->fetch_object($resql);
print '<tr class="oddeven">';
// Ref
print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objp->facid.'">'.img_object($langs->trans('ShowBill'),'bill').' ';
@ -341,7 +341,7 @@ if ($result > 0)
$i++;
}
}
print "</table>\n";
$db->free($resql);
@ -386,7 +386,7 @@ if ($result > 0)
}
}
print '</div>';
print '<div class="fichecenter"><div class="fichehalfleft">';
/*
@ -409,7 +409,7 @@ if ($result > 0)
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'supplier_payment',$socid,0,'listaction'.($genallowed?'largetitle':''));
$somethingshown = $formactions->showactions($object,'supplier_payment',$socid,1,'listaction'.($genallowed?'largetitle':''));
print '</div></div></div>';
//print '</td></tr></table>';

View File

@ -505,7 +505,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'myobject', $socid);
$somethingshown = $formactions->showactions($object, 'myobject', $socid, 1);
print '</div></div></div>';
}

View File

@ -487,7 +487,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'order', $socid);
$somethingshown = $formactions->showactions($object, 'order', $socid, 1);
print '</div></div></div>';
}

View File

@ -184,7 +184,7 @@ if (!empty($object->id))
// List of actions on element
/*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
$somethingshown=$formactions->showactions($object,'project',0);*/
$somethingshown = $formactions->showactions($object,'project',0);*/
// List of todo actions
//show_actions_todo($conf,$langs,$db,$object,null,0,$actioncode);

View File

@ -1806,7 +1806,7 @@ if ($action == 'create')
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'supplier_proposal', $socid);
$somethingshown = $formactions->showactions($object, 'supplier_proposal', $socid, 1);
print '</div></div></div>';
}

View File

@ -2538,7 +2538,7 @@ else
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'user', $socid);
$somethingshown = $formactions->showactions($object, 'user', $socid, 1);
print '</div></div></div>';

View File

@ -517,7 +517,7 @@ else
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'usergroup', $socid);
$somethingshown = $formactions->showactions($object, 'usergroup', $socid, 1);
print '</div></div></div>';