mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Show link to shared file if it exists.
This commit is contained in:
@@ -5513,7 +5513,8 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Show direct download link
|
||||
if ($object->statut != Facture::STATUS_DRAFT && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
//if ($object->statut != Facture::STATUS_DRAFT && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) {
|
||||
if ($object->statut != Facture::STATUS_DRAFT) {
|
||||
print '<br><!-- Link to download main doc -->'."\n";
|
||||
print showDirectDownloadLink($object).'<br>';
|
||||
}
|
||||
|
||||
@@ -1330,8 +1330,8 @@ class FormFile
|
||||
print '<td class="center">';
|
||||
if ($relativedir && $filearray[$key]['rowid'] > 0) { // only if we are in a mode where a scan of dir were done and we have id of file in ECM table
|
||||
if ($editline) {
|
||||
print $langs->trans("FileSharedViaALink").' ';
|
||||
print '<input class="inline-block" type="checkbox" name="shareenabled"'.($file['share'] ? ' checked="checked"' : '').' /> ';
|
||||
print '<label for="idshareenabled'.$key.'">'.$langs->trans("FileSharedViaALink").'</label> ';
|
||||
print '<input class="inline-block" type="checkbox" id="idshareenabled'.$key.'" name="shareenabled"'.($file['share'] ? ' checked="checked"' : '').' /> ';
|
||||
} else {
|
||||
if ($file['share']) {
|
||||
// Define $urlwithroot
|
||||
|
||||
@@ -8803,11 +8803,14 @@ function showDirectDownloadLink($object)
|
||||
$out = '';
|
||||
$url = $object->getLastMainDocLink($object->element);
|
||||
|
||||
$out .= img_picto($langs->trans("PublicDownloadLinkdesc"), 'globe').' <span class="opacitymedium">'.$langs->trans("DirectDownloadLink").'</span><br>';
|
||||
if ($url) {
|
||||
$out .= img_picto($langs->trans("PublicDownloadLinkdesc"), 'globe').' <span class="opacitymedium">'.$langs->trans("DirectDownloadLink").'</span><br>';
|
||||
$out .= '<div class="urllink"><input type="text" id="directdownloadlink" class="quatrevingtpercent" value="'.$url.'"></div>';
|
||||
$out .= ajax_autoselect("directdownloadlink", 0);
|
||||
} else {
|
||||
$out .= '<div class="urllink">'.$langs->trans("FileNotShared").'</div>';
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ function showOnlinePaymentUrl($type, $ref)
|
||||
$out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'</span><br>';
|
||||
$url = getOnlinePaymentUrl(0, $type, $ref);
|
||||
$out .= '<div class="urllink"><input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
|
||||
$out .= '<a href="'.$url.'" target="_blank">'.img_picto('', 'globe').'</a></div>';
|
||||
$out .= '<a href="'.$url.'" target="_blank">'.img_picto('', 'globe', 'class="paddingleft"').'</a></div>';
|
||||
$out .= ajax_autoselect("onlinepaymenturl", 0);
|
||||
return $out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user