forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.erb
51 lines (48 loc) · 1.67 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<%= render 'spree/admin/shared/settings_checkout_tabs' %>
<% content_for :page_title do %>
<%= plural_resource_name(Spree::AdjustmentReason) %>
<% end %>
<% content_for :page_actions do %>
<ul class="actions inline-menu">
<li>
<%= button_link_to Spree.t(:new_adjustment_reason), new_object_url, { icon: 'plus', id: 'admin_new_named_type' } %>
</li>
</ul>
<% end %>
<% if @adjustment_reasons.any? %>
<table class="index" id='listing_adjustment_reasons'>
<colgroup>
<col style="width: 65%" />
<col style="width: 20%" />
<col style="width: 15%" />
</colgroup>
<thead>
<tr data-hook="adjustment_reasons_header">
<th><%= Spree::AdjustmentReason.human_attribute_name(:name) %></th>
<th><%= Spree::AdjustmentReason.human_attribute_name(:state) %></th>
<th class="actions"></th>
</tr>
</thead>
<tbody>
<% @adjustment_reasons.each do |adjustment_reason| %>
<tr id="<%= spree_dom_id adjustment_reason %>" data-hook="adjustment_reason_row" class="<%= cycle('odd', 'even')%>">
<td class="align-center">
<%= adjustment_reason.name %>
</td>
<td class="align-center">
<%= Spree.t(adjustment_reason.active? ? :active : :inactive) %>
</td>
<td class="actions">
<%= link_to_edit adjustment_reason, no_text: true %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div class="alpha twelve columns no-objects-found">
<%= render 'spree/admin/shared/no_objects_found',
resource: Spree::AdjustmentReason,
new_resource_url: new_object_url %>
</div>
<% end %>