Merge pull request #5459 from svbergerem/aspect-chat-control-disabled-chat

Only show aspect chat control if chat is enabled
This commit is contained in:
Jonne Haß 2014-12-05 14:41:11 +01:00
commit 60a5d2a5ba
2 changed files with 7 additions and 5 deletions

View file

@ -10,6 +10,7 @@
-else
%i.entypo.lock.contacts-header-icon{:title => t('aspects.edit.aspect_list_is_not_visible')}
-if AppConfig.chat.enabled?
= link_to aspect_toggle_chat_privilege_path(@aspect), id: "chat_privilege_toggle", class: "contacts_button", method: :put, remote: true do
-if @aspect.chat_enabled?
%i.entypo.chat.enabled.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_enabled')}

View file

@ -7,6 +7,7 @@ require 'spec_helper'
describe ContactsController, :type => :controller do
describe '#index' do
before do
AppConfig.chat.enabled = true
@aspect = bob.aspects.create(:name => "another aspect")
bob.share_with alice.person, @aspect
sign_in :user, bob