noosfero | Refactor usermenu logged in (!1269)

Rodrigo Souto gitlab at mg.gitlab.com
Thu Jul 6 15:48:06 BRT 2017


Rodrigo Souto started a new discussion on app/helpers/application_helper.rb:

> -    welcome_link = link_to(user_identifier.html_safe, user.public_profile_url, :id => "homepage-link", :title => _('Go to your homepage'))
> -    welcome_span = _("<span class='welcome'>Welcome,</span> %s") % welcome_link.html_safe
> -
> -    ctrl_panel_icon = '<i class="icon-menu-ctrl-panel"></i>'
> -    ctrl_panel_section = '<strong>' + ctrl_panel_icon + _('Control panel') + '</strong>'
> -    ctrl_panel_link = link_to(ctrl_panel_section.html_safe, user.admin_url, :class => 'ctrl-panel', :title => _("Configure your personal account and content"))
> -
> -    logout_icon = '<i class="icon-menu-logout"></i><strong>' + _('Logout') + '</strong>'
> -    logout_link = link_to(logout_icon.html_safe, { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system"))
> -
> -    plugins_items = @plugins.dispatch(:user_menu_items, user).collect { |content| instance_eval(&content) }
> +    join_result = safe_join(items(pending_tasks_count), "")
> +    join_result
> +  end
>  
> +  def items (pending_tasks_count)

Items is too generic of a method name for a generic helper such as the ApplicationHelper. How about `user_menu_items`?

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1269#note_34371988
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170706/ab65d46e/attachment-0001.html>


More information about the Noosfero-dev mailing list