Skip to content

Instantly share code, notes, and snippets.

@yorickpeterse
Created September 9, 2015 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickpeterse/ef24c429cfda2546df12 to your computer and use it in GitHub Desktop.
Save yorickpeterse/ef24c429cfda2546df12 to your computer and use it in GitHub Desktop.
section#header
header.container
div.row
div.col-xs-7
= link_to image_tag("logo_subnavi.png"), root_path
div.col-xs-5
div.text-right
a href="#" class="button-burger" id="nav-toggle" data-toggle="collapse" data-target="#menu"
= icon('reorder')
div.row
div.col-xs-7.col-md-4
nav.user
- if signed_in?
= "Signed in as #{link_to h(current_user.name), current_user} · ".html_safe
= link_to "Sign out", sign_out_path, method: :delete
- else
= link_to icon('github', 'Sign in with GitHub'), user_omniauth_authorize_path(:github)
div.col-xs-5.col-md-8
nav.top
ul class="collapse navbar-collapse" id="menu"
- if show_application_link?
li = application_disambiguation_link
- if current_user
- if current_user.current_student?
li = link_to 'Status Updates', [:students, :status_updates], class: params[:controller] == 'students/status_updates' ? 'active' : ''
- if current_user.supervisor?
li = link_to 'Dashboard', supervisor_dashboard_path
- if current_season.started?
li = link_to 'Activity', root_path, class: params[:controller] == 'activities' ? 'active' : ''
li = link_to 'Teams', teams_path, class: params[:controller] == 'teams' ? 'active' : ''
li = link_to 'Community', users_path, class: params[:controller] == 'users' ? 'active' : ''
- if current_season.applications_open?
li = link_to 'Conferences', conferences_path, class: params[:controller] == 'conferences' ? 'active' : ''
- if current_season.started?
li = link_to 'Jobs', job_offers_path, class: params[:controller] == 'job_offers' ? 'active' : ''
/- if signed_in? && current_user.roles.includes?('reviewer') # TODO bring this into a reviewer dashboard
/ li = link_to 'Applications', applications_path
li = link_to 'Home →'.html_safe, 'http://railsgirlssummerofcode.org'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment