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

56 lines
2.6 KiB
Plaintext
Raw Normal View History

2014-11-28 11:23:17 -08:00
%nav.navbar.navbar-inverse.navbar-fixed-top{role: "navigation"}
2014-12-06 08:08:10 -08:00
.container{class: ios_web_app? ? "ios-web-app" : ''}
2014-11-02 04:47:35 -08:00
.navbar-header
%button.navbar-toggle{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
2014-12-11 08:56:52 -08:00
- if user_signed_in?
- unless inbox_count.nil? or notification_count.nil?
2014-12-11 08:56:52 -08:00
%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
2014-12-11 06:49:01 -08:00
- else
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand{href: "/"}= APP_CONFIG['site_name']
2014-11-02 04:47:35 -08:00
#j2-main-navbar-collapse.collapse.navbar-collapse
2014-11-10 14:46:51 -08:00
- if user_signed_in?
%ul.nav.navbar-nav
= nav_entry "Timeline", root_path
2014-11-29 17:06:15 -08:00
= nav_entry "Inbox", "/inbox", badge: inbox_count
2014-12-07 12:06:57 -08:00
%ul.nav.navbar-nav.navbar-right
2015-02-09 07:48:31 -08:00
= render "layouts/notifications"
%li.hidden-xs
2015-02-09 07:43:05 -08:00
%span{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Ask a question"}
2015-02-09 08:39:34 -08:00
.btn.btn-link.navbar-btn{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
2015-02-09 07:43:05 -08:00
%i.fa.fa-pencil-square-o
2014-11-02 04:47:35 -08:00
%li.dropdown
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
2015-02-09 07:43:05 -08:00
%img.img-rounded.answerbox--img-small.hidden-xs{src: current_user.profile_picture.url(:small)}
2014-11-02 04:47:35 -08:00
= current_user.screen_name
%b.caret
%ul.dropdown-menu
%li= link_to "View profile", show_user_profile_path(current_user.screen_name)
2014-11-02 08:58:37 -08:00
%li= link_to "Settings", edit_user_registration_path
2014-11-02 04:47:35 -08:00
%li.divider
- if current_user.admin?
%li= link_to "Kontrollzentrum", rails_admin_path
2014-12-12 14:58:35 -08:00
%li= link_to "Sidekiq", sidekiq_web_path
- if current_user.mod?
%li= link_to "Moderation panel", moderation_path
%li.divider
2014-11-02 04:47:35 -08:00
%li= link_to "Logout", destroy_user_session_path, method: :delete
2014-11-10 14:46:51 -08:00
- else
%ul.nav.navbar-nav.navbar-right
2014-11-02 04:47:35 -08:00
= nav_entry "Sign in", new_user_session_path
= nav_entry "Sign up", new_user_registration_path
2014-12-07 11:13:45 -08:00
- if user_signed_in?
2014-12-10 21:51:26 -08:00
= render 'shared/modal_ask_followers'
%button.btn.btn-primary.btn-fab.visible-xs{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
2015-01-03 09:13:18 -08:00
%i.fa.fa-pencil-square-o