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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2732,6 +2732,7 @@ elseif (! empty($object->id))
print '</form>'; print '</form>';
print "<br>"; print "<br>";
} }
if ($action != 'makeorder') if ($action != 'makeorder')
{ {
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
@ -2791,7 +2792,7 @@ if ($action != 'makeorder')
// List of actions on element // List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db); $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

@ -2815,7 +2815,7 @@ else
// List of actions on element // List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db); $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 '</div></div></div>';
//print '</td></tr></table>'; //print '</td></tr></table>';

View File

@ -409,7 +409,7 @@ if ($result > 0)
// List of actions on element // List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db); $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 '</div></div></div>';
//print '</td></tr></table>'; //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 // List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db); $formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'myobject', $socid); $somethingshown = $formactions->showactions($object, 'myobject', $socid, 1);
print '</div></div></div>'; 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 // List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db); $formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'order', $socid); $somethingshown = $formactions->showactions($object, 'order', $socid, 1);
print '</div></div></div>'; print '</div></div></div>';
} }

View File

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

View File

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

View File

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