-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3353 from mamhoff/paginate-master-prices
Paginate master prices
- Loading branch information
Showing
1 changed file
with
41 additions
and
41 deletions.
There are no files selected for viewing
82 changes: 41 additions & 41 deletions
82
backend/app/views/spree/admin/prices/_master_variant_table.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
<div class="row"> | ||
<div class="col-12"> | ||
<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>"> | ||
<% if variants %> | ||
<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> | ||
<% end %> | ||
<table class="index master_prices"> | ||
<colgroup> | ||
<col style="width: 30%"> | ||
<col style="width: 30%"> | ||
<col style="width: 20%"> | ||
<col style="width: 20%"> | ||
</colgroup> | ||
<thead data-hook="master_prices_header"> | ||
<tr> | ||
<th><%= Spree::Price.human_attribute_name(:country) %></th> | ||
<th><%= Spree::Price.human_attribute_name(:currency) %></th> | ||
<th><%= Spree::Price.human_attribute_name(:amount) %></th> | ||
<th class="actions"></th> | ||
</tr> | ||
</thead> | ||
<% master_prices.each do |price| %> | ||
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %>"> | ||
<td><%= price.display_country %></td> | ||
<td><%= price.currency %></td> | ||
<td><%= price.money.to_html %></td> | ||
<td class="actions"> | ||
<% if can?(:update, price) %> | ||
<%= link_to_edit(price, no_text: true) unless price.deleted? %> | ||
<% end %> | ||
<% if can?(:destroy, price) %> | ||
| ||
<%= link_to_delete(price, no_text: true) unless price.deleted? %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
</fieldset> | ||
</div> | ||
</div> | ||
<%= paginate master_prices, theme: "solidus_admin" %> | ||
|
||
<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>"> | ||
<% if variants %> | ||
<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> | ||
<% end %> | ||
<table class="index master_prices"> | ||
<colgroup> | ||
<col style="width: 30%"> | ||
<col style="width: 30%"> | ||
<col style="width: 20%"> | ||
<col style="width: 20%"> | ||
</colgroup> | ||
<thead data-hook="master_prices_header"> | ||
<tr> | ||
<th><%= Spree::Price.human_attribute_name(:country) %></th> | ||
<th><%= Spree::Price.human_attribute_name(:currency) %></th> | ||
<th><%= Spree::Price.human_attribute_name(:amount) %></th> | ||
<th class="actions"></th> | ||
</tr> | ||
</thead> | ||
<% master_prices.each do |price| %> | ||
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %>"> | ||
<td><%= price.display_country %></td> | ||
<td><%= price.currency %></td> | ||
<td><%= price.money.to_html %></td> | ||
<td class="actions"> | ||
<% if can?(:update, price) %> | ||
<%= link_to_edit(price, no_text: true) unless price.deleted? %> | ||
<% end %> | ||
<% if can?(:destroy, price) %> | ||
| ||
<%= link_to_delete(price, no_text: true) unless price.deleted? %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
</fieldset> | ||
|
||
<%= paginate master_prices, theme: "solidus_admin" %> |