Method: Lines::ApplicationHelper#render_navbar
- Defined in:
- app/helpers/lines/application_helper.rb
#render_navbar(&block) ⇒ Object
Renders the navigation bar for logged in users
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'app/helpers/lines/application_helper.rb', line 67 def (&block) action_link = get_action_link if !action_link action_link = CONFIG[:title_short] end html = content_tag(:div, id: 'navbar') do content_tag(:div, class: 'navbar-inner') do if current_lines_user content_tag(:span, class: 'buttons', &block) + "<div class='btn-menu'><dic class='stripes'></div></div>".html_safe + "<div class='submenu'> <div class='submenu-inner'> <ul> <li>#{link_to("Dashboard", admin_articles_path)}</li> <li>#{link_to(t('activerecord.models.lines/author', count: 2).html_safe, )}</li> </ul> <ul> <li class='small'>#{t('lines.logged_in_as').html_safe} #{current_lines_user.email}</li> <li>#{link_to(t('lines.buttons.logout').html_safe, logout_path)}</li> </ul> <ul> <li>#{link_to(t('lines.buttons.formating_help').html_safe, "#", class: "btn-cheatsheet")}</li> <li>#{link_to(t('lines.buttons.about').html_safe, "http://lines.opoloo.com")}</li> </ul> </div> </div>".html_safe else content_tag(:span, link_to('', lines.root_path), class: 'backlink') + content_tag(:span, action_link, class: 'actionlink') end end end html end |