refactor: add basic layout and update icons for addresses page

pagebuilder
abhisheks 2023-11-27 10:50:20 +05:30
parent 5e612c5b4f
commit 0316955017
2 changed files with 22 additions and 20 deletions

View File

@ -23,23 +23,21 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{block name='address_block_item'}
<article id="address-{$address.id}" class="address" data-id-address="{$address.id}">
<div id="address-{$address.id}" class="flex items-center gap-8" data-id-address="{$address.id}">
<div class="address-body">
<h4>{$address.alias}</h4>
<h4 class="font-semibold text-lg">{$address.alias}</h4>
<address>{$address.formatted nofilter}</address>
</div>
{block name='address_block_item_actions'}
<div class="address-footer">
<div class="address-footer flex gap-2">
<a href="{url entity=address id=$address.id}" data-link-action="edit-address" >
<i class="material-icons">&#xE254;</i>
<span>{l s='Update' d='Shop.Theme.Actions'}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pencil" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" /><path d="M13.5 6.5l4 4" /></svg>
</a>
<a href="{url entity=address id=$address.id params=['delete' => 1, 'token' => $token]}" data-link-action="delete-address" >
<i class="material-icons">&#xE872;</i>
<span>{l s='Delete' d='Shop.Theme.Actions'}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-trash" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 7l16 0" /><path d="M10 11l0 6" /><path d="M14 11l0 6" /><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" /><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" /></svg>
</a>
</div>
{/block}
</article>
</div>
{/block}

View File

@ -25,21 +25,25 @@
{extends file='customer/page.tpl'}
{block name='page_title'}
<h2 class="products-section-title text-2xl font-bold mb-8">
{l s='Your addresses' d='Shop.Theme.Customeraccount'}
</h2>
{/block}
{block name='page_content'}
<div class="flex w-full flex-wrap">
{foreach $customer.addresses as $address}
<div class="col-lg-4 col-md-6 col-sm-6">
<div class="w-full md:w-1/2 lg:w-1/4">
{block name='customer_address'}
{include file='customer/_partials/block-address.tpl' address=$address}
{/block}
</div>
{/foreach}
</div>
<div class="clearfix"></div>
<div class="addresses-footer">
<a href="{$urls.pages.address}" data-link-action="add-address">
<i class="material-icons">&#xE145;</i>
<a href="{$urls.pages.address}" data-link-action="add-address" class="flex flex-col items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pencil-plus" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" /><path d="M13.5 6.5l4 4" /><path d="M16 19h6" /><path d="M19 16v6" /></svg>
<span>{l s='Create new address' d='Shop.Theme.Actions'}</span>
</a>
</div>