Better responsive on small screen
This commit is contained in:
parent
69cd6f0a25
commit
9f377b7fe4
@ -1339,14 +1339,15 @@ if ($resql) {
|
|||||||
$labeltoshow = $langs->trans($reg[1]);
|
$labeltoshow = $langs->trans($reg[1]);
|
||||||
} else {
|
} else {
|
||||||
if ($objp->label == '(payment_salary)') {
|
if ($objp->label == '(payment_salary)') {
|
||||||
$labeltoshow = dol_trunc($langs->trans("SalaryPayment", 40));
|
$labeltoshow = $langs->trans("SalaryPayment");
|
||||||
} else {
|
} else {
|
||||||
$labeltoshow = dol_escape_htmltag($objp->label);
|
$labeltoshow = dol_escape_htmltag($objp->label);
|
||||||
$titletoshow = $objp->label;
|
$titletoshow = $objp->label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<td class="tdoverflowmax300"'.($titletoshow ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>';
|
|
||||||
print $labeltoshow; // Already escaped
|
|
||||||
|
print '<td class="tdoverflowmax250"'.($titletoshow ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>';
|
||||||
|
|
||||||
// Add info about links after description
|
// Add info about links after description
|
||||||
$cachebankaccount = array();
|
$cachebankaccount = array();
|
||||||
@ -1355,70 +1356,70 @@ if ($resql) {
|
|||||||
if ($links[$key]['type'] == 'withdraw') {
|
if ($links[$key]['type'] == 'withdraw') {
|
||||||
$banktransferstatic->id = $links[$key]['url_id'];
|
$banktransferstatic->id = $links[$key]['url_id'];
|
||||||
$banktransferstatic->ref = $links[$key]['label'];
|
$banktransferstatic->ref = $links[$key]['label'];
|
||||||
print ' '.$banktransferstatic->getNomUrl(0);
|
print $banktransferstatic->getNomUrl(0).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment') {
|
} elseif ($links[$key]['type'] == 'payment') {
|
||||||
$paymentstatic->id = $links[$key]['url_id'];
|
$paymentstatic->id = $links[$key]['url_id'];
|
||||||
$paymentstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment
|
$paymentstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment
|
||||||
$paymentstatic->date = $db->jdate($objp->do);
|
$paymentstatic->date = $db->jdate($objp->do);
|
||||||
print ' '.$paymentstatic->getNomUrl(2);
|
print $paymentstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_supplier') {
|
} elseif ($links[$key]['type'] == 'payment_supplier') {
|
||||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||||
$paymentsupplierstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment
|
$paymentsupplierstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment
|
||||||
print ' '.$paymentsupplierstatic->getNomUrl(2);
|
print $paymentsupplierstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_sc') {
|
} elseif ($links[$key]['type'] == 'payment_sc') {
|
||||||
$paymentscstatic->id = $links[$key]['url_id'];
|
$paymentscstatic->id = $links[$key]['url_id'];
|
||||||
$paymentscstatic->ref = $links[$key]['url_id'];
|
$paymentscstatic->ref = $links[$key]['url_id'];
|
||||||
$paymentscstatic->label = $links[$key]['label'];
|
$paymentscstatic->label = $links[$key]['label'];
|
||||||
print ' '.$paymentscstatic->getNomUrl(2);
|
print $paymentscstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_vat') {
|
} elseif ($links[$key]['type'] == 'payment_vat') {
|
||||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||||
print ' '.$paymentvatstatic->getNomUrl(2);
|
print $paymentvatstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_salary') {
|
} elseif ($links[$key]['type'] == 'payment_salary') {
|
||||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||||
$paymentsalstatic->label = $links[$key]['label'];
|
$paymentsalstatic->label = $links[$key]['label'];
|
||||||
print ' '.$paymentsalstatic->getNomUrl(2);
|
print $paymentsalstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_loan') {
|
} elseif ($links[$key]['type'] == 'payment_loan') {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$links[$key]['url_id'].'">';
|
print '<a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$links[$key]['url_id'].'">';
|
||||||
print ' '.img_object($langs->trans('ShowPayment'), 'payment').' ';
|
print ' '.img_object($langs->trans('ShowPayment'), 'payment').' ';
|
||||||
print '</a>';
|
print '</a> ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_donation') {
|
} elseif ($links[$key]['type'] == 'payment_donation') {
|
||||||
$paymentdonationstatic->id = $links[$key]['url_id'];
|
$paymentdonationstatic->id = $links[$key]['url_id'];
|
||||||
$paymentdonationstatic->ref = $links[$key]['url_id'];
|
$paymentdonationstatic->ref = $links[$key]['url_id'];
|
||||||
print ' '.$paymentdonationstatic->getNomUrl(2);
|
print $paymentdonationstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_expensereport') {
|
} elseif ($links[$key]['type'] == 'payment_expensereport') {
|
||||||
$paymentexpensereportstatic->id = $links[$key]['url_id'];
|
$paymentexpensereportstatic->id = $links[$key]['url_id'];
|
||||||
$paymentexpensereportstatic->ref = $links[$key]['url_id'];
|
$paymentexpensereportstatic->ref = $links[$key]['url_id'];
|
||||||
print ' '.$paymentexpensereportstatic->getNomUrl(2);
|
print $paymentexpensereportstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'payment_various') {
|
} elseif ($links[$key]['type'] == 'payment_various') {
|
||||||
$paymentvariousstatic->id = $links[$key]['url_id'];
|
$paymentvariousstatic->id = $links[$key]['url_id'];
|
||||||
$paymentvariousstatic->ref = $links[$key]['url_id'];
|
$paymentvariousstatic->ref = $links[$key]['url_id'];
|
||||||
print ' '.$paymentvariousstatic->getNomUrl(2);
|
print $paymentvariousstatic->getNomUrl(2).' ';
|
||||||
} elseif ($links[$key]['type'] == 'banktransfert') {
|
} elseif ($links[$key]['type'] == 'banktransfert') {
|
||||||
// Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail.
|
// Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail.
|
||||||
if ($objp->amount > 0) {
|
if ($objp->amount > 0) {
|
||||||
$banklinestatic->fetch($links[$key]['url_id']);
|
$banklinestatic->fetch($links[$key]['url_id']);
|
||||||
$bankstatic->id = $banklinestatic->fk_account;
|
$bankstatic->id = $banklinestatic->fk_account;
|
||||||
$bankstatic->label = $banklinestatic->bank_account_ref;
|
$bankstatic->label = $banklinestatic->bank_account_ref;
|
||||||
print ' ('.$langs->trans("TransferFrom").' ';
|
print $langs->trans("TransferFrom").' ';
|
||||||
print $bankstatic->getNomUrl(1, 'transactions');
|
print $bankstatic->getNomUrl(1, 'transactions');
|
||||||
print ' '.$langs->trans("toward").' ';
|
print ' '.$langs->trans("toward").' ';
|
||||||
$bankstatic->id = $objp->bankid;
|
$bankstatic->id = $objp->bankid;
|
||||||
$bankstatic->label = $objp->bankref;
|
$bankstatic->label = $objp->bankref;
|
||||||
print $bankstatic->getNomUrl(1, '');
|
print $bankstatic->getNomUrl(1, '');
|
||||||
print ')';
|
print ' - ';
|
||||||
} else {
|
} else {
|
||||||
$bankstatic->id = $objp->bankid;
|
$bankstatic->id = $objp->bankid;
|
||||||
$bankstatic->label = $objp->bankref;
|
$bankstatic->label = $objp->bankref;
|
||||||
print ' ('.$langs->trans("TransferFrom").' ';
|
print $langs->trans("TransferFrom").' ';
|
||||||
print $bankstatic->getNomUrl(1, '');
|
print $bankstatic->getNomUrl(1, '');
|
||||||
print ' '.$langs->trans("toward").' ';
|
print ' '.$langs->trans("toward").' ';
|
||||||
$banklinestatic->fetch($links[$key]['url_id']);
|
$banklinestatic->fetch($links[$key]['url_id']);
|
||||||
$bankstatic->id = $banklinestatic->fk_account;
|
$bankstatic->id = $banklinestatic->fk_account;
|
||||||
$bankstatic->label = $banklinestatic->bank_account_ref;
|
$bankstatic->label = $banklinestatic->bank_account_ref;
|
||||||
print $bankstatic->getNomUrl(1, 'transactions');
|
print $bankstatic->getNomUrl(1, 'transactions');
|
||||||
print ')';
|
print ' - ';
|
||||||
}
|
}
|
||||||
//var_dump($links);
|
//var_dump($links);
|
||||||
} elseif ($links[$key]['type'] == 'company') {
|
} elseif ($links[$key]['type'] == 'company') {
|
||||||
@ -1430,22 +1431,22 @@ if ($resql) {
|
|||||||
// Information is already shown using the payment_salary link. No need of this link.
|
// Information is already shown using the payment_salary link. No need of this link.
|
||||||
} else {
|
} else {
|
||||||
// Show link with label $links[$key]['label']
|
// Show link with label $links[$key]['label']
|
||||||
if (!empty($objp->label) && !empty($links[$key]['label'])) {
|
|
||||||
print ' - ';
|
|
||||||
}
|
|
||||||
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
||||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||||
// Label generique car entre parentheses. On l'affiche en le traduisant
|
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||||
if ($reg[1] == 'paiement') {
|
if ($reg[1] == 'paiement') {
|
||||||
$reg[1] = 'Payment';
|
$reg[1] = 'Payment';
|
||||||
}
|
}
|
||||||
print ' '.$langs->trans($reg[1]);
|
print $langs->trans($reg[1]);
|
||||||
} else {
|
} else {
|
||||||
print ' '.$links[$key]['label'];
|
print $links[$key]['label'];
|
||||||
}
|
}
|
||||||
print '</a>';
|
print '</a>'.($labeltoshow ? ' - ' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print $labeltoshow; // Already escaped
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
@ -1488,7 +1489,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Payment type
|
// Payment type
|
||||||
if (!empty($arrayfields['type']['checked'])) {
|
if (!empty($arrayfields['type']['checked'])) {
|
||||||
print '<td align="center" class="nowrap">';
|
print '<td class="tdoverflowmax100 center">';
|
||||||
$labeltype = ($langs->trans("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->trans("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1);
|
$labeltype = ($langs->trans("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->trans("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1);
|
||||||
if ($labeltype == 'SOLD') {
|
if ($labeltype == 'SOLD') {
|
||||||
print ' '; //$langs->trans("InitialBankBalance");
|
print ' '; //$langs->trans("InitialBankBalance");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user