mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Bring spree/admin/shipping categories from spree_backend so we can de-deface it
This commit is contained in:
6
app/views/spree/admin/shipping_categories/_form.html.erb
Normal file
6
app/views/spree/admin/shipping_categories/_form.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<div data-hook="admin_shipping_category_form_fields">
|
||||
<div data-hook="name" class="field align-center">
|
||||
<%= label_tag Spree.t(:name) %><br>
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
</div>
|
||||
20
app/views/spree/admin/shipping_categories/edit.html.erb
Normal file
20
app/views/spree/admin/shipping_categories/edit.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<%= render :partial => 'spree/admin/shared/configuration_menu' %>
|
||||
|
||||
<% content_for :page_title do %>
|
||||
<%= Spree.t(:editing_shipping_category) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :page_actions do %>
|
||||
<li>
|
||||
<%= button_link_to Spree.t(:back_to_shipping_categories), spree.admin_shipping_categories_path, :icon => 'icon-arrow-left' %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @shipping_category } %>
|
||||
|
||||
<%= form_for [:admin, @shipping_category] do |f| %>
|
||||
<fieldset class="no-border-top">
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= render :partial => 'spree/admin/shared/edit_resource_links' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
35
app/views/spree/admin/shipping_categories/index.html.erb
Normal file
35
app/views/spree/admin/shipping_categories/index.html.erb
Normal file
@@ -0,0 +1,35 @@
|
||||
<%= render :partial => 'spree/admin/shared/configuration_menu' %>
|
||||
|
||||
<% content_for :page_title do %>
|
||||
<%= Spree.t(:shipping_categories) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :page_actions do %>
|
||||
<li>
|
||||
<%= button_link_to Spree.t(:new_shipping_category), new_object_url, :icon => 'icon-plus' %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<table class="index">
|
||||
<colgroup>
|
||||
<col style="width: 85%">
|
||||
<col style="width: 15%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr data-hook="categories_header">
|
||||
<th><%= Spree.t(:name) %></th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @shipping_categories.each do |shipping_category|%>
|
||||
<tr id="<%= spree_dom_id shipping_category %>" data-hook="category_row" class="<%= cycle('odd', 'even')%>">
|
||||
<td style="width:350px;"><%= shipping_category.name %></td>
|
||||
<td class="actions">
|
||||
<%= link_to_edit shipping_category, :no_text => true %>
|
||||
<%= link_to_delete shipping_category, :no_text => true %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
20
app/views/spree/admin/shipping_categories/new.html.erb
Normal file
20
app/views/spree/admin/shipping_categories/new.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<%= render :partial => 'spree/admin/shared/configuration_menu' %>
|
||||
|
||||
<% content_for :page_title do %>
|
||||
<%= Spree.t(:new_shipping_category) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :page_actions do %>
|
||||
<li>
|
||||
<%= button_link_to Spree.t(:back_to_shipping_categories_list), spree.admin_shipping_categories_path, :icon => 'icon-arrow-left' %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @shipping_category } %>
|
||||
|
||||
<%= form_for [:admin, @shipping_category] do |f| %>
|
||||
<fieldset class="no-border-top">
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user