Skip to content

Commit 79a363a

Browse files
authored
Merge pull request #465 from JBLach/customer-discount-credit-tables-improvement
customer tables improvement
2 parents 5db0992 + bf95734 commit 79a363a

File tree

2 files changed

+69
-63
lines changed

2 files changed

+69
-63
lines changed

templates/customer/discount.tpl

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,69 +10,71 @@
1010

1111
{block name='page_content'}
1212
{if $cart_rules}
13-
<table class="table table-striped table-bordered d-none d-sm-block d-md-block">
14-
<thead class="thead-default">
15-
<tr>
16-
<th>{l s='Code' d='Shop.Theme.Checkout'}</th>
17-
<th>{l s='Description' d='Shop.Theme.Checkout'}</th>
18-
<th>{l s='Quantity' d='Shop.Theme.Checkout'}</th>
19-
<th>{l s='Value' d='Shop.Theme.Checkout'}</th>
20-
<th>{l s='Minimum' d='Shop.Theme.Checkout'}</th>
21-
<th>{l s='Cumulative' d='Shop.Theme.Checkout'}</th>
22-
<th>{l s='Expiration date' d='Shop.Theme.Checkout'}</th>
23-
</tr>
24-
</thead>
25-
<tbody>
26-
{foreach from=$cart_rules item=cart_rule}
13+
<div class="table-wrapper">
14+
<table class="table table-striped d-none d-xl-table">
15+
<thead class="thead-default">
2716
<tr>
28-
<th scope="row">{$cart_rule.code}</th>
29-
<td>{$cart_rule.name}</td>
30-
<td class="text-xs-end">{$cart_rule.quantity_for_user}</td>
31-
<td>{$cart_rule.value}</td>
32-
<td>{$cart_rule.voucher_minimal}</td>
33-
<td>{$cart_rule.voucher_cumulable}</td>
34-
<td>{$cart_rule.voucher_date}</td>
17+
<th>{l s='Code' d='Shop.Theme.Checkout'}</th>
18+
<th>{l s='Description' d='Shop.Theme.Checkout'}</th>
19+
<th>{l s='Quantity' d='Shop.Theme.Checkout'}</th>
20+
<th>{l s='Value' d='Shop.Theme.Checkout'}</th>
21+
<th>{l s='Minimum' d='Shop.Theme.Checkout'}</th>
22+
<th>{l s='Cumulative' d='Shop.Theme.Checkout'}</th>
23+
<th>{l s='Expiration date' d='Shop.Theme.Checkout'}</th>
3524
</tr>
36-
{/foreach}
37-
</tbody>
38-
</table>
39-
<div class="cart-rules d-none d-sm-block d-md-none">
25+
</thead>
26+
<tbody>
27+
{foreach from=$cart_rules item=cart_rule}
28+
<tr>
29+
<th scope="row">{$cart_rule.code}</th>
30+
<td>{$cart_rule.name}</td>
31+
<td class="text-xs-end">{$cart_rule.quantity_for_user}</td>
32+
<td>{$cart_rule.value}</td>
33+
<td>{$cart_rule.voucher_minimal}</td>
34+
<td>{$cart_rule.voucher_cumulable}</td>
35+
<td>{$cart_rule.voucher_date}</td>
36+
</tr>
37+
{/foreach}
38+
</tbody>
39+
</table>
40+
</div>
41+
<div class="cart-rules row d-flex d-xl-none">
4042
{foreach from=$cart_rules item=cart_rule}
41-
<div class="cart-rule">
43+
<div class="cart-rule table-wrapper col-lg-6">
4244
<ul>
43-
<li>
45+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
4446
<strong>{l s='Code' d='Shop.Theme.Checkout'}</strong>
4547
{$cart_rule.code}
4648
</li>
47-
<li>
49+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
4850
<strong>{l s='Description' d='Shop.Theme.Checkout'}</strong>
4951
{$cart_rule.name}
5052
</li>
51-
<li>
53+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
5254
<strong>{l s='Quantity' d='Shop.Theme.Checkout'}</strong>
5355
{$cart_rule.quantity_for_user}
5456
</li>
55-
<li>
57+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
5658
<strong>{l s='Value' d='Shop.Theme.Checkout'}</strong>
5759
{$cart_rule.value}
5860
</li>
59-
<li>
61+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
6062
<strong>{l s='Minimum' d='Shop.Theme.Checkout'}</strong>
6163
{$cart_rule.voucher_minimal}
6264
</li>
63-
<li>
65+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
6466
<strong>{l s='Cumulative' d='Shop.Theme.Checkout'}</strong>
6567
{$cart_rule.voucher_cumulable}
6668
</li>
67-
<li>
69+
<li class="d-flex align-items-center justify-content-between py-3">
6870
<strong>{l s='Expiration date' d='Shop.Theme.Checkout'}</strong>
6971
{$cart_rule.voucher_date}
7072
</li>
7173
</ul>
7274
</div>
7375
{/foreach}
7476
</div>
75-
{else}
76-
<div class="alert alert-info" role="alert" data-alert="info">{l s='You do not have any vouchers.' d='Shop.Notifications.Warning'}</div>
77-
{/if}
77+
{else}
78+
<div class="alert alert-info" role="alert" data-alert="info">{l s='You do not have any vouchers.' d='Shop.Notifications.Warning'}</div>
79+
{/if}
7880
{/block}

