Commit 5248c5a40a8b22fef439ebc28200713160278202
1 parent
6858050d
Exists in
master
and in
29 other branches
ActionItem518: more product icons on profile
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2228 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
14 changed files
with
4 additions
and
4 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -367,16 +367,16 @@ module ApplicationHelper | @@ -367,16 +367,16 @@ module ApplicationHelper | ||
367 | def profile_cat_icons( profile ) | 367 | def profile_cat_icons( profile ) |
368 | if profile.class == Enterprise | 368 | if profile.class == Enterprise |
369 | icons = | 369 | icons = |
370 | - profile.product_categories.map{ |c| c.size > 1 ? [c[0],c[1]] : nil }. | 370 | + profile.product_categories.map{ |c| c.size > 1 ? c[1] : nil }. |
371 | compact.uniq.map{ |c| | 371 | compact.uniq.map{ |c| |
372 | - cat_name = (c[0]+'_'+c[1]).gsub( /\s/, '_' ) | 372 | + cat_name = c.gsub( /[-\s,.;'"]/, '_' ) |
373 | cat_icon = "/images/icons-cat/#{cat_name}.png" | 373 | cat_icon = "/images/icons-cat/#{cat_name}.png" |
374 | if ! File.exists? RAILS_ROOT.to_s() + '/public/' + cat_icon | 374 | if ! File.exists? RAILS_ROOT.to_s() + '/public/' + cat_icon |
375 | cat_icon = '/images/icons-cat/undefined.png' | 375 | cat_icon = '/images/icons-cat/undefined.png' |
376 | end | 376 | end |
377 | content_tag 'span', | 377 | content_tag 'span', |
378 | - content_tag( 'span', c.join(' → ') ), | ||
379 | - :title => c.join(' → '), | 378 | + content_tag( 'span', c ), |
379 | + :title => c, | ||
380 | :class => 'product-cat-icon cat_icon_' + cat_name, | 380 | :class => 'product-cat-icon cat_icon_' + cat_name, |
381 | :style => "background-image:url(#{cat_icon})" | 381 | :style => "background-image:url(#{cat_icon})" |
382 | }.join "\n" | 382 | }.join "\n" |
509 Bytes
382 Bytes
461 Bytes
338 Bytes
public/images/icons-cat/Fitoterápicos_e_produtos_de_limpeza_e_higiene.png
0 → 100644
475 Bytes
338 Bytes
public/images/icons-cat/Produtos_Alimentação.png
382 Bytes
public/images/icons-cat/Produtos_Software.png
408 Bytes
public/images/icons-cat/Produtos_Software_Livre.png
408 Bytes
338 Bytes
475 Bytes
408 Bytes
408 Bytes