From ddb3dfa92ec0878240211cb2b7a8e125961b1360 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 23:01:16 +0100 Subject: Moved to GsParemeter.get and set defaults for a couple of validations. --- app/views/phones/_form_core.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index e0c664b..b09ee35 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -9,7 +9,7 @@ :javascript $(".fallback_sip_account_dropdown").hide() - - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true + - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('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 = f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index a7ee952..f20facd 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -16,7 +16,7 @@ %strong= t('phones.show.fallback_sip_account_id') + ":" = @phone.fallback_sip_account -- if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true +- if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true %p %strong= t('phones.show.nightly_reboot') + ":" = @phone.nightly_reboot -- cgit v1.2.3 From ec342d3d91d2cfa8c210722354353cfe8a90a8bc Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 12 Jan 2013 11:53:21 +0100 Subject: Add PROVISIONING_KEY_LENGTH as a GsParameter value. #73 --- app/views/phones/_form_core.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index b09ee35..17b9ca8 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -11,5 +11,5 @@ - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('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 + - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 = f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index f20facd..0e0dad5 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -21,7 +21,7 @@ %strong= t('phones.show.nightly_reboot') + ":" = @phone.nightly_reboot -- if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0 +- if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 %p %strong= t('phones.show.provisioning_key_active') + ":" = @phone.provisioning_key_active -- cgit v1.2.3 From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/phones/_index_core.html.haml | 2 +- app/views/phones/edit.html.haml | 2 +- app/views/phones/index.html.haml | 2 +- app/views/phones/new.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index c442d7f..8dc875c 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('phones.index.mac_address') %th= t('phones.index.phone_model_id') diff --git a/app/views/phones/edit.html.haml b/app/views/phones/edit.html.haml index cdbacac..9452e2a 100644 --- a/app/views/phones/edit.html.haml +++ b/app/views/phones/edit.html.haml @@ -1,3 +1,3 @@ -- title t("phones.edit.page_title", :resource => @phone.mac_address) +- content_for :title, t("phones.edit.page_title", :resource => @phone.mac_address) = render "form" diff --git a/app/views/phones/index.html.haml b/app/views/phones/index.html.haml index 785adf9..4de7919 100644 --- a/app/views/phones/index.html.haml +++ b/app/views/phones/index.html.haml @@ -1,4 +1,4 @@ -- title t("phones.index.page_title") +- content_for :title, t("phones.index.page_title") - if @phones.count > 0 = render "index_core", :phones => @phones diff --git a/app/views/phones/new.html.haml b/app/views/phones/new.html.haml index ae0a539..95fbdf2 100644 --- a/app/views/phones/new.html.haml +++ b/app/views/phones/new.html.haml @@ -1,4 +1,4 @@ -- title t("phones.new.page_title") +- content_for :title, t("phones.new.page_title") - if !@fallback_sip_accounts.any? && can?(:create, current_user.current_tenant.sip_accounts.build) %p diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 0e0dad5..87b8d3d 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -1,4 +1,4 @@ -- title t("phones.show.page_title") +- content_for :title, t("phones.show.page_title") %p %strong= t('phones.show.mac_address') + ":" -- cgit v1.2.3 From d8fe3b636cab1504cb5d3cb5dc57ed818749ccf5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 21:30:48 +0100 Subject: Twitter Bootstrap stuff. --- app/views/phones/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 8dc875c..fc1ad19 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -5,9 +5,9 @@ %th= t('phones.index.hot_deskable') %th= t('phones.index.ip_address') - - reset_cycle + - for phone in phones - %tr{:class => cycle('odd', 'even')} + %tr %td= phone.pretty_mac_address %td= phone.phone_model %td= phone.hot_deskable -- cgit v1.2.3 From 6f69c1a85055ec7c2515719d79d2a7a4e60cec50 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 15:31:47 +0100 Subject: UI improvements. --- app/views/phones/show.html.haml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 87b8d3d..faf4061 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -31,9 +31,17 @@ - if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG' %p - Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der GS5 Provisionierungs-URL konfiguriert haben, können Sie manuell in Ihrem Telefon die folgende Provisionierungs-URL eingeben. Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt: + Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der GS5 Provisionierungs-URL konfiguriert haben, können Sie manuell in Ihrem Telefon die folgende Provisionierungs-URL eingeben. + %p + Das entsprechende Eingabefeld finden Sie unter + %br + Advanced -> Update -> Setting URL + %p + Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt: %pre = "http://#{GemeinschaftSetup.first.sip_domain.host}/settings-{mac}" + %p + Danach müssen Sie die Konfiguration abspeichern und das Telefon booten. = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } -- cgit v1.2.3