Commit bf78665cae989ab7034f1df09116921b50f181b0
1 parent
f9bc30fe
Exists in
staging
and in
42 other branches
ActionItem155: making it easier to modify the assets menu (and adding i18n)
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1308 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
15 additions
and
9 deletions
Show diff stats
app/helpers/assets_helper.rb
1 | module AssetsHelper | 1 | module AssetsHelper |
2 | 2 | ||
3 | def generate_assets_menu() | 3 | def generate_assets_menu() |
4 | - ' | ||
5 | - <li><a href="#"><span class="icon-menu-blog"></span> Blogs</a></li> | ||
6 | - <li><a href="#"><span class="icon-menu-album"></span> Albuns</a></li> | ||
7 | - <li><a href="#"><span class="icon-menu-product"></span> Produtos</a></li> | ||
8 | - <li><a href="#"><span class="icon-menu-enterprise"></span> Empreendimentos</a></li> | ||
9 | - <li><a href="#"><span class="icon-menu-community"></span> Comunidades</a></li> | ||
10 | - <li><a href="#"><span class="icon-menu-"></span> bli 6</a></li> | ||
11 | - <li><a href="#"><span class="icon-menu-"></span> bli 7</a></li> | ||
12 | - ' | 4 | + [ |
5 | + | ||
6 | + [ "#", "icon-menu-blog", _('Blogs') ], | ||
7 | + [ "#", "icon-menu-album", _('Albuns') ], | ||
8 | + [ "#", "icon-menu-product", _('Products') ], | ||
9 | + [ "#", "icon-menu-enterprise", _('Enterprises') ], | ||
10 | + [ "#", "icon-menu-community", _('Communities') ], | ||
11 | + | ||
12 | + # FIXME remove these | ||
13 | + [ "#", "icon-menu-", _('bli 1') ], | ||
14 | + [ "#", "icon-menu-", _('bli 2') ], | ||
15 | + | ||
16 | + ].map do |target,css_class,name| | ||
17 | + content_tag('li', link_to(content_tag('span', '', :class => css_class) + name, target)) | ||
18 | + end.join("\n") | ||
13 | end | 19 | end |
14 | 20 | ||
15 | end | 21 | end |