silverstripe-webpack/app/templates/SilverShop/Page/Layout/AccountPage_addressbook.ss

80 lines
4.2 KiB
Scheme
Raw Permalink Normal View History

<div class="page-content container">
<div class="account element">
<% include SilverShop\Includes\AccountNavigation %>
2018-08-26 12:46:03 +02:00
<div class="row">
<div class="col-sm-6">
<h2 class="pagetitle">
<%t SilverShop\Page\AccountPage_AddressBook.Title 'Default Addresses' %>
</h2>
2018-08-26 12:46:03 +02:00
<%-- If you want the old dropdown system back you can just use $DefaultAddressForm here instead --%>
<% if $CurrentMember.AddressBook %>
<% loop $CurrentMember.AddressBook %>
<div class="card radius address-panel $EvenOdd">
<div class="card-body">
<% if $ID == $CurrentMember.DefaultShippingAddressID %>
<h5 class="card-title tag def-shipping">
<%t SilverShop\Page\AccountPage_AddressBook.DefaultShippingAddress 'Default Shipping Address' %>
</h5>
<% end_if %>
2018-08-26 12:46:03 +02:00
<% if $ID == $CurrentMember.DefaultBillingAddressID %>
<h5 class="card-title tag def-billing">
<%t SilverShop\Page\AccountPage_AddressBook.DefaultBillingAddress 'Default Billing Address' %>
</h5>
<% end_if %>
2018-08-26 12:46:03 +02:00
<div class="card-text">
<% include SilverShop\Model\Address %>
</div>
2018-08-26 12:46:03 +02:00
<% if $ID != $CurrentMember.DefaultShippingAddressID %>
<a
title="<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultShippingTitle 'Make this my default shipping address' %>"
href="account/setdefaultshipping/{$ID}"
class="card-link"
>
<i class="fas fa-check"></i>
<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultShipping 'Make Default Shipping' %>
</a>
<% end_if %>
2018-08-26 12:46:03 +02:00
<% if $ID != $CurrentMember.DefaultBillingAddressID %>
<a
title="<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultBillingTitle 'Make this my default billing address' %>"
href="account/setdefaultbilling/{$ID}"
class="card-link"
>
<i class="fas fa-check"></i>
<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultBilling 'Make Default Billing' %>
</a>
<% end_if %>
2018-08-26 12:46:03 +02:00
<a
href="account/deleteaddress/{$ID}"
class="remove-address card-link"
title="<%t SilverShop\Page\AccountPage_AddressBook.DeleteAddress 'Delete this address' %>"
>
<i class="fas fa-times"></i>
<%t SilverShop\Page\AccountPage_AddressBook.DeleteAddress 'Delete this address' %>
</a>
</div>
</div>
<% end_loop %>
<% else %>
<div class="alert alert-warning">
<%t SilverShop\Page\AccountPage_AddressBook.NoAddress 'No addresses found.' %>
</div>
2018-08-26 12:46:03 +02:00
<% end_if %>
</div>
2018-08-26 12:46:03 +02:00
<div class="col-sm-6">
<h2><%t SilverShop\Page\AccountPage_AddressBook.CreateNewTitle 'Create New Address' %></h2>
2018-08-26 12:46:03 +02:00
$CreateAddressForm
</div>
</div>
</div>
</div>