I use Gridview yes, I have at the moment been looking at extending the gridview to add an extra header row because I have been doing some reading of CSS and found a few solutions. But here is what I started with to create the HTML I passed in last message:
This is the grid content section view:
$this->widget(bootstrap.widgets.TbGridView', array(
'id'=>'POitems'.$POItems->id,
'type'=>'condensed striped bordered',
'ajaxUpdate'=>'errors',
'enableSorting' => false,
'dataProvider'=>$POItems->itemlist(),
'template'=>"{items}",
'htmlOptions'=>array("style"=>"font-size:12px;"),
'columns'=>array(
array(
'name' => 'quantity',
'header'=>'Qty',
'htmlOptions'=>array('style'=>'text-align:center;'),
),
array('name'=>'supplier_part_number','header'=>'Sup P/N'),
'product.SKU',
array('name'=>'product.product_title',
'type'=>'raw',
'value'=>'$data->custom_productID==1 ? $data->name : $data->product->product_title'),
array(
'name' => 'cost',
'type'=>'raw',
'value'=> '$data->purchaseOrder->currencySymbol . $data->cost',
'htmlOptions'=>array('style'=>'text-align:right;'),
),
array(
'header' => 'Total',
'name' => 'cost',
'type'=>'raw',
'value'=> '$data->purchaseOrder->currencySymbol . $data->quantity * $data->cost',
'htmlOptions'=>array('style'=>'text-align:right;'),
'footer'=> '$data->purchaseOrder->currencySymbo',
),
)
));
?>
<?php $this->widget('bootstrap.widgets.TbDetailView', array(
'data'=>array('id'=>1, 'sampleCost'=>$model->currencySymbol .'99.99', 'lastName'=>'Otto', 'language'=>'CSS'),
'htmlOptions'=>array("class" => "pull-right", "style"=>"width:200px;"),
'attributes'=>array(
array('name'=>'sampleCost', 'label'=>'Total', 'type'=>'raw'),
),
)); ?><center>If you cannot supply any of the the above items or any of the prices have changed please inform purchasing@3dgroupuk.com</center>
Footer is just simple at the moment
this is a footer message to go on every page
Head is simple at the moment aswell:
<div class="row-fluid ">
<div class="span8">
<h4>Purchase Order Check Sheet <?php echo $model->POID; ?> [ <i><?php echo $model->supplier->name; ?></i> ]</h4>
</div>
<div class="span4" style="text-align:right;">
<?php echo CHtml::image(Yii::app()->createAbsoluteUrl(Yii::app()->baseUrl."/assets/images/logo.png"), "3D Group Logo",array("style"=>" width:200px")); ?><br>
<div class="pageNumber">Page 1 of 1</div>
</div>
</div>
And the view to pull them all together is:
<div class="page" style="width:100%; ">
<?php if(isset($data['header'])) { ?><div id="header"> <?php echo $data['header']; ?></div> <?php }?>
<?php if(isset($data['content'])) { ?><div id="contentPrint"> <?php echo $data['content']; ?></div> <?php }?>
<?php if(isset($data['footer'])) { ?><div id="footer"> <?php echo $data['footer']; ?></div> <?php }?>
</div>