Skip to content
Browse files

Merge pull request #6 from fenprace/master

Add notification unread count to page title
  • Loading branch information...
2 parents 5ad6259 + 79a5057 commit fee16beec3d562f0e746783f9927ef44db6c8eae @chloerei committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 app/views/layouts/application.haml
View
8 app/views/layouts/application.haml
@@ -3,7 +3,12 @@
%head
%meta{charset: "utf-8"}
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
- %title= page_title
+
+ - if logined? && current_user.notifications.unread.count != 0
+ %title= page_title + " (#{current_user.notifications.unread.count})"
+ - else
+ %title= page_title
+
- if defined?(@subscribe_url)
%link{:rel => 'alternate', :type => 'application/rss+xml', :href => @subscribe_url}
= stylesheet_link_tag "application"
@@ -13,6 +18,7 @@
- if content_for? :head
= yield :head
= csrf_meta_tags
+
%body
= render :partial => 'layouts/topbar'
= yield

0 comments on commit fee16be

Please sign in to comment.
Something went wrong with that request. Please try again.