39 lines
1 KiB
PHP
39 lines
1 KiB
PHP
<table>
|
|
<thead>
|
|
<th></th>
|
|
<th>Filename</th>
|
|
<th>Name</th>
|
|
<th>Desc</th>
|
|
<th>Size</th>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
|
|
$totalSize = 0;
|
|
|
|
foreach($attachments as $index => $attachment) {
|
|
?>
|
|
<tr>
|
|
<td><?php echo $form->input("DocumentAttachment.{$index}.id", array('type'=>'checkbox', 'value'=> $attachment['DocumentAttachment']['id'], 'label' => false, 'class'=>'documentAttachment-checkbox')); ?></td>
|
|
<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>
|
|
<td><?php echo $number->toReadableSize($attachment['Attachment']['size']); ?></td>
|
|
<?php $totalSize += $attachment['Attachment']['size']; ?>
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
<tr class="attachment-total">
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td>Total size:</td>
|
|
<td><?php echo $number->toReadableSize($totalSize); ?></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|