And make mobile navigation beautiful
This commit is contained in:
parent
8c743bdb3a
commit
ba21da5d72
2 changed files with 57 additions and 53 deletions
|
|
@ -11,97 +11,61 @@
|
||||||
- if controller.class.name.split("::").first=="Admin"
|
- if controller.class.name.split("::").first=="Admin"
|
||||||
- if @conference && !@conference.short_title.nil?
|
- if @conference && !@conference.short_title.nil?
|
||||||
%ul.nav
|
%ul.nav
|
||||||
|
%li.nav-header.hidden-desktop
|
||||||
|
= @conference.short_title
|
||||||
- if current_page?(admin_conference_path(@conference.short_title))
|
- if current_page?(admin_conference_path(@conference.short_title))
|
||||||
%li.active
|
%li.active
|
||||||
= link_to('#') do
|
= link_to('#') do
|
||||||
|
%i.icon-wrench
|
||||||
Settings
|
Settings
|
||||||
- else
|
- else
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_path(@conference.short_title)) do
|
= link_to(admin_conference_path(@conference.short_title)) do
|
||||||
|
%i.icon-wrench
|
||||||
Settings
|
Settings
|
||||||
- if current_page?(admin_conference_registrations_path(@conference.short_title))
|
- if current_page?(admin_conference_registrations_path(@conference.short_title))
|
||||||
%li.active
|
%li.active
|
||||||
= link_to('#') do
|
= link_to('#') do
|
||||||
|
%i.icon-user
|
||||||
Registrations
|
Registrations
|
||||||
- else
|
- else
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
||||||
|
%i.icon-user
|
||||||
Registrations
|
Registrations
|
||||||
- if current_page?(admin_conference_supporters_path(@conference.short_title))
|
- if current_page?(admin_conference_supporters_path(@conference.short_title))
|
||||||
%li.active
|
%li.active
|
||||||
= link_to('#') do
|
= link_to('#') do
|
||||||
|
%i.icon-star
|
||||||
Supporters
|
Supporters
|
||||||
- else
|
- else
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_supporters_path(@conference.short_title)) do
|
= link_to(admin_conference_supporters_path(@conference.short_title)) do
|
||||||
|
%i.icon-star
|
||||||
Supporters
|
Supporters
|
||||||
- if current_page?(admin_conference_events_path(@conference.short_title))
|
- if current_page?(admin_conference_events_path(@conference.short_title))
|
||||||
%li.active
|
%li.active
|
||||||
= link_to('#') do
|
= link_to('#') do
|
||||||
|
%i.icon-comment
|
||||||
Events
|
Events
|
||||||
- else
|
- else
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_events_path(@conference.short_title)) do
|
= link_to(admin_conference_events_path(@conference.short_title)) do
|
||||||
|
%i.icon-comment
|
||||||
Events
|
Events
|
||||||
- if current_page?(admin_conference_schedule_path(@conference.short_title))
|
|
||||||
%li.active
|
|
||||||
= link_to('#') do
|
|
||||||
Schedule
|
|
||||||
-else
|
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
||||||
|
%i.icon-tasks
|
||||||
Schedule
|
Schedule
|
||||||
%ul.nav.pull-right
|
%ul.nav.hidden-desktop
|
||||||
|
= render 'layouts/user_menu'
|
||||||
|
%ul.nav.pull-right.visible-desktop
|
||||||
%li.dropdown
|
%li.dropdown
|
||||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", :class=>"visible-desktop"}
|
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
||||||
= image_tag(current_user.person.gravatar_url(:size => "22"), :title => "Yo #{current_user.person.public_name}!")
|
= image_tag(current_user.person.gravatar_url(:size => "18"), :title => "Yo #{current_user.person.public_name}!")
|
||||||
%b.caret
|
|
||||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", :class=>"hidden-desktop"}
|
|
||||||
= current_user.person.public_name if current_user.person
|
|
||||||
%b.caret
|
%b.caret
|
||||||
%ul.dropdown-menu{:style => "padding: 15px;"}
|
%ul.dropdown-menu{:style => "padding: 15px;"}
|
||||||
%li.visible-desktop
|
= render 'layouts/user_menu'
|
||||||
= link_to("#") do
|
|
||||||
%i.icon-home
|
|
||||||
= current_user.person.public_name if current_user.person
|
|
||||||
%li
|
|
||||||
= link_to(edit_user_registration_path) do
|
|
||||||
%i.icon-wrench
|
|
||||||
Edit Account
|
|
||||||
-if @conference and @conference.id
|
|
||||||
%li
|
|
||||||
= link_to(conference_proposal_index_path(@conference.short_title)) do
|
|
||||||
%i.icon-comment
|
|
||||||
My Submissions
|
|
||||||
%li
|
|
||||||
= link_to(destroy_user_session_path, :method=>'delete') do
|
|
||||||
%i.icon-minus
|
|
||||||
Sign out
|
|
||||||
-if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
|
|
||||||
%li.divider
|
|
||||||
%h6
|
|
||||||
Manage Conferences
|
|
||||||
- @conferences.each do |conference|
|
|
||||||
%li
|
|
||||||
= link_to(admin_conference_path(conference.short_title)) do
|
|
||||||
%i.icon-cog
|
|
||||||
Manage
|
|
||||||
= conference.short_title
|
|
||||||
%li
|
|
||||||
= link_to(new_admin_conference_path) do
|
|
||||||
%i.icon-plus
|
|
||||||
New Conference
|
|
||||||
%li.divider
|
|
||||||
%h6
|
|
||||||
Manage OSEM
|
|
||||||
%li
|
|
||||||
= link_to(admin_users_path) do
|
|
||||||
%i.icon-user
|
|
||||||
Users
|
|
||||||
%li
|
|
||||||
= link_to(admin_people_path) do
|
|
||||||
%i.icon-star-empty
|
|
||||||
People
|
|
||||||
- else
|
- else
|
||||||
%ul.nav.pull-right
|
%ul.nav.pull-right
|
||||||
%li.dropdown.visible-desktop
|
%li.dropdown.visible-desktop
|
||||||
|
|
|
||||||
40
app/views/layouts/_user_menu.html.haml
Normal file
40
app/views/layouts/_user_menu.html.haml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
%li.nav-header
|
||||||
|
= current_user.person.public_name if current_user.person
|
||||||
|
%li
|
||||||
|
= link_to(edit_user_registration_path) do
|
||||||
|
%i.icon-wrench
|
||||||
|
Edit Account
|
||||||
|
-if @conference and @conference.id
|
||||||
|
%li
|
||||||
|
= link_to(conference_proposal_index_path(@conference.short_title)) do
|
||||||
|
%i.icon-comment
|
||||||
|
My Submissions
|
||||||
|
%li
|
||||||
|
= link_to(destroy_user_session_path, :method=>'delete') do
|
||||||
|
%i.icon-minus
|
||||||
|
Sign out
|
||||||
|
-if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
|
||||||
|
%li.divider
|
||||||
|
%li.nav-header
|
||||||
|
Conferences
|
||||||
|
- @conferences.each do |conference|
|
||||||
|
%li
|
||||||
|
= link_to(admin_conference_path(conference.short_title)) do
|
||||||
|
%i.icon-cog
|
||||||
|
Manage
|
||||||
|
= conference.short_title
|
||||||
|
%li
|
||||||
|
= link_to(new_admin_conference_path) do
|
||||||
|
%i.icon-plus
|
||||||
|
New Conference
|
||||||
|
%li.divider
|
||||||
|
%li.nav-header
|
||||||
|
People
|
||||||
|
%li
|
||||||
|
= link_to(admin_users_path) do
|
||||||
|
%i.icon-user
|
||||||
|
Users
|
||||||
|
%li
|
||||||
|
= link_to(admin_people_path) do
|
||||||
|
%i.icon-star-empty
|
||||||
|
People
|
||||||
Loading…
Add table
Add a link
Reference in a new issue