Merge pull request #11310 from atm-josselin/FIX_display_intervention_model_button

Display the intervention button only in develop mode
This commit is contained in:
Laurent Destailleur 2019-06-07 15:08:07 +02:00 committed by GitHub
commit 63d9e963b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1648,11 +1648,10 @@ else if ($id > 0 || ! empty($ref))
}
// 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">';
// 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" title="'.$langs->trans("ChangeIntoRepeatableIntervention").'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'.$langs->trans("not yet implemented").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
print '</div>';
}