diff --git a/app/views/manage_products/index.rhtml b/app/views/manage_products/index.rhtml index e82333e..bd4610f 100644 --- a/app/views/manage_products/index.rhtml +++ b/app/views/manage_products/index.rhtml @@ -20,11 +20,11 @@

<%= link_to _('New product or service'), :action => 'new' %>

-

<%=_('Listing consumed products') %>

+

<%=_('Listing raw materials') %>

- + <% @consumptions.each do |consumption| %> @@ -36,12 +36,12 @@ <% end %>
<%= _('Consumed product') %><%= _('Raw material') %> <%= _('Actions') %>
<%= button :edit, _('Edit'), :action => 'edit_consumption', :id => consumption %> - <%= button :delete, _('Remove'), { :action => 'destroy_consumption', :id => consumption }, :confirm => _('Are you sure, you want to remove this product from your list') %> + <%= button :delete, _('Remove'), { :action => 'destroy_consumption', :id => consumption }, :confirm => _('Are you sure, you want to remove this raw material from your list') %>
-

<%= link_to _('Add cunsumed product'), :action => 'new_consumption' %>

+

<%= link_to _('Add raw material'), :action => 'new_consumption' %>

<%= link_to_myprofile(_('Back'), {}, @profile.identifier) %> diff --git a/app/views/manage_products/new_consumption.rhtml b/app/views/manage_products/new_consumption.rhtml index 38bd6ad..6609445 100644 --- a/app/views/manage_products/new_consumption.rhtml +++ b/app/views/manage_products/new_consumption.rhtml @@ -1,3 +1,3 @@ -

<%= _('Add consumed product') %>

+

<%= _('Add raw material') %>

<%= render :partial => 'form_consumption', :locals => {:action => 'new_consumption'} %> diff --git a/test/functional/manage_products_controller_test.rb b/test/functional/manage_products_controller_test.rb index fe2931f..12abc31 100644 --- a/test/functional/manage_products_controller_test.rb +++ b/test/functional/manage_products_controller_test.rb @@ -200,7 +200,7 @@ class ManageProductsControllerTest < Test::Unit::TestCase should 'display new consumption form' do get :new_consumption, :profile => @enterprise.identifier - assert_tag :tag => 'h2', :content => 'Add consumed product' + assert_tag :tag => 'h2', :content => 'Add raw material' end should 'create consumption product' do @@ -246,4 +246,11 @@ class ManageProductsControllerTest < Test::Unit::TestCase assert_equal 'new extra info', @enterprise.consumptions.find(product.reload.id).aditional_specifications end + should 'not show product_category field on edit consumption form' do + product_category = ProductCategory.create!(:name => 'Food', :environment => Environment.default) + product = @enterprise.consumptions.create!(:product_category_id => product_category.id, :aditional_specifications => 'extra info') + get :edit_consumption, :profile => @enterprise.identifier, :id => product + assert_no_tag :tag => 'select', :attributes => { :name => 'consumption[product_category_id]' } + end + end -- libgit2 0.21.2