cmc-sales/app/views/documents/view.ctp

105 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

2011-05-16 20:19:32 -07:00
<?php
echo $javascript->link('ckeditor/ckeditor');
echo $javascript->link('ckeditor/adapters/jquery');
2011-05-16 20:19:32 -07:00
echo $javascript->link('document_add_edit');
2012-11-18 12:19:55 -08:00
echo $javascript->link('document_attachments');
?>
<?=$this->element('pdf_created_message'); ?>
2022-01-07 19:17:38 -08:00
<?
echo $this->element($docTypeElement);
2011-05-16 20:19:32 -07:00
?>
2011-05-18 16:46:22 -07:00
<button class="addLineItem">Add Line Item</button>
2011-05-19 00:05:01 -07:00
<div id="lineItems">
</div>
<button class="addLineItem">Add Line Item</button>
2011-05-19 00:05:01 -07:00
2011-05-18 16:46:22 -07:00
<div id="pageContentFactory">
2012-11-18 12:19:55 -08:00
<?
echo $form->input("DocPage.content", array('class'=>'page', 'label'=>'Page', 'between'=>'<button class="removePage">X</button>'));
?>
2011-05-18 16:46:22 -07:00
</div>
<div id="addLineItemModal" title="Add Line Item">
2011-05-19 00:05:01 -07:00
</div>
<div id="editLineItemModal" title="Edit Line Item">
</div>
2012-11-18 12:19:55 -08:00
<div id="Attachments" title="Attachments">
<h2 class="document-attachments">Attachments</h2><button id="addAttachment">Add Attachment</button>
2012-12-01 18:17:09 -08:00
<div id="attachments-table">
<table>
2012-11-18 12:19:55 -08:00
<thead>
2012-12-01 18:17:09 -08:00
<th></th>
2012-11-18 12:19:55 -08:00
<th>Filename</th>
<th>Name</th>
<th>Desc</th>
<th>Size</th>
2012-11-18 12:19:55 -08:00
</thead>
<tbody>
<?php
$totalSize = 0;
2012-12-01 18:17:09 -08:00
foreach($attachments as $index => $attachment) {
2012-11-18 12:19:55 -08:00
?>
<tr>
<?php echo $form->input('DocumentAttachment.document_id',
array('type'=>'hidden', 'value'=> $document['Document']['id'])); ?>
2013-03-28 22:30:35 -07:00
<td><?php echo $form->input("DocumentAttachment.{$index}.id",
2012-12-01 18:17:09 -08:00
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']); ?>
2012-11-18 12:19:55 -08:00
</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 }
?>
2022-01-07 19:17:38 -08:00
<tr class="attachment-total">
<td></td>
<td></td>
<td></td>
2022-01-07 19:17:38 -08:00
<td>Total size:</td>
<td><?php echo $number->toReadableSize($totalSize); ?></td>
2012-12-01 18:17:09 -08:00
</tr>
2012-11-18 12:19:55 -08:00
</tbody>
</table>
2012-12-01 18:17:09 -08:00
</div> <!-- #attachments-table -->
2012-12-01 18:17:09 -08:00
<button id="removeAttachments">Remove Selected</button>
</div>
2012-11-18 12:19:55 -08:00
<div id="addAttachmentModal" title="Add Attachment">
<?php echo $this->element('add_attachment'); ?>
</div>
<div id="QuoteDetails" title="Edit Quote Details">
2012-11-17 18:57:16 -08:00
</div>
<div id="InvoiceDetails">
</div>
<span id="documentID" style="display:none;"><?=$document['Document']['id']?></span>