@using MrCMS.Web.Apps.Ecommerce.Helpers
@model MrCMS.Web.Apps.Ecommerce.Entities.Orders.Order

@if (Model.GiftCardUsages.Any())
{
        <h4>Gift Card Usages</h4>
        <table class="table table-striped table-condensed">
            <thead>
                <tr>
                    <th>
                        Date
                    </th>
                    <th>
                        Amount
                    </th>
                    <th>
                        Order
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var usage in Model.GiftCardUsages)
                {
                    <tr>
                        <td>
                            @usage.CreatedOn
                        </td>
                        <td>
                            @usage.Amount.ToCurrencyFormat()
                        </td>
                        <td>
                            @Html.ActionLink("View Card", "Edit", "GiftCard", new {id = usage.GiftCard.Id}, new {@class = "btn btn-xs btn-default"})
                        </td>
                    </tr>
                }
            </tbody>
        </table>
}
