partial for Issue #22, 6)add notes to listorders

* added an icon to graphicaly show which orders had comments
* the mouseover the icon shows the comment
This commit is contained in:
Stuardo Rodríguez 2013-02-12 14:47:29 -05:00
parent bded64143e
commit 655d01ba74
2 changed files with 24 additions and 3 deletions

View File

@ -1,5 +1,14 @@
<?php
/**
* Order placed
*
* (also known as listorders)
*
* @package Crunchbutton.Order
* @category model
*
* @property notes The comments the user set for the order
*/
class Crunchbutton_Order extends Cana_Table {
const PAY_TYPE_CASH = 'cash';

View File

@ -1,3 +1,7 @@
<style>
.comments .ui-state-default {border: 0;}
</style>
<? if (!$this->orders->count()) : ?>
No results found
<? else : ?>
@ -13,13 +17,21 @@
<th class="list-order-header">Order Type</th>
<th class="list-order-header">Customer</th>
</tr>
<? foreach ($this->orders as $order) : ?>
<? foreach ($this->orders as $order) : /* @var $order Crunchbutton_Order */?>
<? $date = $order->date(); ?>
<tr class="list-order-item">
<td>
<table>
<tr><td><b>ID</b></td><td><a href="/vieworder/<?=$order->uuid?>">#<?=$order->id?></a></td></tr>
<tr><td><b>ID</b></td><td>
<a href="/vieworder/<?=$order->uuid?>">#<?=$order->id?></a>
</td></tr>
<tr><td><b>Env</b></td><td><?=$order->env?></td></tr>
<? if ($order->notes) :?>
<tr class="comments">
<td><b>Comment</b></td>
<td><a href="#" title="<?=$order->notes?>" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-comment"></span></a></td>
</tr>
<? endif ?>
<tr><td><br />
<? if ($order->refunded) : ?>
REFUNDED