Skip to content

Commit

Permalink
Evarisk#268 [Card] fix: check before show button
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Sep 24, 2024
1 parent 42c418f commit 890a1ff
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions view/registrationcertificatefr/registrationcertificatefr_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,20 @@
$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-edit pictofixedwidth"></i>' . $langs->trans('Modify') : '<i class="fas fa-edit fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);

$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-file-signature pictofixedwidth"></i>' . $langs->trans('NewPropal') : '<i class="fas fa-file-signature fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', dol_buildpath('comm/propal/card.php?action=create&socid=' . $object->fk_soc . '&options_registrationcertificatefr=' . $object->id, 3), '', $permissiontoadd);
if (isModEnabled('propal')) {
$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-file-signature pictofixedwidth"></i>' . $langs->trans('NewPropal') : '<i class="fas fa-file-signature fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', dol_buildpath('comm/propal/card.php?action=create&socid=' . $object->fk_soc . '&options_registrationcertificatefr=' . $object->id, 3), '', $permissiontoadd);
}

$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-file-invoice-dollar"></i>' . ' ' . $langs->trans('NewInvoice') : '<i class="fas fa-file-invoice-dollar fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', dol_buildpath('compta/facture/card.php?action=create&socid=' . $object->fk_soc . '&options_registrationcertificatefr=' . $object->id, 3), '', $permissiontoadd);
if (isModEnabled('facture')) {
$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-file-invoice-dollar"></i>' . ' ' . $langs->trans('NewInvoice') : '<i class="fas fa-file-invoice-dollar fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', dol_buildpath('compta/facture/card.php?action=create&socid=' . $object->fk_soc . '&options_registrationcertificatefr=' . $object->id, 3), '', $permissiontoadd);
}

$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-ambulance"></i>' . ' ' . $langs->trans('NewIntervention') : '<i class="fas fa-ambulance fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', dol_buildpath('fichinter/card.php?action=create&socid=' . $object->fk_soc, 3), '', $permissiontoadd);
if (isModEnabled('fichinter')) {
$displayButton = $conf->browser->layout == 'classic' ? '<i class="fas fa-ambulance"></i>' . ' ' . $langs->trans('NewIntervention') : '<i class="fas fa-ambulance fa-2x"></i>';
print dolGetButtonAction($displayButton, '', 'default', dol_buildpath('fichinter/card.php?action=create&socid=' . $object->fk_soc, 3), '', $permissiontoadd);
}
}
print '</div>';
}
Expand Down

0 comments on commit 890a1ff

Please sign in to comment.