Skip to content
Snippets Groups Projects
Commit b75f896b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

NEW Into GED module, filename is truncated only if there is not enough

space into table
parent fba39708
No related branches found
No related tags found
No related merge requests found
......@@ -796,6 +796,7 @@ class FormFile
// Show list of existing files
if (empty($useinecm)) print load_fiche_titre($title?$title:$langs->trans("AttachedFiles"));
if (empty($url)) $url=$_SERVER["PHP_SELF"];
print '<!-- html.formfile::list_of_documents -->'."\n";
print '<table width="100%" class="'.($useinecm?'nobordernopadding':'liste').'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Documents2"),$url,"name","",$param,'align="left"',$sortfield,$sortorder);
......@@ -829,10 +830,9 @@ class FormFile
{
$relativepath=preg_replace('/^.*\/produit\//','',$file['path']).'/';
}
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>';
print '<td class="tdoverflow">';
//print "XX".$file['name']; //$file['name'] must be utf8
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
if ($forcedownload) print '&attachment=1';
......@@ -849,11 +849,12 @@ class FormFile
print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' ';
if ($showrelpart == 1) print $relativepath;
print dol_trunc($file['name'],$maxlength,'middle');
//print dol_trunc($file['name'],$maxlength,'middle');
print $file['name'];
print '</a>';
print "</td>\n";
print '<td align="right">'.dol_print_size($file['size'],1,1).'</td>';
print '<td align="center">'.dol_print_date($file['date'],"dayhour","tzuser").'</td>';
print '<td align="right" width="80px">'.dol_print_size($file['size'],1,1).'</td>';
print '<td align="center" width="130px">'.dol_print_date($file['date'],"dayhour","tzuser").'</td>';
// Preview
if (empty($useinecm))
{
......@@ -871,7 +872,7 @@ class FormFile
}
// Delete or view link
// ($param must start with &)
print '<td align="right">';
print '<td class="valignmiddle right" width="50px">';
if ($useinecm) print '<a href="'.DOL_URL_ROOT.'/ecm/docfile.php?urlfile='.urlencode($file['name']).$param.'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_view().'</a> &nbsp; ';
else
{
......
......@@ -529,6 +529,13 @@ div.myavailability {
.strikefordisabled {
text-decoration: line-through;
}
.tdoverflow {
max-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ============================================================================== */
/* Styles to hide objects */
......
......@@ -517,6 +517,12 @@ div.myavailability {
.strikefordisabled {
text-decoration: line-through;
}
.tdoverflow {
max-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ============================================================================== */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment