Skip to content
Extraits de code Groupes Projets
Valider 60a5d2a5 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

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

Only show aspect chat control if chat is enabled
parents e77a401d 8a50db76
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
-else -else
%i.entypo.lock.contacts-header-icon{:title => t('aspects.edit.aspect_list_is_not_visible')} %i.entypo.lock.contacts-header-icon{:title => t('aspects.edit.aspect_list_is_not_visible')}
= link_to aspect_toggle_chat_privilege_path(@aspect), id: "chat_privilege_toggle", class: "contacts_button", method: :put, remote: true do -if AppConfig.chat.enabled?
-if @aspect.chat_enabled? = link_to aspect_toggle_chat_privilege_path(@aspect), id: "chat_privilege_toggle", class: "contacts_button", method: :put, remote: true do
%i.entypo.chat.enabled.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_enabled')} -if @aspect.chat_enabled?
-else %i.entypo.chat.enabled.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_enabled')}
%i.entypo.chat.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_not_enabled')} -else
%i.entypo.chat.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_not_enabled')}
= link_to @aspect, method: "delete", data: { confirm: t('aspects.edit.confirm_remove_aspect') }, class: 'delete contacts_button', id: 'delete_aspect' do = link_to @aspect, method: "delete", data: { confirm: t('aspects.edit.confirm_remove_aspect') }, class: 'delete contacts_button', id: 'delete_aspect' do
%i.entypo.trash.contacts-header-icon{:title => t('delete')} %i.entypo.trash.contacts-header-icon{:title => t('delete')}
......
...@@ -7,6 +7,7 @@ require 'spec_helper' ...@@ -7,6 +7,7 @@ require 'spec_helper'
describe ContactsController, :type => :controller do describe ContactsController, :type => :controller do
describe '#index' do describe '#index' do
before do before do
AppConfig.chat.enabled = true
@aspect = bob.aspects.create(:name => "another aspect") @aspect = bob.aspects.create(:name => "another aspect")
bob.share_with alice.person, @aspect bob.share_with alice.person, @aspect
sign_in :user, bob sign_in :user, bob
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter