app/views/layouts/profile.html.haml
%html
%head
%title Debate of Berkeley Profile
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
%link{ rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Playfair+Display:400,400italic,700", type: "text/css"}
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
%body
/ %header.main_header
/ #buttons
/ - if user_signed_in?
/ = link_to "New Post", new_post_path
/ - else
/ = link_to "Sign Up", new_user_registration_path
/ = link_to "Sign In", new_user_session_path
/ = link_to "Home Page", root_path
%nav.navbar.navbar-fixed-top{:role => "navigation"}
.container-fluid
.navbar-header.page-scroll
%button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
%span.sr-only Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand.page-scroll{:href => root_path} Debate
#bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav
- if user_signed_in?
%li
%a{:href => mockdebate_path} Mock Debate
%li
%a{:href => "/forum"} Forum
- if user_signed_in? and current_user.is_admin?
%li
%a.page-scroll{:href => rails_admin_path} Admin Dashboard
%li
%a.page-scroll{:href => invitation_path} Invite Users
%li
%a.page-scroll{:href => home_edit_path} Edit Home Page
#bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav.navbar-right
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
Welcome,
- if not current_user.firstname
= current_user.email
- else
= current_user.firstname
%span.caret
%ul.dropdown-menu{:role => "menu"}
- if not user_signed_in?
%li
%a{:href => new_user_session_path} Sign In
%li
%a{:href => new_user_registration_path} Sign Up
- else
%li
%a{:href => mockdebate_path} Mock Debate
%li
%a{:href => "/forum"} Forum
%li
%a{:href => profile_path} Edit Profile
- if current_user.is_admin?
%li
%a{:href => rails_admin_path} Admin Dashboard
%li
%a{:href => invitation_path} Invite Users
%li
%a{:href => home_edit_path} Edit Home Page
%li
%a{:href => destroy_user_session_path} Sign out
%header.main_header
#logo
.wrapper
%p.notice= notice
%p.alert= alert
.wrapper
= yield
%footer.container{:role => "closing"}
%p <strong>The Debate Society of Berkeley</strong> © 2016
%p{:class => "description"} We are a student group acting independently of the University of California. We take full responsibility for our organization and this web site.
%img#ocf-logo{:src => "https://www.ocf.berkeley.edu/images/hosted-logos/ocfbadge_mini8.png", :alt =>"Hosted by the OCF", :href => "https://www.ocf.berkeley.edu"}
</a>