osem-fcy/app/views/layouts/_navigation.html.haml

108 lines
4.3 KiB
Text
Raw Normal View History

2013-06-27 21:58:17 +02:00
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse", :id => "mobmenu" }
%span.icon-th
= link_to "OSEM", root_path, :class => 'brand', :title => "Open Source Event Manager"
- if @conference && !@conference.short_title.nil?
%span.brand
= @conference.short_title
.nav-collapse.collapse
2013-06-27 21:58:17 +02:00
/ The Admin Menu for Conferences /
- if user_signed_in?
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
- if controller.class.name.split("::").first=="Admin"
- if @conference && !@conference.short_title.nil?
%ul.nav
2013-06-27 23:05:07 +02:00
%li.nav-header.hidden-desktop
= @conference.short_title
- if current_page?(admin_conference_path(@conference.short_title))
%li.active
= link_to('#') do
2013-06-27 23:05:07 +02:00
%i.icon-wrench
Settings
- else
%li
= link_to(admin_conference_path(@conference.short_title)) do
2013-06-27 23:05:07 +02:00
%i.icon-wrench
Settings
- if current_page?(admin_conference_registrations_path(@conference.short_title))
%li.active
= link_to('#') do
2013-06-27 23:05:07 +02:00
%i.icon-user
Registrations
- else
%li
= link_to(admin_conference_registrations_path(@conference.short_title)) do
2013-06-27 23:05:07 +02:00
%i.icon-user
Registrations
- if current_page?(admin_conference_supporters_path(@conference.short_title))
%li.active
= link_to('#') do
2013-06-27 23:05:07 +02:00
%i.icon-star
Supporters
- else
%li
= link_to(admin_conference_supporters_path(@conference.short_title)) do
2013-06-27 23:05:07 +02:00
%i.icon-star
Supporters
- if current_page?(admin_conference_events_path(@conference.short_title))
%li.active
= link_to('#') do
2013-06-27 23:05:07 +02:00
%i.icon-comment
Events
- else
%li
= link_to(admin_conference_events_path(@conference.short_title)) do
2013-06-27 23:05:07 +02:00
%i.icon-comment
Events
2013-07-12 12:30:31 +03:00
- if current_page?(admin_conference_stats_path(@conference.short_title))
%li.active
= link_to('#') do
2013-07-12 14:28:48 +02:00
%i.icon-tasks
Statistics
2013-07-12 12:30:31 +03:00
- else
%li
= link_to(admin_conference_stats_path(@conference.short_title)) do
2013-07-12 14:28:48 +02:00
%i.icon-tasks
Statistics
%li
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
2013-07-12 14:28:48 +02:00
%i.icon-calendar
Schedule
2013-06-27 23:05:07 +02:00
%ul.nav.hidden-desktop
= render 'layouts/user_menu'
%ul.nav.pull-right.visible-desktop
%li.dropdown
2013-06-27 23:05:07 +02:00
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
= image_tag(current_user.person.gravatar_url(:size => "18"), :title => "Yo #{current_user.person.public_name}!")
2013-06-27 21:58:17 +02:00
%b.caret
%ul.dropdown-menu{:style => "padding: 15px;"}
2013-06-27 23:05:07 +02:00
= render 'layouts/user_menu'
2013-01-08 08:36:21 +01:00
- else
%ul.nav.pull-right
- if current_page?(new_registration_path('user'))
%li.active
= link_to(new_registration_path('user')) do
%i.icon-heart
Sign Up
- else
%li
= link_to(new_registration_path('user')) do
%i.icon-heart
Sign Up
%li.dropdown.visible-desktop
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
%i.icon-user.icon-2x
Sign In
%i.icon-angle-down
.dropdown-menu{:style => "padding: 17px;"}
= form_tag user_session_path do
= text_field_tag 'user[email]'
= password_field_tag 'user[password]'
%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-desktop
= link_to('Sign In', new_user_session_path)