Created
April 9, 2012 11:09
-
-
Save NickToye/2342903 to your computer and use it in GitHub Desktop.
block_view_orders.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="view_orders" class="accounts col span_8"> | |
<?= open_form() ?> | |
<? if(!$orders->count): ?> | |
<p>No orders yet.</p> | |
<? else: ?> | |
<p>Click an order for details.</p> | |
<table> | |
<thead> | |
<tr> | |
<th class="first"></th> | |
<th>#</th> | |
<th>Date</th> | |
<th>Status</th> | |
<th class="text-right last">Total</th> | |
</tr> | |
</thead> | |
<tbody> | |
<? foreach($orders as $order): ?> | |
<? | |
$url = root_url('/') . 'account/order/' . $order->id; | |
?> | |
<tr class="<?= zebra('order') ?>"> | |
<td> | |
<span title="<?= h($order->status->name) ?>" style="background-color: <?= $order->color ?>"> </span> | |
</td> | |
<td><a href="<?= $url ?>"><?= $order->id ?></a></td> | |
<td><a href="<?= $url ?>"><?= $order->order_datetime->format('%x') ?></a></td> | |
<td><a href="<?= $url ?>"><strong><?= h($order->status->name) ?></strong> since <?= $order->status_update_datetime->format('%x') ?></a></td> | |
<td class="text-right last"><a href="<?= $url ?>"><?= format_currency($order->total) ?></a></th> | |
</tr> | |
<? endforeach ?> | |
</tbody> | |
</table> | |
<? endif ?> | |
<?= close_form() ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment