From 2f9b62d67176f088dd785698258f7dcd077f2d73 Mon Sep 17 00:00:00 2001 From: james Date: Sat, 26 Mar 2011 16:26:22 +0000 Subject: [PATCH] Add french award name fields to reports Shrink barcode a bit --- admin/reports.inc.php | 4 ++-- admin/reports_awards.inc.php | 18 ++++++++++++++++++ db/db.update.173.sql | 2 +- tcpdf.inc.php | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/admin/reports.inc.php b/admin/reports.inc.php index 03f91f2..cbb4dd6 100644 --- a/admin/reports.inc.php +++ b/admin/reports.inc.php @@ -903,8 +903,8 @@ foreach($report_stock as $n=>$v) { 'hpadding' => 'auto', 'fgcolor' => array(0,0,0), 'bgcolor' => false, //array(255,255,255) - 'module_width' => 3, // width of a single module in points - 'module_height' => 3 // height of a single module in points + 'module_width' => 2, // width of a single module in points + 'module_height' => 2 // height of a single module in points ); $rep->label_barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N'); break; diff --git a/admin/reports_awards.inc.php b/admin/reports_awards.inc.php index 4983f1c..54e78f7 100644 --- a/admin/reports_awards.inc.php +++ b/admin/reports_awards.inc.php @@ -21,6 +21,10 @@ Boston, MA 02111-1307, USA. */ +function report_awards_fr(&$report, $field, $text) { + return i18n($text,array(),array(),"fr"); +} + $report_awards_fields = array( 'name' => array( 'start_option_group' => 'Award Information', @@ -29,12 +33,26 @@ $report_awards_fields = array( 'width' => 3.0, 'table' => 'award_awards.name' ), + 'name_fr' => array( + 'name' => 'Award -- Name (French)', + 'header' => 'Award Name', + 'width' => 3.0, + 'table' => 'award_awards.name', + 'exec_function' => 'report_awards_fr' ), + 'criteria' => array( 'name' => 'Award -- Criteria', 'header' => 'Award Criteria', 'width' => 3.0, 'table' => 'award_awards.criteria' ), + 'criteria_fr' => array( + 'name' => 'Award -- Criteria (French)', + 'header' => 'Award Criteria', + 'width' => 3.0, + 'table' => 'award_awards.criteria', + 'exec_function' => 'report_awards_fr' ), + 'presenter' => array( 'name' => 'Award -- Presenter', 'header' => 'Award Presenter', diff --git a/db/db.update.173.sql b/db/db.update.173.sql index 20bda50..abfdee7 100644 --- a/db/db.update.173.sql +++ b/db/db.update.173.sql @@ -2,7 +2,7 @@ DELETE FROM reports_items WHERE reports_id=30; INSERT INTO `reports_items` (`reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `fontname`, `fontstyle`, `fontsize`, `align`, `valign`, `on_overflow`) VALUES (30, 'col', 7, 'fair_logo', '', 1, 1, 33, 33, 1, '', '', '', 0, 'center middle', 'middle', ''), -(30, 'col', 6, 'projectbarcode', '', 10, 145, 30, 30, 1, '', '', '', 14, 'center middle', 'middle', ''), +(30, 'col', 6, 'projectbarcode', '', 10, 145, 22, 22, 1, '', '', '', 14, 'center middle', 'middle', ''), (30, 'col', 5, 'static_text', 'Safety Check:', 180, 153, 30, 5, 1, '', '', '', 10, 'right middle', 'middle', ''), (30, 'sort', 0, 'pn', '', 0, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''), (30, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''), diff --git a/tcpdf.inc.php b/tcpdf.inc.php index 81bf314..0b99c80 100644 --- a/tcpdf.inc.php +++ b/tcpdf.inc.php @@ -411,7 +411,7 @@ class pdf extends TCPDF { function label_barcode($code, $type, $x='', $y='', $w='', $h='', $style='', $align='', $distort=false) { $this->write2DBarcode($code,$type, $this->lMargin+$x, $this->tMargin+$y, $w, $h, $style, $align, $distort); - $this->label_text($x-1,$y+$h+1,32,10,"Get the iPhone app search Science Fair",0,"center","center","","normal",10,"scale"); + $this->label_text($x-1,$y+$h+1,24,8,"Get the iPhone app search Science Fair",0,"center","center","","normal",8,"scale"); } }