commit 892c5791c1792bf4f4ad23affd4bf04e41fd52de
Author: Eric Seigne <eric.seigne@ryxeo.com>
Date:   Wed Aug 4 12:32:25 2010 +0200

    modif eric pluginpdf pour avoir toujours les composants et supprimer les trucs en trop en haut de page

diff --git a/plugins/pdf/inc/plugin_pdf.functions.php b/plugins/pdf/inc/plugin_pdf.functions.php
index c89e98a..82056f7 100644
--- a/plugins/pdf/inc/plugin_pdf.functions.php
+++ b/plugins/pdf/inc/plugin_pdf.functions.php
@@ -155,10 +155,14 @@ function plugin_pdf_add_header($pdf,$ID,$type){
 		case COMPUTER_TYPE:
 			$computer = new Computer();
 			$computer->getFromDB($ID);
+
+			//erics on ajoute un peu de texte et
+			//erics on simplifie l'affichage
 			if($computer->fields['name'])
-				$pdf->addText(220,$height-45,14,utf8_decode('<b>'.$computer->fields['name'].' ('.plugin_pdf_getDropdownName('glpi_entities',$computer->fields['FK_entities']).')</b>'));
+			  $pdf->addText(220,$height-45,14,utf8_decode('<b>Inventaire du matériel: '.$computer->fields['name']));
 			else
-				$pdf->addText(220,$height-45,14,utf8_decode('<b>'.$LANG["common"][2].' '.$computer->fields['ID'].' ('.plugin_pdf_getDropdownName('glpi_entities',$computer->fields['FK_entities']).')</b>'));
+			  $pdf->addText(220,$height-45,14,utf8_decode('<b>'.$LANG["common"][2].' '.$computer->fields['ID'].' ('.plugin_pdf_getDropdownName('glpi_entities',$computer->fields['FK_entities']).')</b>'));
+				
 		break;
 		case SOFTWARE_TYPE:
 			$software = new Software();
@@ -210,8 +214,9 @@ function plugin_pdf_config_computer($tab,$width,$ID){
 			}
 		}
 	$pdf->restoreState();
-			
-	$pdf->addText(100,$start_tab,9,utf8_decode('<b>'.$LANG["common"][2].' '.$computer->fields['ID'].' ('.plugin_pdf_getDropdownName('glpi_entities',$computer->fields['FK_entities']).')</b>'));
+		
+	//erics on simplifie pas besoin de ca
+	//	$pdf->addText(100,$start_tab,9,utf8_decode('<b>'.$LANG["common"][2].' '.$computer->fields['ID'].' ('.plugin_pdf_getDropdownName('glpi_entities',$computer->fields['FK_entities']).')</b>'));
 	$pdf->addText(30,$start_tab-20,9,utf8_decode('<b><i>'.$LANG["common"][16].' :</i></b> '.$computer->fields['name']));
 	$pdf->addText(30,$start_tab-40,9,utf8_decode('<b><i>'.$LANG["common"][17].' :</i></b> '.plugin_pdf_getDropdownName('glpi_type_computers',$computer->fields['type'])));
 	$pdf->addText(30,$start_tab-60,9,utf8_decode('<b><i>'.$LANG["common"][22].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_model',$computer->fields['model'])));
@@ -226,7 +231,6 @@ function plugin_pdf_config_computer($tab,$width,$ID){
 		$pdf->addText(30,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][1]));
 	else
 		$pdf->addText(30,$start_tab-200,9,utf8_decode('<b><i>'.$LANG["ocsng"][6].' '.$LANG["Menu"][33].' :</i></b> '.$LANG["choice"][0]));
-		
 	$pdf->addText(30,$start_tab-240,9,utf8_decode('<b><i>'.$LANG["common"][15].' :</i></b> '.plugin_pdf_getDropdownName('glpi_dropdown_locations',$computer->fields['location'])));
 	$pdf->addText(30,$start_tab-260,9,utf8_decode('<b><i>'.$LANG["common"][25].' :</i></b> '));
 			
@@ -235,12 +239,14 @@ function plugin_pdf_config_computer($tab,$width,$ID){
 	while($temp = $pdf->addTextWrap(105,$y,2*$length_tab-80,9,$temp))
 		$y-=9;
 			
+	/*
 	if(!empty($computer->fields['tplname']))
 		$pdf->addText($length_tab+35,$start_tab,9,utf8_decode('<b>'.$LANG["common"][26].' : '.convDateTime($computer->fields["date_mod"]).' ('.$LANG["common"][13].' : '.$computer->fields['tplname'].')</b>'));
 	elseif($computer->fields['ocs_import'])
 		$pdf->addText($length_tab+35,$start_tab,9,utf8_decode('<b>'.$LANG["common"][26].' : '.convDateTime($computer->fields["date_mod"]).' ('.$LANG["ocsng"][7].')</b>'));
 	else
 		$pdf->addText($length_tab+80,$start_tab,9,utf8_decode('<b>'.$LANG["common"][26].' : '.convDateTime($computer->fields["date_mod"]).'</b>'));
+	*/
 			
 	$pdf->addText($length_tab+35,$start_tab-20,9,utf8_decode('<b><i>'.$LANG["common"][18].' :</i></b> '.$computer->fields['contact']));
 	$pdf->addText($length_tab+35,$start_tab-40,9,utf8_decode('<b><i>'.$LANG["common"][21].' :</i></b> '.$computer->fields['contact_num']));
@@ -2223,6 +2229,8 @@ foreach($tab_id as $key => $ID)
 			
 			$tab_pdf["pdf"] = plugin_pdf_add_header($tab_pdf["pdf"],$ID,COMPUTER_TYPE);
 			$tab_pdf = plugin_pdf_config_computer($tab_pdf,$width,$ID);
+			//erics, on ajoute systematiquement le contenu materiel ...
+			$tab_pdf = plugin_pdf_device($tab_pdf,$width,$ID,COMPUTER_TYPE);
 			
 			for($i=0;$i<count($tab);$i++)
 			{
