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

75 lines
1.8 KiB
Plaintext
Raw Normal View History

<div class="documents index">
<h2><?php __('Documents');?></h2>
<table cellpadding="0" cellspacing="0">
<tr>
2016-05-17 05:59:04 -07:00
<th>Created</th>
<th>User</th>
<th>Type</th>
<th>#Pages</th>
<th>PDF Filename</th>
<th>PDF Created</th>
<th>PDF Created By</th>
2016-05-17 05:59:04 -07:00
<th class="actions">Actions</th>
</tr>
<?php
$i = 0;
foreach ($documents as $document):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td>
<?=$time->nice($document['Document']['created']); ?>
</td>
<td>
2016-05-17 06:46:21 -07:00
<?php
$pdf_user_id = $document['Document']['user_id'];
echo $html->link($users[$pdf_user_id], '/users/view/'.$pdf_user_id);
2016-05-17 06:04:00 -07:00
<?php //echo $html->link($document['User']['username'], array('controller' => 'users', 'action' => 'view', $document['User']['id'])); ?>
</td>
<td>
<?=$document['Document']['type'];?>
</td>
<td>
<?=$document['Document']['doc_page_count'];?>
</td>
<td>
<?=$html->link($document['Document']['pdf_filename'], '/pdf/'.$document['Document']['pdf_filename']);?>
</td>
<td>
2016-04-29 19:36:27 -07:00
<?php
$pdf_created_at = $document['Document']['pdf_created_at'];
if($pdf_created_at != '0000-00-00 00:00:00') {
echo $time->nice($document['Document']['pdf_created_at']);
}
?>
</td>
<td>
2016-04-29 19:36:27 -07:00
<?php
if($document['Document']['pdf_created_by_user_id']) {
$pdf_user_id = $document['Document']['pdf_created_by_user_id'];
echo $html->link($users[$pdf_user_id], '/users/view/'.$pdf_user_id);
}
?>
</td>
<td class="actions">
<?php echo $html->link(__('View', true), array('action' => 'view', $document['Document']['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
2016-04-29 19:36:27 -07:00
<?php debug($documents); ?>