Retrospring/app/views/layouts/_header.html.haml

52 lines
2.2 KiB
Plaintext

%nav.navbar.navbar-inverse.navbar-fixed-top{role: "navigation"}
.container{class: ios_web_app? ? "ios-web-app" : ''}
.navbar-header
%button.navbar-toggle{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
- if user_signed_in?
- unless inbox_count.nil? or notification_count.nil?
%span.icon-bar.navbar--inbox-animation
%span.icon-bar.navbar--inbox-animation
%span.icon-bar.navbar--inbox-animation
- else
%span.icon-bar
%span.icon-bar
%span.icon-bar
- else
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand{href: "/"}= APP_CONFIG['site_name']
#j2-main-navbar-collapse.collapse.navbar-collapse
- if user_signed_in?
%ul.nav.navbar-nav
= nav_entry "Timeline", root_path
= nav_entry "Inbox", "/inbox", badge: inbox_count
= render "layouts/notifications"
%ul.nav.navbar-nav.navbar-right
%button.btn.btn-primary.navbar-btn.btn-sm{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
%i.fa.fa-pencil-square-o
%span.visible-xs Ask your followers
%li.dropdown
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
= current_user.screen_name
%b.caret
%ul.dropdown-menu
%li= link_to "View profile", show_user_profile_path(current_user.screen_name)
%li= link_to "Settings", edit_user_registration_path
%li.divider
- if current_user.admin?
%li= link_to "Kontrollzentrum", rails_admin_path
%li= link_to "Sidekiq", sidekiq_web_path
- if current_user.mod?
%li= link_to "Moderation panel", moderation_path
%li.divider
%li= link_to "Logout", destroy_user_session_path, method: :delete
- else
%ul.nav.navbar-nav.navbar-right
= nav_entry "Sign in", new_user_session_path
= nav_entry "Sign up", new_user_registration_path
- if user_signed_in?
= render 'shared/modal_ask_followers'