From b76b13bff13cd6bcb2d543386cae9868cd4d882f Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 27 Dec 2012 14:09:53 +0100 Subject: Fallback sip account in phone views --- app/views/phones/_form_core.html.haml | 1 + app/views/phones/show.html.haml | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'app/views') diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index 51ceff5..96e53e6 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -2,6 +2,7 @@ = 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.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 => true - 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/show.html.haml b/app/views/phones/show.html.haml index 2664ffa..7629fb9 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -9,6 +9,11 @@ %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') + ":" -- cgit v1.2.3 From 3b07751150c0cd70eee4e750dd7a3670120a8675 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 28 Dec 2012 19:31:31 +0100 Subject: Fallback SIP Accounts are only shown when the hotdeskable field is checked. --- app/views/layouts/application.html.haml | 1 - app/views/phones/_form_core.html.haml | 8 +++++--- app/views/phones/show.html.haml | 14 +++++++------- 3 files changed, 12 insertions(+), 11 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index f2aff0a..8ab9039 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -20,7 +20,6 @@ %body #container = render :partial => "shared/header" - = render :partial => "shared/system_message" = render :partial => "shared/flash", :locals => { :flash => flash} #content{:role => 'main'} diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index 96e53e6..20ea054 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -1,8 +1,10 @@ .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.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 => 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/show.html.haml b/app/views/phones/show.html.haml index 7629fb9..090323e 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -6,13 +6,13 @@ %p %strong= t('phones.show.phone_model_id') + ":" = @phone.phone_model -%p - %strong= t('phones.show.hot_deskable') + ":" - = @phone.hot_deskable - -%p - %strong= t('phones.show.fallback_sip_account_id') + ":" - = @phone.fallback_sip_account +- 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 -- cgit v1.2.3 From 1985d77138ec8c3efe01673d019947a6cd3361af Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 28 Dec 2012 20:01:29 +0100 Subject: Improved the UI for a new phone. --- app/views/phones/_form_core.html.haml | 3 ++- app/views/phones/new.html.haml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index 20ea054..fd69690 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -1,10 +1,11 @@ .inputs - = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.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" + -- cgit v1.2.3 From 43ed8d1b73fe9e1d7ec93ca1d5264fe62d1cdbdb Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 28 Dec 2012 20:18:36 +0100 Subject: Added the version number in the footer. closes #9 --- app/views/layouts/application.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 8ab9039..2c7faec 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -32,14 +32,16 @@ %footer#main %ul + %li + %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GEMEINSCHAFT_VERSION} - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user) %li - %a{:href => "http://www.amooma.de"} Kommerzieller Support und Consulting + %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) %li %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste .amooma-logo %span brought to you by - %a{ :target => '_blank', :href => "http://www.amooma.de/" } Amooma + %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma -- cgit v1.2.3