summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-11 12:12:36 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-11 12:12:36 +0100
commitaa46f61cc84043a81f760c961ec53786671e7e50 (patch)
treed2368cd8e0a08cab4b8c16b3f6ed7ed29f8eb506
parent685b8dc4987965e1450627e831ea40847bb5b19c (diff)
Moved the voicemail and fax indicator.
-rw-r--r--app/controllers/trigger_controller.rb4
-rw-r--r--app/views/layouts/_navbar.html.haml14
2 files changed, 11 insertions, 7 deletions
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb
index 7ab90c2..db379f9 100644
--- a/app/controllers/trigger_controller.rb
+++ b/app/controllers/trigger_controller.rb
@@ -44,7 +44,7 @@ class TriggerController < ApplicationController
# Indicate a new voicemail in the navigation bar.
#
- PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_indicator').hide('fast').show('slow');")
+ PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_or_fax_indicator').hide('fast').show('slow');")
render(
:status => 200,
@@ -114,7 +114,7 @@ class TriggerController < ApplicationController
#
if fax_document.fax_accountable.class == User
user = fax_document.fax_accountable
- PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_indicator').hide('fast').show('slow');")
+ PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_or_fax_indicator').hide('fast').show('slow');")
end
render(
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index fe5f48f..3e1da1c 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -22,12 +22,8 @@
=t("call_histories.index.page_title")
%li
%a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)}
- %i.icon-star.icon-white{:id => 'new_voicemail_indicator'}
=t("voicemail_messages.index.page_title")
- :javascript
- $("#new_voicemail_indicator").hide()
- = subscribe_to "/users/#{current_user.id}/messages/new"
-
+
- if current_user
%ul.nav.pull-right
%li.display
@@ -43,10 +39,18 @@
- if current_page?(tenant_user_path(current_user.current_tenant, current_user))
%li.active
%a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
+ %i.icon-star.icon-white{:id => 'new_voicemail_or_fax_indicator'}
+ :javascript
+ $("#new_voicemail_or_fax_indicator").hide()
+ = subscribe_to "/users/#{current_user.id}/messages/new"
= current_user
- else
%li
%a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
+ %i.icon-star.icon-white{:id => 'new_voicemail_or_fax_indicator'}
+ :javascript
+ $("#new_voicemail_or_fax_indicator").hide()
+ = subscribe_to "/users/#{current_user.id}/messages/new"
= current_user
- if single_sign_on_system? == false