Polish the code

This commit is contained in:
flaburgan 2014-01-07 21:37:43 +01:00
parent 4d9d35cbfa
commit 70f305958b

View file

@ -54,9 +54,9 @@
-# Notifications
= link_to notifications_path, class: "badge", id: "notification_badge" do
= image_tag('icons/notifications_white.png')
- if current_user.unread_notifications.count > 0
- if current_user.unread_notifications.size > 0
%span.badge_count{id: "notification"}
= current_user.unread_notifications.count
= current_user.unread_notifications.size
-# Conversations
= link_to conversations_path, class: "badge", id: "conversations_badge" do
= image_tag('icons/mail_white.png', id: 'conversation_icon')
@ -64,10 +64,7 @@
%span.badge_count{id: "conversation"}
= current_user.unread_message_count
-# Composition
- if yield(:header_action).present?
= yield(:header_action)
- else
= link_to(image_tag('icons/compose_mobile.png'), new_status_message_path, class: "badge", id: "compose_badge")
= link_to(image_tag('icons/compose_mobile.png'), new_status_message_path, class: "badge", id: "compose_badge")
-# Menu
= link_to(image_tag('icons/menu.png'), "#", id: "menu_badge", class: "badge")
@ -101,7 +98,7 @@
= link_to t('streams.aspects.title'), "#"
%li.no_border.hide
%ul
- for aspect in current_user.aspects
- current_user.aspects.each do |aspect|
%li
= link_to aspect.name, aspects_stream_path(a_ids: [aspect.id])
%li