diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-28 20:27:04 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-28 20:27:04 +0100 |
commit | f3c3e77eaa2b82567f02601b6f66177208674181 (patch) | |
tree | 1946390f7f697e80fcdab4164ad620d507b6a1fe /app/views/phones | |
parent | 3e76142566ad8f55a64a88fe5c19e7d0ec7c11c0 (diff) | |
parent | 8d20201910b1915cffa495e6474d50f9c8e8331d (diff) |
Merge branch 'develop'5.0.1
Diffstat (limited to 'app/views/phones')
-rw-r--r-- | app/views/phones/_form_core.html.haml | 10 | ||||
-rw-r--r-- | app/views/phones/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/phones/show.html.haml | 11 |
3 files changed, 21 insertions, 6 deletions
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index 51ceff5..fd69690 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -1,7 +1,11 @@ .inputs - = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint') - = f.association :phone_model, :label => t('phones.form.phone_model_id.label'), :hint => conditional_hint('phones.form.phone_model_id.hint') - = f.input :hot_deskable, :label => t('phones.form.hot_deskable.label'), :hint => conditional_hint('phones.form.hot_deskable.hint') + = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint'), :autofocus => true + = f.association :phone_model, :label => t('phones.form.phone_model_id.label'), :hint => conditional_hint('phones.form.phone_model_id.hint'), :include_blank => false + - if @fallback_sip_accounts.any? + = f.input :hot_deskable, :label => t('phones.form.hot_deskable.label'), :hint => conditional_hint('phones.form.hot_deskable.hint') + .fallback_sip_account_dropdown + = f.association :fallback_sip_account, :collection => @fallback_sip_accounts, :label => t('phones.form.fallback_sip_account_id.label'), :hint => conditional_hint('phones.form.fallback_sip_account_id.hint'), :include_blank => false + - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true = f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint') - if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0 diff --git a/app/views/phones/new.html.haml b/app/views/phones/new.html.haml index 61923cc..ae0a539 100644 --- a/app/views/phones/new.html.haml +++ b/app/views/phones/new.html.haml @@ -1,3 +1,9 @@ - title t("phones.new.page_title") +- if !@fallback_sip_accounts.any? && can?(:create, current_user.current_tenant.sip_accounts.build) + %p + = t("phones.new.you_need_to_have_at_least_one_available_fallback_sip_account_for_hotdesking") + = link_to t("sip_accounts.index.actions.create_for", :resource => current_user.current_tenant), new_tenant_sip_account_path(current_user.current_tenant) + = render "form" + diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 2664ffa..090323e 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -6,9 +6,14 @@ %p %strong= t('phones.show.phone_model_id') + ":" = @phone.phone_model -%p - %strong= t('phones.show.hot_deskable') + ":" - = @phone.hot_deskable +- if @phone.hot_deskable == true + %p + %strong= t('phones.show.hot_deskable') + ":" + = @phone.hot_deskable + %p + %strong= t('phones.show.fallback_sip_account_id') + ":" + = @phone.fallback_sip_account + - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true %p %strong= t('phones.show.nightly_reboot') + ":" |