From 78c05ad67b0e55b065a27b070ca5218d1b03417a Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Sat, 21 Jun 2008 04:16:01 +0000 Subject: [PATCH] ActionItem440: lista embelezada de produtos do empreendimento --- app/helpers/application_helper.rb | 11 +++++++++++ app/views/catalog/index.rhtml | 34 ++++++++++++++++++++++------------ app/views/catalog/show.rhtml | 38 +++++++++++++++----------------------- app/views/content_viewer/_comment.rhtml | 11 +---------- public/designs/themes/ecosol/stylesheets/controller_catalog.css | 19 +++++++++++++++++++ public/designs/themes/zen3/stylesheets/controller_catalog.css | 19 +++++++++++++++++++ public/images/icons-app/product-default-pic-portrait.png | Bin 0 -> 5278 bytes public/images/icons-app/product-default-pic-thumb.png | Bin 0 -> 9604 bytes public/stylesheets/controller_catalog.css | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 168 insertions(+), 45 deletions(-) create mode 100644 public/designs/themes/ecosol/stylesheets/controller_catalog.css create mode 100644 public/designs/themes/zen3/stylesheets/controller_catalog.css create mode 100644 public/images/icons-app/product-default-pic-portrait.png create mode 100644 public/images/icons-app/product-default-pic-thumb.png create mode 100644 public/stylesheets/controller_catalog.css diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4268d24..9ef764e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -621,4 +621,15 @@ module ApplicationHelper end end + def txt2html(txt) + txt. + gsub( /\n\s*\n/, '

' ). + gsub( /\n/, '
' ). + gsub( /(^|\s)(www\.[^\s])/, '\1http://\2' ). + gsub( /(https?:\/\/([^\s]+))/, + '\2' ) + end + end diff --git a/app/views/catalog/index.rhtml b/app/views/catalog/index.rhtml index 0a795a3..2311a0a 100644 --- a/app/views/catalog/index.rhtml +++ b/app/views/catalog/index.rhtml @@ -1,15 +1,25 @@

<%= _('%s:Products/Services') % @profile.name %>

- - - - - -<% @products.each do |p| %> - - - - +
<%= _('Product/Service') %><%= _('Price') %>
<%= image_tag p.image.public_filename if p.image %> <%= link_to p.name, :action => 'show', :id => p %> <%= p.price || content_tag('em', _('not informed')) %> -
+