akz92/estudeantes

View on GitHub
app/views/periods/_initial_navbar.html.haml

Summary

Maintainability
Test Coverage
%nav.navbar.navbar-default.navbar-fixed-top{:role => "navigation"}
  / Brand and toggle get grouped for better mobile display
  .container
    .navbar-header
      %button.navbar-toggle{"data-target" => "#navbarCollapse", "data-toggle" => "collapse", :type => "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      %a.navbar-brand{:href => "#{root_url}"} EstudeAntes
    / Collection of nav links and other content for toggling
    #navbarCollapse.collapse.navbar-collapse
      %ul.nav.navbar-nav.pull-right
        %li
          - if user_signed_in?
            #user_nav
              %li.dropdown
                %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
                  - if current_user && current_user.name
                    #{current_user.name}
                  - else
                    #{current_user.email}
                  %b.caret
                %ul.dropdown-menu
                  %li= link_to "Editar Conta", edit_user_registration_path
                  %li= link_to "Sair", destroy_user_session_path, :method => :delete
-#.navbar.navbar-default.navbar-fixed-top
  .container
    .navbar-header
      %a.navbar-brand{href: "#{root_url}"}
        EstudeAntes
    .container.nav-collapse
      %ul.nav.navbar-nav.pull-right
        %li
          #user_nav
            - if user_signed_in?
              /Signed in as #{current_user.email}. Not you?
              %li.dropdown
                %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
                  - if current_user.name
                    #{current_user.name}
                  - else
                    #{current_user.email}
                  %b.caret
                %ul.dropdown-menu
                  %li= link_to "Editar Conta", edit_user_registration_path
                  %li= link_to "Sair", destroy_user_session_path, :method => :delete