mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
92 lines
4.6 KiB
Text
92 lines
4.6 KiB
Text
.navbar.navbar-default.navbar-fixed-top.nav-osem{role: 'navigation'}
|
|
.container
|
|
.navbar-header
|
|
- if @conference && @conference.short_title.present?
|
|
%button{ "data-target"=>"#side-nav", "data-toggle"=>"collapse", class: 'navbar-toggle side-nav-btn', type: 'button' }
|
|
%span.sr-only Toggle navigation
|
|
%span.icon-bar
|
|
%span.icon-bar
|
|
%span.icon-bar
|
|
%button{"data-target"=>"#main-nav", "data-toggle"=>"collapse", class: 'navbar-toggle', type: 'button'}
|
|
%span.sr-only
|
|
Toggle navigation
|
|
%span.icon-bar
|
|
%span.icon-bar
|
|
%span.icon-bar
|
|
= nav_root_link_for conference
|
|
|
|
.collapse.navbar-collapse#main-nav
|
|
- if content_for :splash_nav
|
|
%ul.nav.navbar-nav#splash-nav
|
|
= content_for :splash_nav
|
|
-if user_signed_in?
|
|
.btn-group.pull-right
|
|
%ul.nav.navbar-nav.navbar-right
|
|
%li.dropdown
|
|
%a.dropdown-toggle{"data-toggle" => "dropdown", href: '#', id: "current-user-detail"}
|
|
- if not current_user.name.blank?
|
|
#{current_user.name}
|
|
-else
|
|
#{current_user.email}
|
|
= image_tag(current_user.gravatar_url(size: '18'), title: "Yo #{current_user.name}!", alt: '')
|
|
%b.caret
|
|
%ul.dropdown-menu
|
|
= render 'layouts/user_menu'
|
|
- if can? :index, Comment
|
|
%ul.nav.navbar-nav.navbar-right
|
|
%li.dropdown
|
|
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
|
|
Notifications (#{unread_notifications(current_user).length})
|
|
%span.fa.fa-comment
|
|
%b.caret
|
|
%ul.dropdown-menu
|
|
- if unread_notifications(current_user).length > 0
|
|
%li.dropdown-header Last 5 Comments for:
|
|
- unread_notifications(current_user).limit(5).group_by{ |comment| comment.commentable}.each do |event, comments|
|
|
%li= link_to("#{event.title}(#{comments.count})", admin_conference_program_event_path(event.program.conference.short_title, event.id))
|
|
%li.divider
|
|
%li= link_to "See all unread Comments (#{unread_notifications(current_user).length})", admin_comments_path
|
|
%li= link_to 'See all Comments', admin_comments_path(anchor: 'all_comments')
|
|
- else
|
|
%ul.nav.navbar-nav.navbar-right
|
|
- if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
|
%li{class: "#{active_nav_li(new_ichain_registration_path('user'))}"}
|
|
= link_to(new_ichain_registration_path('user')) do
|
|
%span.fa.fa-heart
|
|
Sign Up
|
|
- else
|
|
%li{class: "#{active_nav_li(new_registration_path('user'))}"}
|
|
= link_to(new_registration_path('user')) do
|
|
%span.fa.fa-heart
|
|
Sign Up
|
|
%li.dropdown.visible-desktop
|
|
%a.dropdown-toggle{"data-toggle" => "dropdown", href: '#'}
|
|
%span.fa.fa-user
|
|
Sign In
|
|
%span.caret
|
|
.dropdown-menu
|
|
- if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
|
= form_tag User.ichain_login_url do
|
|
= text_field_tag 'username', nil, id: 'user_ichain_email_dd', class: 'form-control', placeholder: 'Username'
|
|
= password_field_tag 'password', nil, id: 'user_ichain_password_dd', class: 'form-control', placeholder: 'Password'
|
|
%button.btn.btn-success.btn-block Sign in
|
|
- else
|
|
= form_tag new_user_session_path do
|
|
= text_field_tag 'user[login]', nil, id: 'user_login_dd', class: 'form-control', placeholder: 'Username / E-Mail'
|
|
= password_field_tag 'user[password]', nil, id: 'user_password_dd', class: 'form-control', placeholder: 'Password'
|
|
%p.text-right
|
|
%small
|
|
%label{for: 'user_remember_me'} Remember me
|
|
= check_box_tag 'user[remember_me]'
|
|
%button.btn.btn-success.btn-block Sign in
|
|
- unless omniauth_configured.empty?
|
|
.divider
|
|
%h6.text-center
|
|
or
|
|
= render 'devise/shared/openid_links'
|
|
%p.text-right
|
|
%br
|
|
%a.small.btn.btn-xs.btn-default{"data-toggle" => "collapse", "data-target" => "#navbar-devise-help"}
|
|
Need Help?
|
|
#navbar-devise-help.collapse
|
|
= render 'devise/shared/links'
|