2011-05-16 20:19:32 -07:00
|
|
|
<?php
|
|
|
|
|
echo $javascript->link('ckeditor/ckeditor');
|
|
|
|
|
echo $javascript->link('ckeditor/adapters/jquery');
|
2010-07-07 23:18:04 -07:00
|
|
|
|
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');
|
2010-07-07 23:18:04 -07:00
|
|
|
|
2011-08-11 00:30:03 -07:00
|
|
|
?>
|
|
|
|
|
<?=$this->element('pdf_created_message'); ?>
|
|
|
|
|
|
|
|
|
|
<?
|
2011-08-11 22:46:26 -07:00
|
|
|
echo $this->element($docTypeElement);
|
2011-05-16 20:19:32 -07:00
|
|
|
?>
|
2011-05-18 16:46:22 -07:00
|
|
|
|
2011-08-09 20:18:32 -07:00
|
|
|
<button class="addLineItem">Add Line Item</button>
|
2011-05-19 00:05:01 -07:00
|
|
|
<div id="lineItems">
|
|
|
|
|
</div>
|
2011-08-09 20:18:32 -07:00
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
2011-05-24 02:11:07 -07:00
|
|
|
<div id="addLineItemModal" title="Add Line Item">
|
2011-05-19 00:05:01 -07:00
|
|
|
</div>
|
|
|
|
|
|
2011-05-24 02:11:07 -07:00
|
|
|
<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>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php
|
2012-12-01 18:17:09 -08:00
|
|
|
foreach($attachments as $index => $attachment) {
|
2012-11-18 12:19:55 -08:00
|
|
|
?>
|
|
|
|
|
<tr>
|
2012-12-01 18:17:09 -08:00
|
|
|
<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']); ?>
|
2012-11-18 12:19:55 -08:00
|
|
|
</td>
|
|
|
|
|
<td><?php echo $attachment['Attachment']['name']; ?></td>
|
|
|
|
|
<td><?php echo $attachment['Attachment']['description']; ?></td>
|
2012-12-01 18:17:09 -08:00
|
|
|
</tr>
|
|
|
|
|
|
2012-11-18 12:19:55 -08:00
|
|
|
<?php } ?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2012-12-01 18:17:09 -08:00
|
|
|
</div> <!-- #attachments-table -->
|
2011-05-24 02:11:07 -07:00
|
|
|
|
2012-12-01 18:17:09 -08:00
|
|
|
<button id="removeAttachments">Remove Selected</button>
|
2011-05-24 02:11:07 -07:00
|
|
|
</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">
|
2011-05-24 02:11:07 -07:00
|
|
|
|
2012-11-17 18:57:16 -08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2011-05-24 02:11:07 -07:00
|
|
|
<div id="InvoiceDetails">
|
2011-08-09 20:18:32 -07:00
|
|
|
|
2011-05-24 02:11:07 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<span id="documentID" style="display:none;"><?=$document['Document']['id']?></span>
|
|
|
|
|
|
|
|
|
|
<?php // debug($currency);?>
|
|
|
|
|
<?php //debug($docType);?>
|
|
|
|
|
|
2011-08-09 01:54:10 -07:00
|
|
|
<?php //debug($enquiry);?>
|
2011-05-24 02:11:07 -07:00
|
|
|
|
2012-11-17 18:57:16 -08:00
|
|
|
<?php // debug($document);?>
|
2012-11-18 12:19:55 -08:00
|
|
|
<?php debug($attachments);?>
|