templates/customer/order-slip.tpl

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,50 @@
1212
<h6>{l s='Credit slips you have received after canceled orders.' d='Shop.Theme.Customeraccount'}</h6>
1313

1414
{if $credit_slips}
15-
<table class="table table-striped table-bordered d-none d-sm-block d-md-block">
16-
<thead class="thead-default">
17-
<tr>
18-
<th>{l s='Order' d='Shop.Theme.Customeraccount'}</th>
19-
<th>{l s='Credit slip' d='Shop.Theme.Customeraccount'}</th>
20-
<th>{l s='Date issued' d='Shop.Theme.Customeraccount'}</th>
21-
<th>{l s='View credit slip' d='Shop.Theme.Customeraccount'}</th>
22-
</tr>
23-
</thead>
24-
<tbody>
25-
{foreach from=$credit_slips item=slip}
15+
<div class="table-wrapper">
16+
<table class="table table-striped d-none d-xl-table">
17+
<thead class="thead-default">
2618
<tr>
27-
<td><a href="{$slip.order_url_details}" data-link-action="view-order-details">{$slip.order_reference}</a></td>
28-
<td scope="row">{$slip.credit_slip_number}</td>
29-
<td>{$slip.credit_slip_date}</td>
30-
<td class="text-sm-center">
31-
<a href="{$slip.url}"><i class="material-icons">&#xE415;</i></a>
32-
</td>
19+
<th>{l s='Order' d='Shop.Theme.Customeraccount'}</th>
20+
<th>{l s='Credit slip' d='Shop.Theme.Customeraccount'}</th>
21+
<th>{l s='Date issued' d='Shop.Theme.Customeraccount'}</th>
22+
<th>{l s='View credit slip' d='Shop.Theme.Customeraccount'}</th>
3323
</tr>
34-
{/foreach}
35-
</tbody>
36-
</table>
37-
<div class="credit-slips d-none d-sm-block d-md-none">
24+
</thead>
25+
<tbody>
26+
{foreach from=$credit_slips item=slip}
27+
<tr>
28+
<td><a href="{$slip.order_url_details}" data-link-action="view-order-details">{$slip.order_reference}</a></td>
29+
<td scope="row">{$slip.credit_slip_number}</td>
30+
<td>{$slip.credit_slip_date}</td>
31+
<td class="text-sm-center">
32+
<a href="{$slip.url}"><i class="material-icons">&#xE415;</i></a>
33+
</td>
34+
</tr>
35+
{/foreach}
36+
</tbody>
37+
</table>
38+
</div>
39+
<div class="credit-slips row d-flex d-xl-none">
3840
{foreach from=$credit_slips item=slip}
39-
<div class="credit-slip">
41+
<div class="credit-slip col-lg-6">
4042
<ul>
41-
<li>
43+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
4244
<strong>{l s='Order' d='Shop.Theme.Customeraccount'}</strong>
4345
<a href="{$slip.order_url_details}" data-link-action="view-order-details">{$slip.order_reference}</a>
4446
</li>
45-
<li>
47+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
4648
<strong>{l s='Credit slip' d='Shop.Theme.Customeraccount'}</strong>
4749
{$slip.credit_slip_number}
4850
</li>
49-
<li>
51+
<li class="d-flex align-items-center justify-content-between border-bottom py-3">
5052
<strong>{l s='Date issued' d='Shop.Theme.Customeraccount'}</strong>
5153
{$slip.credit_slip_date}
5254
</li>
53-
<li>
54-
<a href="{$slip.url}">{l s='View credit slip' d='Shop.Theme.Customeraccount'}</a>
55+
<li class="d-flex align-items-center justify-content-end py-3">
56+
<a href="{$slip.url}" class="d-inline-block text-reset border-bottom">
57+
{l s='View credit slip' d='Shop.Theme.Customeraccount'}
58+
</a>
5559
</li>
5660
</ul>
5761
</div>

0 commit comments

Comments
 (0)