Created
March 16, 2011 23:50
-
-
Save esneko/873568 to your computer and use it in GitHub Desktop.
Taxonomy Globalize Accessors
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
<% if(Taxonomy.easy_accessors.blank?) %> | |
<%= f.field_container :name do %> | |
<%= f.label :name, t("name") %> <span class="required">*</span><br /> | |
<%= error_message_on :taxonomy, :name, :class => 'fullwidth title' %> | |
<%= text_field :taxonomy, :name %> | |
<% end %> | |
<% else %> | |
<%- Taxonomy.easy_accessors.each do |locale| %> | |
<% fieldsym = "name_#{locale}".to_sym %> | |
<%= f.field_container fieldsym do %> | |
<%= f.label fieldsym, t(fieldsym.to_s) %> <span class="required">*</span><br /> | |
<%= f.error_message_on fieldsym, :class => 'fullwidth title' %> | |
<%= f.text_field fieldsym %> | |
<% end %> | |
<% end %> | |
<% end %> |
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
class GlobalizeSpreeHooks < Spree::ThemeSupport::HookListener | |
# custom hooks go here | |
replace :admin_product_form_left, 'admin/shared/product_globalize_form_left' | |
replace :admin_inside_taxon_form, 'admin/shared/taxon_globalize_form_inside' | |
replace :admin_inside_taxonomy_form, 'admin/shared/taxonomy_globalize_form_inside' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment