Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
This commit is contained in:
commit
afe1ec633b
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -268,7 +268,7 @@ if ($action == 'add')
|
|||||||
$object->datep = $datep;
|
$object->datep = $datep;
|
||||||
$object->datef = $datef;
|
$object->datef = $datef;
|
||||||
$object->percentage = $percentage;
|
$object->percentage = $percentage;
|
||||||
$object->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60;
|
$object->duree=(((int) GETPOST('dureehour') * 60) + (int) GETPOST('dureemin')) * 60;
|
||||||
|
|
||||||
$transparency=(GETPOST("transparency")=='on'?1:0);
|
$transparency=(GETPOST("transparency")=='on'?1:0);
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if (empty($objectclass) || empty($uploaddir))
|
|||||||
|
|
||||||
// Mass actions. Controls on number of lines checked.
|
// Mass actions. Controls on number of lines checked.
|
||||||
$maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS);
|
$maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS);
|
||||||
if (! empty($massaction) && count($toselect) < 1)
|
if (! empty($massaction) && is_array($toselect) && count($toselect) < 1)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("NoRecordSelected"), null, "warnings");
|
setEventMessages($langs->trans("NoRecordSelected"), null, "warnings");
|
||||||
@ -1269,9 +1269,10 @@ if (! $error && $massaction == 'generate_doc' && $permtoread)
|
|||||||
|
|
||||||
$parameters['toselect']=$toselect;
|
$parameters['toselect']=$toselect;
|
||||||
$parameters['uploaddir']=$uploaddir;
|
$parameters['uploaddir']=$uploaddir;
|
||||||
|
$parameters['massaction']=$massaction;
|
||||||
|
$parameters['diroutputmassaction']=$diroutputmassaction;
|
||||||
|
|
||||||
$reshook=$hookmanager->executeHooks('doMassActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doMassActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -469,7 +469,7 @@ function actions_prepare_head($object)
|
|||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id;
|
||||||
$listofresourcelinked = $resource->getElementResources($object->element, $object->id);
|
$listofresourcelinked = $resource->getElementResources($object->element, $object->id);
|
||||||
$nbResources=count($listofresourcelinked);
|
$nbResources=(is_array($listofresourcelinked)?count($listofresourcelinked):0);
|
||||||
$head[$h][1] = $langs->trans("Resources");
|
$head[$h][1] = $langs->trans("Resources");
|
||||||
if ($nbResources > 0) $head[$h][1].= ' <span class="badge">'.($nbResources).'</span>';
|
if ($nbResources > 0) $head[$h][1].= ' <span class="badge">'.($nbResources).'</span>';
|
||||||
$head[$h][2] = 'resources';
|
$head[$h][2] = 'resources';
|
||||||
|
|||||||
@ -1648,11 +1648,10 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create intervention model
|
// create intervention model
|
||||||
if ($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) {
|
if ($conf->global->MAIN_FEATURE_LEVEL >=2 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) {
|
||||||
print '<div class="inline-block divButAction">';
|
print '<div class="inline-block divButAction">';
|
||||||
// This feature is not yet implemented
|
// This feature is not yet implemented
|
||||||
//print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
|
||||||
print '<a class="butAction" title="'.$langs->trans("ChangeIntoRepeatableIntervention").'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'.$langs->trans("not yet implemented").'</a>';
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user