update notification display

This commit is contained in:
Andreas N 2015-02-09 16:48:31 +01:00
parent 6ac227fd31
commit 7e12a1c77a
2 changed files with 6 additions and 2 deletions

View File

@ -22,8 +22,8 @@
%ul.nav.navbar-nav %ul.nav.navbar-nav
= nav_entry "Timeline", root_path = nav_entry "Timeline", root_path
= nav_entry "Inbox", "/inbox", badge: inbox_count = nav_entry "Inbox", "/inbox", badge: inbox_count
= render "layouts/notifications"
%ul.nav.navbar-nav.navbar-right %ul.nav.navbar-nav.navbar-right
= render "layouts/notifications"
%li.hidden-xs %li.hidden-xs
%span{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Ask a question"} %span{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Ask a question"}
.btn.btn-link.navbar-btn.btn-sm{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"} .btn.btn-link.navbar-btn.btn-sm{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}

View File

@ -2,7 +2,11 @@
- notifications = Notification.for(current_user).limit(4) - notifications = Notification.for(current_user).limit(4)
%li.dropdown.hidden-xs %li.dropdown.hidden-xs
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"} %a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
Notifications - if notification_count.nil?
%i.fa.fa-bell-o
- else
%i.fa.fa-bell
%span.sr-only Notifications
%span.badge= notification_count %span.badge= notification_count
%ul.dropdown-menu.notification--dropdown %ul.dropdown-menu.notification--dropdown
- if notifications.count == 0 - if notifications.count == 0