<%= stylesheet_link_tag 'spectrum.css' %> <%= javascript_include_tag "spectrum.js" %> <%= javascript_include_tag "colorpicker-noosfero.js" %> <%= error_messages_for 'category' %> <%= labelled_form_for 'category', :html => { :multipart => true} do |f| %> <%= required_fields_message %> <% if @category.new_record? %> <% if @category.parent %> <%= hidden_field_tag('parent_id', @category.parent.id) %> <%= hidden_field_tag('parent_type', @category.parent.class.name) %> <% else %> <%= select_category_type :type %> <% end %> <% end %> <%= required f.text_field('name') %> <%= labelled_check_box(_('Display in the menu'), 'category[display_in_menu]', '1', @category.display_in_menu) %> <%= labelled_colorpicker_field(_('Pick a color'), :category, 'display_color' ) unless environment.enabled?('disable_categories_menu')%> <%= f.fields_for :image_builder, @category.image do |i| %> <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %> <% end %> <% button_bar do %> <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> <% end%> <% end %>