Fix look and feel v6
This commit is contained in:
parent
7c0de18ac1
commit
a8e16910c0
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
require '../../../main.inc.php';
|
require '../../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php';
|
||||||
@ -71,6 +72,8 @@ if ($action == 'builddoc')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$formfile=new FormFile($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$sql = "SELECT count(*) as cc,";
|
$sql = "SELECT count(*) as cc,";
|
||||||
@ -122,13 +125,14 @@ if ($resql)
|
|||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Period").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("EventsNb").'</td>';
|
print '<td align="center">'.$langs->trans("EventsNb").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Action").'</td>';
|
print '<td align="center">'.$langs->trans("Action").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("PDF").'</td>';
|
print '<td>'.$langs->trans("PDF").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Date").'</td>';
|
print '<td align="center">'.$langs->trans("Date").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Size").'</td>';
|
print '<td align="center">'.$langs->trans("Size").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
@ -139,20 +143,44 @@ if ($resql)
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
|
// Date
|
||||||
print "<td>".$obj->df."</td>\n";
|
print "<td>".$obj->df."</td>\n";
|
||||||
|
|
||||||
|
// Nb of events
|
||||||
print '<td align="center">'.$obj->cc.'</td>';
|
print '<td align="center">'.$obj->cc.'</td>';
|
||||||
|
|
||||||
|
// Button to build doc
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_picto($langs->trans('GenerateReport'),'filenew').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'),'filenew').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
$name = "actions-".$obj->month."-".$obj->year.".pdf";
|
$name = "actions-".$obj->month."-".$obj->year.".pdf";
|
||||||
$relativepath= $name;
|
$relativepath= $name;
|
||||||
$file = $conf->agenda->dir_temp."/".$name;
|
$file = $conf->agenda->dir_temp."/".$name;
|
||||||
|
$modulepart = 'actionsreport';
|
||||||
|
$documenturl= DOL_URL_ROOT.'/document.php';
|
||||||
|
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper
|
||||||
|
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
print '<td align="center"><a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&file='.urlencode($relativepath).'&modulepart=actionsreport">'.img_pdf().'</a></td>';
|
print '<td class="tdoverflowmax300">';
|
||||||
|
//print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&file='.urlencode($relativepath).'&modulepart=actionsreport">'.img_pdf().'</a>';
|
||||||
|
|
||||||
|
$filearray=array('name'=>basename($file),'fullname'=>$file,'type'=>'file');
|
||||||
|
$out='';
|
||||||
|
|
||||||
|
// Show file name with link to download
|
||||||
|
$tmp = $formfile->showPreview($filearray,$modulepart,$relativepath,0,$param);
|
||||||
|
$out.= ($tmp?$tmp.' ':'');
|
||||||
|
$out.= '<a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param?'&'.$param:'').'"';
|
||||||
|
$mime=dol_mimetype($relativepath,'',0);
|
||||||
|
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||||
|
$out.= ' target="_blank">';
|
||||||
|
$out.= img_mime($filearray["name"],$langs->trans("File").': '.$filearray["name"]).' '.$filearray["name"];
|
||||||
|
$out.= '</a>'."\n";
|
||||||
|
print $out;
|
||||||
|
|
||||||
|
print '</td>';
|
||||||
print '<td align="center">'.dol_print_date(dol_filemtime($file),'dayhour').'</td>';
|
print '<td align="center">'.dol_print_date(dol_filemtime($file),'dayhour').'</td>';
|
||||||
print '<td align="center">'.dol_print_size(dol_filesize($file)).'</td>';
|
print '<td align="center">'.dol_print_size(dol_filesize($file)).'</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -706,7 +706,7 @@ class FormFile
|
|||||||
$out.= '<tr class="oddeven">';
|
$out.= '<tr class="oddeven">';
|
||||||
|
|
||||||
$documenturl = DOL_URL_ROOT.'/document.php';
|
$documenturl = DOL_URL_ROOT.'/document.php';
|
||||||
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP;
|
if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) $documenturl=$conf->global->DOL_URL_ROOT_DOCUMENT_PHP; // To use another wrapper
|
||||||
|
|
||||||
// Show file name with link to download
|
// Show file name with link to download
|
||||||
$out.= '<td class="tdoverflowmax300">';
|
$out.= '<td class="tdoverflowmax300">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user