osem-fcy/app/views/layouts/_navigation.html.haml
James Mason b023459600 Use a single entry for navigation branding:
Allow a view to override the brand (esp. for conference splash pages),
Use the app name link for the admin control panel,
use the conference short title for end user content within a conference,
fall back to the app name link.

Visually, there are two substantial changes:
(1) the conference title (or short title) serves as the brand when viewing
conference content;
(2) the short title isn't shown redundantly on the navbar and the top of the
sidebar when editing a conf.
2014-05-28 13:52:15 -07:00

52 lines
2.2 KiB
Text

.navbar.navbar-default.navbar-fixed-top{:role=>"navigation"}
.container
.navbar-header
%button{"data-target"=>".navbar-collapse", "data-toggle"=>"collapse", :class=>"navbar-toggle", :type=>"button"}
%span.sr-only
Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
= brand
.collapse.navbar-collapse
-if user_signed_in?
%ul.nav.navbar-nav.navbar-right
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "current-user-detail"}
- if not current_user.person.public_name.empty?
#{current_user.person.public_name}
-else
#{current_user.email}
= image_tag(current_user.person.gravatar_url(size: '18'), title: "Yo #{current_user.person.public_name}!", :alt => '')
%b.caret
%ul.dropdown-menu
= render 'layouts/user_menu'
- else
%ul.nav.navbar-nav.navbar-right
- if current_page?(new_registration_path('user'))
%li.active
= link_to(new_registration_path('user')) do
%span.glyphicon.glyphicon-heart
Sign Up
- else
%li
= link_to(new_registration_path('user')) do
%span.glyphicon.glyphicon-heart
Sign Up
%li.dropdown.visible-desktop
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
%span.glyphicon.glyphicon-user
Sign In
%span.caret
.dropdown-menu{:style => "padding: 17px;"}
= form_tag user_session_path do
= text_field_tag 'user[email]', nil, id: 'user_email_dd'
= password_field_tag 'user[password]', nil, id: 'user_password_dd'
%label.checkbox
= check_box_tag 'user[remember_me]'
Remember me
%button.btn.btn-block Sign in
%br
= link_to "Forgot your password?", new_password_path('user')
%li.hidden-lg
= link_to('Sign In', new_user_session_path)