cmc-sales/views/documents/view.ctp

93 lines
2.2 KiB
Plaintext
Raw 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'); ?>
<?
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>
</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 -->
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>
<?php // debug($currency);?>
<?php //debug($docType);?>
<?php //debug($enquiry);?>
2012-11-17 18:57:16 -08:00
<?php // debug($document);?>
2012-11-18 12:19:55 -08:00
<?php debug($attachments);?>