mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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 @conference && !@conference.short_title.nil?
|
||||
%ul.nav
|
||||
%li.nav-header.hidden-desktop
|
||||
= @conference.short_title
|
||||
- if current_page?(admin_conference_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to('#') do
|
||||
%i.icon-wrench
|
||||
Settings
|
||||
- else
|
||||
%li
|
||||
= link_to(admin_conference_path(@conference.short_title)) do
|
||||
%i.icon-wrench
|
||||
Settings
|
||||
- if current_page?(admin_conference_registrations_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to('#') do
|
||||
%i.icon-user
|
||||
Registrations
|
||||
- else
|
||||
%li
|
||||
= link_to(admin_conference_registrations_path(@conference.short_title)) do
|
||||
%i.icon-user
|
||||
Registrations
|
||||
- if current_page?(admin_conference_supporters_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to('#') do
|
||||
%i.icon-star
|
||||
Supporters
|
||||
- else
|
||||
%li
|
||||
= link_to(admin_conference_supporters_path(@conference.short_title)) do
|
||||
%i.icon-star
|
||||
Supporters
|
||||
- if current_page?(admin_conference_events_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to('#') do
|
||||
%i.icon-comment
|
||||
Events
|
||||
- else
|
||||
%li
|
||||
= link_to(admin_conference_events_path(@conference.short_title)) do
|
||||
%i.icon-comment
|
||||
Events
|
||||
- if current_page?(admin_conference_schedule_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to('#') do
|
||||
Schedule
|
||||
-else
|
||||
%li
|
||||
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
||||
%i.icon-tasks
|
||||
Schedule
|
||||
%ul.nav.pull-right
|
||||
%ul.nav.hidden-desktop
|
||||
= render 'layouts/user_menu'
|
||||
%ul.nav.pull-right.visible-desktop
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", :class=>"visible-desktop"}
|
||||
= image_tag(current_user.person.gravatar_url(:size => "22"), :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
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
||||
= image_tag(current_user.person.gravatar_url(:size => "18"), :title => "Yo #{current_user.person.public_name}!")
|
||||
%b.caret
|
||||
%ul.dropdown-menu{:style => "padding: 15px;"}
|
||||
%li.visible-desktop
|
||||
= 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
|
||||
= render 'layouts/user_menu'
|
||||
- else
|
||||
%ul.nav.pull-right
|
||||
%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