Reponsive

This commit is contained in:
Laurent Destailleur 2022-04-01 11:24:45 +02:00
parent 113af78a9c
commit 8349e48559
4 changed files with 28 additions and 13 deletions

View File

@ -672,7 +672,7 @@ if (!empty($date_start) && !empty($date_stop)) {
print '<tr class="oddeven '.$html_class.'">'; print '<tr class="oddeven '.$html_class.'">';
// Type // Type
print '<td>'.$langs->trans($data['item']).'</td>'; print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans($data['item'])).'">'.$langs->trans($data['item']).'</td>';
// Date // Date
print '<td class="center">'; print '<td class="center">';
@ -685,7 +685,7 @@ if (!empty($date_start) && !empty($date_stop)) {
print "</td>\n"; print "</td>\n";
// Ref // Ref
print '<td class="nowraponall">'; print '<td class="nowraponall tdoverflowmax150">';
if ($data['item'] == 'Invoice') { if ($data['item'] == 'Invoice') {
$invoice->id = $data['id']; $invoice->id = $data['id'];
@ -733,23 +733,33 @@ if (!empty($date_start) && !empty($date_stop)) {
print '</td>'; print '</td>';
// File link // File link
print '<td>'; print '<td class="tdoverflowmax150">';
if (!empty($data['files'])) { if (!empty($data['files'])) {
foreach ($data['files'] as $id => $filecursor) { foreach ($data['files'] as $id => $filecursor) {
print '<a href='.DOL_URL_ROOT.'/'.$filecursor['link'].' target="_blank" rel="noopener noreferrer">'.($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']).'</a>&nbsp;'.$formfile->showPreview($filecursor, $filecursor['modulepart'], $filecursor['subdir'].'/'.$filecursor['name']).'<br>'; $tmppreview = $formfile->showPreview($filecursor, $filecursor['modulepart'], $filecursor['subdir'].'/'.$filecursor['name'], 0);
if ($tmppreview) {
print $tmppreview;
}
$filename = ($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']);
print '<a href='.DOL_URL_ROOT.'/'.$filecursor['link'].' target="_blank" rel="noopener noreferrer" title="'.dol_escape_htmltag($filename).'">';
if (empty($tmppreview)) {
print img_picto('', 'generic', '', false, 0, 0, '', 'pictonopreview pictofixedwidth paddingright');
}
print $filename;
print '</a><br>';
} }
} }
print "</td>\n"; print "</td>\n";
// Paid // Paid
print '<td aling="left">'.$data['paid'].'</td>'; print '<td class="center">'.($data['paid'] ? yn($data['paid']) : '').'</td>';
// Total ET // Total ET
print '<td align="right">'.price(price2num($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'], 'MT'))."</td>\n"; print '<td align="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'], 'MT'))."</span></td>\n";
// Total IT // Total IT
print '<td align="right">'.price(price2num($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'], 'MT'))."</td>\n"; print '<td align="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'], 'MT'))."</span></td>\n";
// Total VAT // Total VAT
print '<td align="right">'.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'))."</td>\n"; print '<td align="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'))."</span></td>\n";
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($data['thirdparty_name']).'">'.dol_escape_htmltag($data['thirdparty_name'])."</td>\n"; print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($data['thirdparty_name']).'">'.dol_escape_htmltag($data['thirdparty_name'])."</td>\n";
@ -757,6 +767,7 @@ if (!empty($date_start) && !empty($date_stop)) {
print '<td class="center">'.$data['country_code']."</td>\n"; print '<td class="center">'.$data['country_code']."</td>\n";
// VAT number
print '<td class="tdoverflowmax150 right" title="'.dol_escape_htmltag($data['vatnum']).'">'.dol_escape_htmltag($data['vatnum'])."</td>\n"; print '<td class="tdoverflowmax150 right" title="'.dol_escape_htmltag($data['vatnum']).'">'.dol_escape_htmltag($data['vatnum'])."</td>\n";
if ($data['sens']) { if ($data['sens']) {

View File

@ -2144,7 +2144,7 @@ class FormFile
* @param array $file Array with data of file. Example: array('name'=>...) * @param array $file Array with data of file. Example: array('name'=>...)
* @param string $modulepart propal, facture, facture_fourn, ... * @param string $modulepart propal, facture, facture_fourn, ...
* @param string $relativepath Relative path of docs * @param string $relativepath Relative path of docs
* @param integer $ruleforpicto Rule for picto: 0=Use the generic preview picto, 1=Use the picto of mime type of file) * @param integer $ruleforpicto Rule for picto: 0=Use the generic preview picto, 1=Use the picto of mime type of file). Use a negative value to show a generic picto even if preview not available.
* @param string $param More param on http links * @param string $param More param on http links
* @return string $out Output string with HTML * @return string $out Output string with HTML
*/ */
@ -2160,11 +2160,15 @@ class FormFile
//$out.= '<a class="pictopreview">'; //$out.= '<a class="pictopreview">';
if (empty($ruleforpicto)) { if (empty($ruleforpicto)) {
//$out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail'); //$out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
$out .= '<span class="fa fa-search-plus" style="color: gray"></span>'; $out .= '<span class="fa fa-search-plus pictofixedwidth" style="color: gray"></span>';
} else { } else {
$out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']); $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name'], 'pictofixedwidth');
} }
$out .= '</a>'; $out .= '</a>';
} else {
if ($ruleforpicto < 0) {
$out .= img_picto('', 'generic', '', false, 0, 0, '', 'paddingright pictofixedwidth');
}
} }
} }
return $out; return $out;

View File

@ -2280,7 +2280,7 @@ span.widthpictotitle.pictotitle {
vertical-align: middle; vertical-align: middle;
margin-top: -3px margin-top: -3px
} }
.pictowarning, .pictoerror, .pictopreview, .picto.error { .pictowarning, .pictoerror, .pictopreview, .pictonopreview, .picto.error {
padding-<?php echo $left; ?>: 3px; padding-<?php echo $left; ?>: 3px;
} }
.pictowarning { .pictowarning {

View File

@ -2294,7 +2294,7 @@ td.nobordernopadding.widthpictotitle.col-picto {
vertical-align: middle; vertical-align: middle;
margin-top: -3px margin-top: -3px
} }
.pictowarning, .pictoerror, .pictopreview { .pictowarning, .pictoerror, .pictopreview, .pictonopreview {
padding-<?php echo $left; ?>: 3px; padding-<?php echo $left; ?>: 3px;
} }
.pictowarning { .pictowarning {