Skip to content

Commit a0e7066

Browse files
authored
Merge pull request #3353 from mamhoff/paginate-master-prices
Paginate master prices
2 parents 458ef40 + 35baeca commit a0e7066

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
<div class="row">
2-
<div class="col-12">
3-
<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>">
4-
<% if variants %>
5-
<legend align="center"><%= I18n.t(:master_variant, scope: :spree) %> <%= admin_hint I18n.t(:master_variant, scope: :spree), I18n.t(:master_variant, scope: [:spree, :hints, "spree/price"]) %></legend>
6-
<% end %>
7-
<table class="index master_prices">
8-
<colgroup>
9-
<col style="width: 30%">
10-
<col style="width: 30%">
11-
<col style="width: 20%">
12-
<col style="width: 20%">
13-
</colgroup>
14-
<thead data-hook="master_prices_header">
15-
<tr>
16-
<th><%= Spree::Price.human_attribute_name(:country) %></th>
17-
<th><%= Spree::Price.human_attribute_name(:currency) %></th>
18-
<th><%= Spree::Price.human_attribute_name(:amount) %></th>
19-
<th class="actions"></th>
20-
</tr>
21-
</thead>
22-
<% master_prices.each do |price| %>
23-
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %>">
24-
<td><%= price.display_country %></td>
25-
<td><%= price.currency %></td>
26-
<td><%= price.money.to_html %></td>
27-
<td class="actions">
28-
<% if can?(:update, price) %>
29-
<%= link_to_edit(price, no_text: true) unless price.deleted? %>
30-
<% end %>
31-
<% if can?(:destroy, price) %>
32-
&nbsp;
33-
<%= link_to_delete(price, no_text: true) unless price.deleted? %>
34-
<% end %>
35-
</td>
36-
</tr>
37-
<% end %>
38-
</table>
39-
</fieldset>
40-
</div>
41-
</div>
1+
<%= paginate master_prices, theme: "solidus_admin" %>
2+
3+
<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>">
4+
<% if variants %>
5+
<legend align="center"><%= I18n.t(:master_variant, scope: :spree) %> <%= admin_hint I18n.t(:master_variant, scope: :spree), I18n.t(:master_variant, scope: [:spree, :hints, "spree/price"]) %></legend>
6+
<% end %>
7+
<table class="index master_prices">
8+
<colgroup>
9+
<col style="width: 30%">
10+
<col style="width: 30%">
11+
<col style="width: 20%">
12+
<col style="width: 20%">
13+
</colgroup>
14+
<thead data-hook="master_prices_header">
15+
<tr>
16+
<th><%= Spree::Price.human_attribute_name(:country) %></th>
17+
<th><%= Spree::Price.human_attribute_name(:currency) %></th>
18+
<th><%= Spree::Price.human_attribute_name(:amount) %></th>
19+
<th class="actions"></th>
20+
</tr>
21+
</thead>
22+
<% master_prices.each do |price| %>
23+
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %>">
24+
<td><%= price.display_country %></td>
25+
<td><%= price.currency %></td>
26+
<td><%= price.money.to_html %></td>
27+
<td class="actions">
28+
<% if can?(:update, price) %>
29+
<%= link_to_edit(price, no_text: true) unless price.deleted? %>
30+
<% end %>
31+
<% if can?(:destroy, price) %>
32+
&nbsp;
33+
<%= link_to_delete(price, no_text: true) unless price.deleted? %>
34+
<% end %>
35+
</td>
36+
</tr>
37+
<% end %>
38+
</table>
39+
</fieldset>
40+
41+
<%= paginate master_prices, theme: "solidus_admin" %>

0 commit comments

Comments
 (0)