fatfreecrm/fat_free_crm

View on GitHub
app/views/layouts/_header.html.haml

Summary

Maintainability
Test Coverage
#header
  #welcome
    - if current_user
      #{t :welcome},
      -# This span gets updated on the fly if user changes her name.
      %span#welcome_username= current_user.name
      %span> !  

      = link_to(t(:quick_find), "#", id: "jumper") << " |"
      = link_to(t(:profile), profile_path) << " |"
      - if current_user.admin?
        = link_to(t(:admin), admin_path) << " |"
      = link_to(t(:logout), destroy_user_session_path, method: :delete)
      = render "/layouts/jumpbox"
    - else
      = link_to(t(:login), new_user_session_path) << " |"
      = link_to(t(:sign_up), new_user_registration_path) << " |" if User.can_signup?
      = link_to(t(:about), "#", title: t(:about_ffc), onclick: "$('#about').dialog({ title: this.title, modal: true }); return false;")
  %h3
    = link_to("Fat Free CRM", root_path)