2012-12-01 18:17:09 -08:00
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<th></th>
|
|
|
|
|
<th>Filename</th>
|
|
|
|
|
<th>Name</th>
|
|
|
|
|
<th>Desc</th>
|
2022-01-07 19:17:38 -08:00
|
|
|
<th>Size</th>
|
2012-12-01 18:17:09 -08:00
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2022-01-07 19:17:38 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$totalSize = 0;
|
|
|
|
|
|
2013-03-28 22:30:35 -07:00
|
|
|
foreach($attachments as $index => $attachment) {
|
2012-11-18 12:19:55 -08:00
|
|
|
?>
|
2012-12-01 18:17:09 -08:00
|
|
|
<tr>
|
2013-03-28 22:30:35 -07:00
|
|
|
<td><?php echo $form->input("DocumentAttachment.{$index}.id", array('type'=>'checkbox', 'value'=> $attachment['DocumentAttachment']['id'], 'label' => false, 'class'=>'documentAttachment-checkbox')); ?></td>
|
2012-12-01 18:17:09 -08:00
|
|
|
<td>
|
|
|
|
|
<?php echo $html->link($attachment['Attachment']['filename'], '/attachments/view/'.$attachment['Attachment']['id']); ?>
|
|
|
|
|
</td>
|
|
|
|
|
<td><?php echo $attachment['Attachment']['name']; ?></td>
|
|
|
|
|
<td><?php echo $attachment['Attachment']['description']; ?></td>
|
2022-01-07 19:17:38 -08:00
|
|
|
<td><?php echo $number->toReadableSize($attachment['Attachment']['size']); ?></td>
|
|
|
|
|
<?php $totalSize += $attachment['Attachment']['size']; ?>
|
2012-12-01 18:17:09 -08:00
|
|
|
</tr>
|
2012-11-18 12:19:55 -08:00
|
|
|
|
2012-12-01 18:17:09 -08:00
|
|
|
<?php } ?>
|
2022-01-07 19:17:38 -08:00
|
|
|
|
|
|
|
|
<tr class="attachment-total">
|
|
|
|
|
<td></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td></td>
|
|
|
|
|
<td>Total size:</td>
|
|
|
|
|
<td><?php echo $number->toReadableSize($totalSize); ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
2012-12-01 18:17:09 -08:00
|
|
|
</tbody>
|
|
|
|
|
</table>
|