Debug modulebuilder
This commit is contained in:
parent
9f235e1ff6
commit
5ee85821fc
@ -388,8 +388,8 @@ print '<tr class="liste_titre">';
|
|||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$align='';
|
$align='';
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $align='center';
|
if (in_array($val['type'], array('date','datetime','timestamp'))) $align=($align?' ':'').'center';
|
||||||
if (in_array($val['type'], array('timestamp'))) $align.=' nowrap';
|
if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
|
||||||
if ($key == 'status') $align.=($align?' ':'').'center';
|
if ($key == 'status') $align.=($align?' ':'').'center';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($align?' '.$align:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($align?' '.$align:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
||||||
}
|
}
|
||||||
@ -434,8 +434,8 @@ print '<tr class="liste_titre">';
|
|||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$align='';
|
$align='';
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $align='center';
|
if (in_array($val['type'], array('date','datetime','timestamp'))) $align=($align?' ':'').'center';
|
||||||
if (in_array($val['type'], array('timestamp'))) $align.='nowrap';
|
if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
|
||||||
if ($key == 'status') $align.=($align?' ':'').'center';
|
if ($key == 'status') $align.=($align?' ':'').'center';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n";
|
if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,14 +76,19 @@ class Inventory extends CommonObject
|
|||||||
'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300'),
|
'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300'),
|
||||||
'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'index'=>1, 'help'=>'LinkToThirparty'),
|
'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'index'=>1, 'help'=>'LinkToThirparty'),
|
||||||
'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>1,),
|
'date_inventory' => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>1,),
|
||||||
'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'index'=>1,),
|
|
||||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-1, 'enabled'=>1, 'position'=>500,),
|
'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502,),
|
||||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>501, 'notnull'=>1,),
|
'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>512,),
|
||||||
'date_validation' => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-1, 'enabled'=>1, 'position'=>502,),
|
|
||||||
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-1, 'enabled'=>1, 'position'=>510,),
|
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
||||||
'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'visible'=>-1, 'enabled'=>1, 'position'=>511,),
|
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
|
||||||
'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'visible'=>-1, 'enabled'=>1, 'position'=>512,),
|
//'date_valid' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502),
|
||||||
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'visible'=>-1, 'enabled'=>1, 'position'=>1000, 'index'=>1,),
|
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510),
|
||||||
|
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511),
|
||||||
|
//'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512),
|
||||||
|
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000),
|
||||||
|
|
||||||
|
'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Todo', 1=>'Done', -1=>'Cancel')),
|
||||||
);
|
);
|
||||||
|
|
||||||
public $rowid;
|
public $rowid;
|
||||||
|
|||||||
@ -178,15 +178,17 @@ foreach($object->fields as $key => $val)
|
|||||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql.=$hookmanager->resPrint;
|
$sql.=$hookmanager->resPrint;
|
||||||
$sql=preg_replace('/, $/','', $sql);
|
$sql=preg_replace('/, $/','', $sql);
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."inventory as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."inventory_extrafields as ef on (t.rowid = ef.fk_object)";
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."myobject_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||||
$sql.= " WHERE t.entity IN (".getEntity('inventory').")";
|
if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('inventory').")";
|
||||||
|
else $sql.=" WHERE 1 = 1";
|
||||||
foreach($search as $key => $val)
|
foreach($search as $key => $val)
|
||||||
{
|
{
|
||||||
if ($search[$key] != '') $sql.=natural_search($key, $search[$key], (($key == 'status')?2:($object->fields[$key]['type'] == 'integer'?1:0)));
|
$mode_search=(($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))?1:0);
|
||||||
|
if ($search[$key] != '') $sql.=natural_search($key, $search[$key], (($key == 'status')?2:$mode_search));
|
||||||
}
|
}
|
||||||
if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all);
|
if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||||
// Add where from extra fields
|
// Add where from extra fields
|
||||||
@ -205,7 +207,7 @@ foreach ($search_array_options as $key => $val)
|
|||||||
}
|
}
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql.=$hookmanager->resPrint;
|
$sql.=$hookmanager->resPrint;
|
||||||
$sql.=$db->order($sortfield,$sortorder);
|
$sql.=$db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
@ -262,13 +264,13 @@ jQuery(document).ready(function() {
|
|||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
foreach($search as $key => $val)
|
foreach($search as $key => $val)
|
||||||
{
|
{
|
||||||
$param.= '&search_'.$key.'='.urlencode($search[$key]);
|
$param.= '&search_'.$key.'='.urlencode($search[$key]);
|
||||||
}
|
}
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
@ -295,8 +297,9 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
|||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||||
|
|
||||||
|
// Add code for pre mass action (confirmation or email presend form)
|
||||||
$topicmail="Information";
|
$topicmail="Information";
|
||||||
$modelmail="inventory";
|
$modelmail="inventory";
|
||||||
$objecttmp=new Inventory($db);
|
$objecttmp=new Inventory($db);
|
||||||
@ -310,12 +313,12 @@ if ($sall)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
/*$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';*/
|
||||||
|
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||||
else $moreforfilter = $hookmanager->resPrint;
|
else $moreforfilter = $hookmanager->resPrint;
|
||||||
|
|
||||||
@ -328,9 +331,9 @@ if (! empty($moreforfilter))
|
|||||||
|
|
||||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
$selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
|
|
||||||
@ -340,8 +343,9 @@ print '<tr class="liste_titre">';
|
|||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$align='';
|
$align='';
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $align='center';
|
if (in_array($val['type'], array('date','datetime','timestamp'))) $align=($align?' ':'').'center';
|
||||||
if (in_array($val['type'], array('timestamp'))) $align.=' nowrap';
|
if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
|
||||||
|
if ($key == 'status') $align.=($align?' ':'').'center';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($align?' '.$align:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
if (! empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($align?' '.$align:'').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -369,7 +373,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
|||||||
}
|
}
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters=array('arrayfields'=>$arrayfields);
|
$parameters=array('arrayfields'=>$arrayfields);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
@ -385,8 +389,9 @@ print '<tr class="liste_titre">';
|
|||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$align='';
|
$align='';
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $align='center';
|
if (in_array($val['type'], array('date','datetime','timestamp'))) $align=($align?' ':'').'center';
|
||||||
if (in_array($val['type'], array('timestamp'))) $align.='nowrap';
|
if (in_array($val['type'], array('timestamp'))) $align.=($align?' ':'').'nowrap';
|
||||||
|
if ($key == 'status') $align.=($align?' ':'').'center';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n";
|
if (! empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align?'class="'.$align.'"':''), $sortfield, $sortorder, $align.' ')."\n";
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -405,7 +410,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
|||||||
}
|
}
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields);
|
$parameters=array('arrayfields'=>$arrayfields);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n";
|
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
@ -426,8 +431,8 @@ $totalarray=array();
|
|||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($obj)
|
if (empty($obj)) break; // Should not happen
|
||||||
{
|
|
||||||
// Store properties in $object
|
// Store properties in $object
|
||||||
$object->id = $obj->rowid;
|
$object->id = $obj->rowid;
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
@ -445,11 +450,10 @@ while ($i < min($num, $limit))
|
|||||||
if ($key == 'status') $align.=($align?' ':'').'center';
|
if ($key == 'status') $align.=($align?' ':'').'center';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
{
|
{
|
||||||
print '<td'.($align?' class="'.$align.'"':'').'>';
|
print '<td';
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) print dol_print_date($db->jdate($obj->$key), 'dayhour');
|
if ($align) print ' class="'.$align.'"';
|
||||||
elseif ($key == 'ref') print $object->getNomUrl(1);
|
print '>';
|
||||||
elseif ($key == 'status') print $object->getLibStatut(3);
|
print $object->showOutputField($val, $key, $obj->$key, '');
|
||||||
else print $obj->$key;
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! empty($val['isameasure']))
|
if (! empty($val['isameasure']))
|
||||||
@ -466,12 +470,12 @@ while ($i < min($num, $limit))
|
|||||||
{
|
{
|
||||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||||
{
|
{
|
||||||
print '<td';
|
|
||||||
$align=$extrafields->getAlignFlag($key);
|
$align=$extrafields->getAlignFlag($key);
|
||||||
|
print '<td';
|
||||||
if ($align) print ' align="'.$align.'"';
|
if ($align) print ' align="'.$align.'"';
|
||||||
print '>';
|
print '>';
|
||||||
$tmpkey='options_'.$key;
|
$tmpkey='options_'.$key;
|
||||||
print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
|
print $extrafields->showOutputField($key, $obj->$tmpkey, '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! empty($val['isameasure']))
|
if (! empty($val['isameasure']))
|
||||||
@ -484,7 +488,7 @@ while ($i < min($num, $limit))
|
|||||||
}
|
}
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap" align="center">';
|
||||||
@ -498,7 +502,7 @@ while ($i < min($num, $limit))
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,7 +522,7 @@ if (isset($totalarray['pos']))
|
|||||||
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
|
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
|
||||||
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
|
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||||
}
|
}
|
||||||
print '<td></td>';
|
else print '<td></td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -536,7 +540,7 @@ if ($num == 0)
|
|||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
@ -544,7 +548,7 @@ print '</div>'."\n";
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
if ($nbtotalofrecords === '' || $nbtotalofrecords)
|
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
||||||
{
|
{
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
||||||
{
|
{
|
||||||
@ -556,10 +560,10 @@ if ($nbtotalofrecords === '' || $nbtotalofrecords)
|
|||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
$filedir=$diroutputmassaction;
|
||||||
$genallowed=$user->rights->inventory->read;
|
$genallowed=$user->rights->mymodule->read;
|
||||||
$delallowed=$user->rights->inventory->create;
|
$delallowed=$user->rights->mymodule->create;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_inventory','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user