Better link
This commit is contained in:
parent
680530730c
commit
d74d6fd7ad
@ -141,9 +141,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("DonationsSetup"),$linkback,'setup');
|
||||
|
||||
|
||||
/*
|
||||
* PDF
|
||||
*/
|
||||
// Document templates
|
||||
print '<br>';
|
||||
print_titre($langs->trans("DonationsModels"));
|
||||
|
||||
@ -176,7 +174,7 @@ print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td align="center" width="32" colspan="2">'.$langs->trans("Infos").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Infos").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -255,11 +253,9 @@ if (is_resource($handle))
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
||||
$text='<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'" target="specimen">'.img_object($langs->trans("Preview"),'generic').'</a>';
|
||||
print '<td align="center">';
|
||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'" target="specimen">'.img_object($langs->trans("Preview"),'generic').'</a>';
|
||||
print $html->textwithpicto(' '.$text,$htmltooltip,-1,0);
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -33,8 +33,7 @@ require_once(DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php');
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
/*$langs->load("other");
|
||||
$langs->load("interventions");*/
|
||||
$langs->load("interventions");
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
@ -42,6 +41,7 @@ accessforbidden();
|
||||
$action = GETPOST("action");
|
||||
$value = GETPOST("value");
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011 Fabrice CHERRIER (12/05/2011) http://www.fcinc.fr
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -26,6 +27,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/date.lib.php');
|
||||
|
||||
|
||||
/**
|
||||
@ -270,25 +272,32 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$height_note=0;
|
||||
}
|
||||
|
||||
$pdf->SetXY (10, $tab_top);
|
||||
$pdf->SetXY($this->marge_gauche, $tab_top);
|
||||
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
||||
$pdf->line(10, $tab_top + 8, 200, $tab_top + 8 );
|
||||
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8 );
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetXY (10, $tab_top + 8 );
|
||||
$desc=dol_htmlentitiesbr($fichinter->description,1);
|
||||
$pdf->SetXY($this->marge_gauche, $tab_top + 8 );
|
||||
$text=$fichinter->description;
|
||||
if ($fichinter->duree > 0)
|
||||
{
|
||||
$totaltime=ConvertSecondToTime($fichinter->duree,'all',$conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
$text.=($text?' - ':'').$langs->trans("Total").": ".$totaltime;
|
||||
}
|
||||
$desc=dol_htmlentitiesbr($text,1);
|
||||
//print $outputlangs->convToOutputCharset($desc); exit;
|
||||
|
||||
$pdf->writeHTMLCell(180, 3, 10, $tab_top + 8, $outputlangs->convToOutputCharset($desc), 0, 1);
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$pdf->line(10, $nexY, 200, $nexY);
|
||||
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY);
|
||||
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also.
|
||||
|
||||
//dol_syslog("desc=".dol_htmlentitiesbr($fichinter->description));
|
||||
$nblignes = sizeof($fichinter->lines);
|
||||
$nblignes = count($fichinter->lines);
|
||||
|
||||
$curY = $pdf->GetY();
|
||||
$nexY = $pdf->GetY();
|
||||
@ -299,16 +308,16 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$fichinterligne = $fichinter->lines[$i];
|
||||
|
||||
$valide = $fichinterligne->id ? $fichinterligne->fetch($fichinterligne->id) : 0;
|
||||
if ($valide>0)
|
||||
if ($valide>0 || $fichinter->specimen)
|
||||
{
|
||||
$curY = $nexY+3;
|
||||
|
||||
$pdf->SetXY (10, $curY);
|
||||
$pdf->SetXY($this->marge_gauche, $curY);
|
||||
$pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY,
|
||||
dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($fichinterligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".ConvertSecondToTime($fichinterligne->duration),1,$outputlangs->charset_output), 0, 1, 0);
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY (10, $curY + 3);
|
||||
$pdf->SetXY($this->marge_gauche, $curY + 3);
|
||||
$desc = dol_htmlentitiesbr($fichinterligne->desc,1);
|
||||
$pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY + 3, $desc, 0, 1, 0);
|
||||
$nexY+=dol_nboflines_bis($fichinterligne->desc,52,$outputlangs->charset_output)*3;
|
||||
@ -317,8 +326,8 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
//$pdf->line(10, $tab_top+$tab_height+3, 200, $tab_top+$tab_height+3);
|
||||
|
||||
// Rectangle for title and all lines
|
||||
$pdf->Rect(10, $tab_top, 190, $tab_height+3);
|
||||
$pdf->SetXY (10, $pdf->GetY() + 20);
|
||||
$pdf->Rect($this->marge_gauche, $tab_top, ($this->page_largeur-$this->marge_gauche-$this->marge_droite), $tab_height+3);
|
||||
$pdf->SetXY($this->marge_gauche, $pdf->GetY() + 20);
|
||||
$pdf->MultiCell(60, 5, '', 0, 'J', 0);
|
||||
|
||||
$pdf->SetXY(20,220);
|
||||
|
||||
@ -296,8 +296,15 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
dol_print_error($db);
|
||||
}
|
||||
print '<tr><td valign="top">'.$langs->trans("LastMovement").'</td><td colspan="3">';
|
||||
if ($lastmovementdate) print dol_print_date($lastmovementdate,'dayhour').' ';
|
||||
print '(<a href="'.DOL_URL_ROOT.'/product/stock/mouvement.php?idproduct='.$product->id.'">'.$langs->trans("FullList").'</a>)';
|
||||
if ($lastmovementdate)
|
||||
{
|
||||
print dol_print_date($lastmovementdate,'dayhour').' ';
|
||||
print '(<a href="'.DOL_URL_ROOT.'/product/stock/mouvement.php?idproduct='.$product->id.'">'.$langs->trans("FullList").'</a>)';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/stock/mouvement.php?idproduct='.$product->id.'">'.$langs->trans("None").'</a>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user