diff --git a/app/views/consumed_products/index.rhtml b/app/views/consumed_products/index.rhtml index 0ccbd41..b3bbe6e 100644 --- a/app/views/consumed_products/index.rhtml +++ b/app/views/consumed_products/index.rhtml @@ -3,6 +3,9 @@

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

<% @consumptions.each do |consumption| %> -

<%= link_to_category(consumption.product_category) %> - <%= link_to _('destroy'), :action => 'destroy', :id => consumption %>
+

<%= link_to_category(consumption.product_category) %>

+ <%= link_to _('destroy'), :action => 'destroy', :id => consumption %>
+

<%= consumption.aditional_specifications %>

<% end %> + +<%= link_to_myprofile(_('Back'), {}, @profile.identifier)%> diff --git a/app/views/consumed_products/new.rhtml b/app/views/consumed_products/new.rhtml index e79a4b6..eafa164 100644 --- a/app/views/consumed_products/new.rhtml +++ b/app/views/consumed_products/new.rhtml @@ -3,7 +3,8 @@ <%= error_messages_for :consumption %> <% form_for :consumption, @consumption do |f| %> -

<%= _('Product: ') %> <%= f.select "product_category_id", ProductCategory.find(:all).map{|pc| [pc.name, pc.id]} %>

+

<%= _('Product: ') %> <%= f.select "product_category_id", ProductCategory.find(:all).map{|pc| [pc.name, pc.id]} %>

+

<%= _('Aditional specifications: ') %>
<%= f.text_area "aditional_specifications" %>

<%= submit_tag _('Add product') %> <%= link_to _('Cancel'), :action => 'index' %> <% end %> diff --git a/app/views/manage_products/index.rhtml b/app/views/manage_products/index.rhtml index d5c4c98..81cb1a2 100644 --- a/app/views/manage_products/index.rhtml +++ b/app/views/manage_products/index.rhtml @@ -8,3 +8,5 @@ <%= link_to _('edit'), :action => 'edit', :id => product %> <%= link_to _('destroy'), :action => 'destroy', :id => product %>

<% end %> + +<%= link_to_myprofile(_('Back'), {}, @profile.identifier) %> diff --git a/app/views/profile_editor/change_image.rhtml b/app/views/profile_editor/change_image.rhtml index 75e10cb..71a63a9 100644 --- a/app/views/profile_editor/change_image.rhtml +++ b/app/views/profile_editor/change_image.rhtml @@ -1,4 +1,5 @@ <% form_for :image, @image, :html => { :multipart => true }, :url => { :action => 'change_image'} do |f| %> <%= display_form_field(_('Image'), f.file_field( :uploaded_data ) ) %> <%= display_submit_tag(_('Upload')) %> + <%= link_to _('Cancel'), :action => 'index' %> <% end %> diff --git a/app/views/search/_product.rhtml b/app/views/search/_product.rhtml index 9706b0d..ba40637 100644 --- a/app/views/search/_product.rhtml +++ b/app/views/search/_product.rhtml @@ -7,5 +7,8 @@ <%= link_to( hit.name, :profile => hit.enterprise.identifier, :controller => 'catalog', :action => 'show', :id => hit) %> + <%= _('Price: %d') % hit.price %>
+ <%= _('Producer: %s') % link_to_homepage( hit.enterprise.identifier) if hit.enterprise %>
+ <%= _('Category: %s') % link_to_category(hit.product_category) %> diff --git a/db/migrate/018_create_consumptions.rb b/db/migrate/018_create_consumptions.rb index 2507d05..bb98dc9 100644 --- a/db/migrate/018_create_consumptions.rb +++ b/db/migrate/018_create_consumptions.rb @@ -1,8 +1,10 @@ class CreateConsumptions < ActiveRecord::Migration def self.up create_table :consumptions do |t| - t.column :product_category_id, :integer - t.column :profile_id, :integer + t.column :product_category_id, :integer + t.column :profile_id, :integer + + t.column :aditional_specifications, :text end end -- libgit2 0.21.2