osem-fcy/app/views/layouts/_navigation.html.haml
Henne Vogelsang 3022e8b8e6 Minor features/fixes
* Fix admin sub menus
* Show email address in people#index
* Add User Area link in navbar
* Smaller textareas on proposal#new so you don't have to scroll
* Counting of registrations, users and people
* Use datatables for users and people
* Show event type on admin/events#show
2013-05-07 14:46:33 +02:00

45 lines
1.7 KiB
Text

- if @conference.nil? || @conference.short_title.nil?
= link_to "OSEM", root_path, :class => 'brand'
- else
= link_to @conference.title, root_path, :class => 'brand'
%ul.nav
- if !@conference.nil? && @conference.registration_open?
- if current_page?(register_conference_path(@conference.short_title))
%li.active
= link_to "Registration", "#"
- else
%li
= link_to "Registration", register_conference_path(@conference.short_title)
- if !@conference.nil?
- if current_page?(conference_proposal_index_path(@conference.short_title))
%li.active
= link_to "My Proposals", "#"
- else
%li
= link_to "My Proposals", conference_proposal_index_path(@conference.short_title)
%ul.nav.pull-right
- if user_signed_in?
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
%li
= link_to "Admin Area", admin_conference_index_path
%li
= link_to('Sign Out', destroy_user_session_path, :method=>'delete')
- else
%li
= link_to('Sign In', new_user_session_path)
- if user_signed_in?
%li
= link_to('Edit account', edit_user_registration_path)
%li.dropdown
- unless Conference.count == 1 && !has_role?(current_user, "admin")
= link_to "#", :class => "dropdown-toggle" do
Conferences
<b class="caret"></b>
%ul.dropdown-menu
- conferences = Conference.order("created_at DESC")
- unless conferences.nil?
- conferences.each do |c|
- unless @conference == c
%li= link_to c.short_title, admin_conference_path(c.short_title)
- if has_role?(current_user, "admin")
%li= link_to "New Conference", new_admin_conference_path