Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
add overrides to taxonomies views
Browse files Browse the repository at this point in the history
fixes #134
  • Loading branch information
Gonzalo Moreno authored and Jeff Dutil committed Jun 24, 2015
1 parent 3f12d88 commit eb3086d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
6 changes: 6 additions & 0 deletions app/overrides/decorate_admin_taxonomies_form.rb
@@ -0,0 +1,6 @@
Deface::Override.new(
:virtual_path => "spree/admin/taxonomies/_form",
:name => "multi_domain_admin_taxonomies_form_store_id",
:insert_bottom => "[data-hook='admin_inside_taxonomy_form']",
:partial => "spree/admin/taxonomies/store",
:disabled => false)
14 changes: 14 additions & 0 deletions app/overrides/decorate_admin_taxonomies_list.rb
@@ -0,0 +1,14 @@
Deface::Override.new(
:virtual_path => "spree/admin/taxonomies/_list",
:name => "multi_domain_admin_taxonomies_list_head",
:insert_before => "th.actions",
:text => "<th><%= Spree.t(:store) %></th>",
:disabled => false)


Deface::Override.new(
:virtual_path => "spree/admin/taxonomies/_list",
:name => "multi_domain_admin_taxonomies_list_body",
:insert_before => "td.actions",
:text => "<td><%= taxonomy.store.try(:name) %></td>",
:disabled => false)
12 changes: 0 additions & 12 deletions app/views/spree/admin/taxonomies/_form.html.erb

This file was deleted.

4 changes: 4 additions & 0 deletions app/views/spree/admin/taxonomies/_store.html.erb
@@ -0,0 +1,4 @@
<%= f.field_container :store_id, class: ['form-group'] do %>
<%= f.label :name, Spree.t(:store) %> <span class="required">*</span>
<%= f.collection_select(:store_id, Spree::Store.all, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
<% end %>

0 comments on commit eb3086d

Please sign in to comment.