Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #in application_helper.rb
- def subnav_link(path, name)
- content = "<li#{path == request.path ? ' class="sub-tabs-selected"' : nil}><a href='#{path}'><span>#{name}</span></a></li>"
- end
- #in _sub_menu.haml
- - if not body_classes['home']
- #sub-menu-wrap
- .sub-menu
- %h2.hide Sub Menu
- %ul.sub-tabs-nav
- - if body_classes['company']
- %li Now is the time - company
- - if body_classes['staff']
- %li Now is the time - staff
- - if body_classes['advisors']
- - if current_account && current_account.name == "Pacific Advisors"
- = subnav_link(advisors_thedock_path, 'The Dock')
- = subnav_link(advisors_path, 'Advisor Listing')
- - if current_user.is_advisor?
- = subnav_link(advisor_path, 'Your Performance')
- - if current_user.admin? || current_user.manager? || current_user.executive?
- = subnav_link(advisors_performance_path, 'YTD Commissions')
- - if body_classes['managers']
- %li Now is the time - managers
Add Comment
Please, Sign In to add comment