Chat privilege checkbox

* add to contacts header for later modification
* add to aspect creation box
This commit is contained in:
Lukas Matt 2014-11-13 11:30:12 +01:00
parent 24e1732256
commit 735b10cc63
2 changed files with 10 additions and 0 deletions

View file

@ -21,6 +21,10 @@
= aspect.check_box :contacts_visible, :checked => false, class: 'checkbox'
= aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible')
%p.checkbox_select
= aspect.check_box :chat_enabled, :checked => false, class: 'checkbox'
= aspect.label :chat_enabled, t('aspects.edit.grant_contacts_chat_privilege')
%br
.bottom_submit_section

View file

@ -10,6 +10,12 @@
-else
%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 @aspect.chat_enabled?
%i.entypo.chat.enabled.contacts-header-icon{:title => t('aspects.edit.aspect_chat_is_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
%i.entypo.trash.contacts-header-icon{:title => t('delete')}
.pull-right